IO suspension driver: _driveAsync in platform, VmSuspended in value_to_js

- sx-platform.js: add _driveAsync to platform (was sandbox-only) for
  driving wait/fetch IO suspension chains in live site
- sx-platform.js: host-callback wrapper calls _driveAsync on callFn result
- sx_browser.ml: value_to_js callable wrapper catches VmSuspended, builds
  suspension object, and calls _driveAsync directly

Toggle and count clicks work fully. Bounce adds class but wait/remove
requires IO suspension in CEK context (eval-expr-cek doesn't support
perform — needs VM-path evaluation in hs-handler).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-09 21:22:25 +00:00
parent de9ab4ca07
commit 0365ecb2b9
5 changed files with 111 additions and 11 deletions

File diff suppressed because one or more lines are too long