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

@@ -27,7 +27,7 @@
(div :id (str "sx-suspense-" id)
:data-suspense id
:style "display:contents"
(if children children fallback)))
(if (not (empty? children)) children fallback)))
(defcomp ~error-page (&key title message image asset-url)
(~base-shell :title title :asset-url asset-url