Fix duplicate sx-cssx-live style tags
Some checks failed
Build and Deploy / build-and-deploy (push) Has been cancelled

Cache the style element reference in _cssx-style-el so flush-cssx-to-dom
never creates more than one. Previous code called dom-query on every
flush, which could miss the element during rapid successive calls,
creating duplicates.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-14 17:16:13 +00:00
parent 41f4772ba7
commit e28b688ed4
6 changed files with 79 additions and 48 deletions

View File

@@ -1537,6 +1537,10 @@ CEK_FIXUPS_JS = '''
// Environment (for creating eval contexts)
PRIMITIVES["make-env"] = function() { return merge(componentEnv, PRIMITIVES); };
// Render hooks (from boot.sx)
PRIMITIVES["register-pre-render-hook"] = registerPreRenderHook;
PRIMITIVES["register-post-render-hook"] = registerPostRenderHook;
'''