mmo-doc-example
1 symbol · generated 30 Sep 2026
mmo-doc-example
mmo-doc-example.jhs:1A runnable @example block. Displays the PHP snippet (via <mmo-code>) read from its own data-code attribute, and on "Run" POSTs only {symbol, index} to the server (ExampleController) -- the actual source code is never sent by the client, only re-read server-side from that symbol's own doc comment, then executed in a sandboxed subprocess (ExampleRunner).
- Extends
CustomShadowElement
Index
| init() | ||
| showCode() | Rebuilds the code snippet from data-code (a JSON-encoded string, so embedded newlines survive) via the DOM API -- never through innerHTML. | |
| runExample() | Sends {symbol, index} to the run endpoint and shows stdout/stderr. |
Methods3
init()
mmo-doc-example.jhs:21showCode()
mmo-doc-example.jhs:29Rebuilds the code snippet from data-code (a JSON-encoded string, so embedded newlines survive) via the DOM API -- never through innerHTML.
runExample()
mmo-doc-example.jhs:40Sends {symbol, index} to the run endpoint and shows stdout/stderr. Never sends code.