Playwright sandbox: offline browser test environment for WASM kernel
New sx_playwright mode="sandbox" — injects the WASM kernel into about:blank with full FFI, IO suspension tracing, and real DOM. No server needed. Predefined stacks: core (kernel only), web (full web stack), hs (+ hyperscript), test (+ test framework). Custom files and setup expressions supported. Reproduces the host-callback IO suspension bug: direct callFn chains 6/6 suspensions correctly, but host-callback → addEventListener → _driveAsync only completes 1/6. Bug is in the _driveAsync resume chain context. Also: debug.sx mock DOM harness, test_hs_repeat.js Node.js reproduction. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -333,7 +333,7 @@
|
||||
(hs-to-sx (nth ast 1))
|
||||
(hs-to-sx (nth ast 2))))
|
||||
((= head (quote empty?))
|
||||
(list (quote empty?) (hs-to-sx (nth ast 1))))
|
||||
(list (quote hs-empty?) (hs-to-sx (nth ast 1))))
|
||||
((= head (quote exists?))
|
||||
(list
|
||||
(quote not)
|
||||
@@ -356,10 +356,13 @@
|
||||
(hs-to-sx (nth ast 2))
|
||||
(hs-to-sx (nth ast 1))))
|
||||
((= head (quote of))
|
||||
(list
|
||||
(quote get)
|
||||
(hs-to-sx (nth ast 2))
|
||||
(hs-to-sx (nth ast 1))))
|
||||
(let
|
||||
((prop (hs-to-sx (nth ast 1)))
|
||||
(target (hs-to-sx (nth ast 2))))
|
||||
(cond
|
||||
((= prop (quote first)) (list (quote first) target))
|
||||
((= prop (quote last)) (list (quote last) target))
|
||||
(true (list (quote get) target prop)))))
|
||||
((= head "!=")
|
||||
(list
|
||||
(quote not)
|
||||
|
||||
Reference in New Issue
Block a user