Fix island state loss on SX navigation + cache busting
Island markers rendered during SX navigation responses had no data-sx-state attribute, so hydration found empty kwargs and path was nil in the copyright display. Now adapter-dom.sx serializes keyword args into data-sx-state on island markers, matching what adapter-html.sx does for SSR. Also fix post-swap to use parent element for outerHTML swaps in SX responses (was using detached old target). Add SX source file hashes to wasm_hash for proper browser cache busting — changing any .sx file now busts the cache. Remove stale .sxbc bytecode cache files. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
1329
web/adapter-dom.sx
1329
web/adapter-dom.sx
File diff suppressed because one or more lines are too long
@@ -299,7 +299,11 @@
|
||||
()
|
||||
(let
|
||||
((swap-result (swap-dom-nodes target content swap-style)))
|
||||
(post-swap (or swap-result target)))))))))))))
|
||||
(post-swap
|
||||
(if
|
||||
(= swap-style "outerHTML")
|
||||
(dom-parent (or swap-result target))
|
||||
(or swap-result target))))))))))))))
|
||||
|
||||
(define
|
||||
handle-html-response
|
||||
@@ -325,8 +329,15 @@
|
||||
use-transition
|
||||
(fn
|
||||
()
|
||||
(swap-html-string target html swap-style)
|
||||
(post-swap target))))
|
||||
(let
|
||||
((swap-root (swap-html-string target html swap-style)))
|
||||
(log-info
|
||||
(str
|
||||
"swap-root: "
|
||||
(if swap-root (dom-tag-name swap-root) "nil")
|
||||
" target: "
|
||||
(dom-tag-name target)))
|
||||
(post-swap (or swap-root target))))))
|
||||
(let
|
||||
((container (dom-create-element "div" nil)))
|
||||
(dom-set-inner-html container (dom-body-inner-html doc))
|
||||
|
||||
Reference in New Issue
Block a user