Help us shape the future of Go! Take the 2026 Go Developer Survey

playground

command
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2026 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Rendered for js/wasm

Overview

Command playground is the playground's WebAssembly core. It runs in a Web Worker (web/worker.js), defines two functions, then calls playgroundReady() and waits:

  • playgroundRun(markdown) runs a notebook and returns what each code cell did, as JSON ([]engine.Result);
  • playgroundCells(markdown) returns the notebook's cells, as JSON ([]engine.Cell), for a notebook the visitor opens.

The page calls them once per run with the whole notebook: one string in, one string out, never a call per cell or per widget.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL