JavaScript
Edit JavaScript and run it in Worktray's isolated console.
The JavaScript editor opens .js text files with syntax highlighting, search,
history, line wrapping, and code folding.
Run and stop
Section titled “Run and stop”Run executes the file in Worktray’s sandboxed runner and streams console
output into a panel below the editor. Run becomes Stop while a script is
executing, so you can terminate it at any point; long-running scripts are also
capped by a timeout.
The sandbox
Section titled “The sandbox”The runner is deliberately minimal: it has no DOM, no network affordances,
and cannot reach Worktray’s own origin, localStorage, or IndexedDB. It exists
to try out logic — parsing, transforms, quick calculations — not to render a
page. For live HTML/CSS/JS rendering, use the HTML editor
instead.
This is the same isolation described in Privacy and local data: code you run cannot read the files in your trays.