Native module playground

Edit the source. Run the real module.

Change the JavaScript, press Run, and inspect each console value. The editor executes the checked-in index.js module—there is no playground-only copy of js-message.

js-message works with bundlers and without a bundler.

Bundlers resolve the bare js-message import normally. Native browser ESM, including this playground, resolves it through a standard import map, with no build or transpilation step.

Live workbench

Press Run or Ctrl/⌘ + Enter.

Put package imports and absolute-URL one-line static imports before executable code. The runner then uses a fresh, time-limited module worker inside a sandboxed editor; your snippet cannot reach or rewrite the documentation page.

Use it for code you control.

The playground blocks fetch, WebSocket, and cross-origin module requests. Same-origin module imports, browser storage, and messaging APIs remain available, and the runner stops long-running snippets after three seconds. Browser code can still consume CPU or memory until that limit takes effect.

Focused recipes

One recipe per page.

Keep this workbench short, then open a focused page for the complete source and explanation.

Boundary

Keep local state off the wire

Prove instance-only fields never enter the transport envelope.

Open boundary recipe →

Keep building

Move from experiment to transport.

Use the protocol page to lock the envelope shape, then copy a boundary recipe for WebSockets, fetch, workers, or IPC.