resolve-suspense: process new SX scripts before resolving

Streaming resolve scripts arrive after boot, so any extra component
defs sent as <script type="text/sx"> tags weren't being loaded.
Fix in the spec (boot.sx): call (process-sx-scripts nil) at the
start of resolve-suspense so late-arriving component defs are
available in componentEnv before rendering.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-07 19:20:54 +00:00
parent 47448a6d37
commit 2c9d7c95a2
3 changed files with 9 additions and 3 deletions

View File

@@ -1597,6 +1597,8 @@
* new SX content, and replaces the wrapper's children.
*/
resolveSuspense: function (id, sx) {
// Process any new <script type="text/sx"> tags (streaming extras)
Sx.processScripts();
var el = document.querySelector('[data-suspense="' + id + '"]');
if (!el) {
console.warn("[sx] resolveSuspense: no element for id=" + id);