← DGT Tools
MaddLang SilverJavaScript Edition

PORTABLE · SANDBOXED · NO BUILD STEP

Write silver.
Run safely.

A browser-focused JavaScript implementation informed by the current MaddLang-rs Silver standard, with explicit sandbox extensions for custom commands and DOM plugins. Programs run locally in a disposable Web Worker with strict time, loop, call-depth, step, and output limits.

Open full-page Cryption
OUTPUT
LIVE PAGE · EDITED BY YOUR PLAYGROUND CODE

LIVE MADD PAGE

MaddLang can transform this page

This is real page content inside the playground—not program output. Change the code, press Run, and DOM host commands will edit this section.

Protected content

The editor, buttons, console, and code stay outside the program's DOM capability.

const important = "this code stays readable";

Ready. Functions only run when called; return values only appear when printed, assigned, or run as the selected entry.

MaddLang Console runtime, errors, worker, and plugin events

Language

string name = "value"uint count = 3uint[] values = [1, 2, 3]print(name, count)set name = value (legacy/host)add count 1unset nameecho $nameif $name == "value" { … }while $count != 3 { … }assert $count == 3fn main { … }call function_namecommand my_command { … }my_commandreturn $value

Safe host API

host console.print, "text"host text.length, "text"host text.upper, "text"host text.lower, "TEXT"host array.length, "$items"host time.nowhost dom.setText, "h1", "New title"host dom.encryptTexthost dom.decryptText

DOM access is capability-based and scoped to the Live Page section. The editor, Tools navigation, filesystem, shell, cookies, accounts, and network are not exposed.

Use the runtime

<script src="maddlang-silver.js"></script>
<script>
await MaddLangSilver.run(source, {
  write: console.log,
  host: { "my.safe.fn": async args => args[0] }
});
</script>

Current Silver standard · Current Gold standard

The runtime is also CommonJS-compatible: require('./maddlang-silver.js').