Skip to content

Add startup robustness API (waitUntilReady, timeout, offline, load error)#11

Draft
microbit-matt-hillsdon wants to merge 4 commits intomainfrom
load-error
Draft

Add startup robustness API (waitUntilReady, timeout, offline, load error)#11
microbit-matt-hillsdon wants to merge 4 commits intomainfrom
load-error

Conversation

@microbit-matt-hillsdon
Copy link
Copy Markdown
Contributor

  • Add waitUntilReady() on MakeCodeFrameDriver that races editor
    readiness against configurable timeout, offline detection, and
    iframe load errors
  • Add startUpTimeout option (default 90s)
  • Add notifyLoadError() and isReady getter
  • Export StartUpResult and StartUpFailure types

Draft for testing with ml-trainer where some of this logic came from (offline stuff is new).

…ror)

Move MakeCode iframe startup detection into the library so consumers
don't need to reimplement timeout, offline, and load error handling.

- Add waitUntilReady() on MakeCodeFrameDriver that races editor
  readiness against configurable timeout, offline detection, and
  iframe load errors
- Add startUpTimeout option (default 90s)
- Add notifyLoadError() and isReady getter
- Export StartUpResult and StartUpFailure types
Tests cover ready, timeout, offline, load error, and isReady lifecycle.
Adds vitest and happy-dom as dev dependencies.
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Mar 27, 2026

Deploying makecode-embed with  Cloudflare Pages  Cloudflare Pages

Latest commit: d39a319
Status:🚫  Build failed.

View logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant