Index

mmo-doc-example

1 symbol · generated 30 Sep 2026

element

mmo-doc-example

mmo-doc-example.jhs:1

A 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).

<mmo-doc-example></mmo-doc-example>
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

showCode()

mmo-doc-example.jhs:29

Rebuilds the code snippet from data-code (a JSON-encoded string, so embedded newlines survive) via the DOM API -- never through innerHTML.

showCode()

runExample()

mmo-doc-example.jhs:40

Sends {symbol, index} to the run endpoint and shows stdout/stderr. Never sends code.

runExample()