Fix streaming page: SX NIL namespace broke CSS matching on DOM elements

domCreateElement treated SX NIL (a truthy JS object) as a real namespace,
calling createElementNS("nil", tag) instead of createElement(tag). All
elements created by resolveSuspense ended up in the "nil" XML namespace
where CSS class selectors don't match.

Also fix ~suspense fallback: empty &rest list is truthy in SX, so
fallback content never rendered.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-07 20:24:29 +00:00
parent 6596fac758
commit f5e47678d5
3 changed files with 15 additions and 214 deletions

View File

@@ -2681,7 +2681,7 @@ PLATFORM_DOM_JS = """
function domCreateElement(tag, ns) {
if (!_hasDom) return null;
if (ns) return document.createElementNS(ns, tag);
if (ns && ns !== NIL) return document.createElementNS(ns, tag);
return document.createElement(tag);
}