Fix page registry: process page scripts before mount scripts

The data-mount="body" script replaces the entire body content,
destroying the <script type="text/sx-pages"> tag. Moving
processPageScripts before processSxScripts ensures the page
registry is read before the body is replaced.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-06 21:35:59 +00:00
parent c80b5d674f
commit 79ee3bc46e
2 changed files with 3 additions and 3 deletions

View File

@@ -14,7 +14,7 @@
// =========================================================================
var NIL = Object.freeze({ _nil: true, toString: function() { return "nil"; } });
var SX_VERSION = "2026-03-06T21:30:54Z";
var SX_VERSION = "2026-03-06T21:35:37Z";
function isNil(x) { return x === NIL || x === null || x === undefined; }
function isSxTruthy(x) { return x !== false && !isNil(x); }
@@ -2357,7 +2357,7 @@ callExpr.push(dictGet(kwargs, k)); } }
})(); };
// boot-init
var bootInit = function() { return (logInfo((String("sx-browser ") + String(SX_VERSION))), initCssTracking(), initStyleDict(), processSxScripts(NIL), processPageScripts(), sxHydrateElements(NIL), processElements(NIL)); };
var bootInit = function() { return (logInfo((String("sx-browser ") + String(SX_VERSION))), initCssTracking(), initStyleDict(), processPageScripts(), processSxScripts(NIL), sxHydrateElements(NIL), processElements(NIL)); };
// =========================================================================

View File

@@ -344,8 +344,8 @@
(log-info (str "sx-browser " SX_VERSION))
(init-css-tracking)
(init-style-dict)
(process-sx-scripts nil)
(process-page-scripts)
(process-sx-scripts nil)
(sx-hydrate-elements nil)
(process-elements nil))))