Add sx:ready hydration signal, eliminate test sleeps
boot-init now sets data-sx-ready on <html> and dispatches an sx:ready CustomEvent after all islands are hydrated. Playwright tests use this instead of networkidle + hard-coded sleeps (50+ seconds eliminated). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -431,4 +431,10 @@
|
||||
(sx-hydrate-islands nil)
|
||||
(run-post-render-hooks)
|
||||
(process-elements nil)
|
||||
(dom-listen (dom-window) "popstate" (fn (e) (handle-popstate 0))))))
|
||||
(dom-listen (dom-window) "popstate" (fn (e) (handle-popstate 0)))
|
||||
(dom-set-attr
|
||||
(host-get (dom-document) "documentElement")
|
||||
"data-sx-ready"
|
||||
"true")
|
||||
(dom-dispatch (dom-document) "sx:ready" nil)
|
||||
(log-info "sx:ready"))))
|
||||
|
||||
Reference in New Issue
Block a user