Docs / Reference
Which Node and which browser
A Node Snippet runs on real Node, and a Web Snippet in a real Chromium page. Both come inside the app.
The versions
Open Settings → About. It names the Node that runs Node Snippets, the Chromium that runs Web Snippets, and the V8 JavaScript engine under both.
- Node snippets
- Node 24.21.0
- Web snippets
- Chromium 152.0.7977.130
- JavaScript engine
- V8 15.2.124.28
JSpark is built on Electron 44. The versions change when an update moves JSpark to a newer Electron, so check Settings → About for the ones you have.
What Node gives you
- Node’s own behaviour. Errors and stack traces are V8’s, and
setTimeout,setImmediate,process.nextTickand promises run in Node’s order. - Your own access. A Node Run can read and write your files, use the network and start programs, as
nodecan. See Outside Access. - A folder to work in. A relative path, or one beside
__dirname, lands in the The Working Folder. - ESM or CommonJS. A Snippet runs as a Module or a Script. See Load Mode.
- TypeScript. JSpark compiles it to JavaScript with esbuild before Node runs it. The editor checks the types with TypeScript 5.9, inside the app.
- Code that keeps running. A server, a timer or a watcher runs until you press Stop. The time limit (5 s by default) stops only a Run that stays busy without a pause. A recording for the Timeline has a limit on its total length. See Time and memory limits.
- The Timeline. Only a Node Run can be recorded and replayed one Step at a time.
A page Run and a browser tab
A Web Snippet builds a real page, beside the editor, in a frame and a process of its own. A page that never finishes doesn't stop the app. Most of what works in a browser tab works here:
- Libraries from a CDN over
https:, and import maps. evalandnew Function, which some libraries need.fetchand WebSockets, to any address.- The page keeps its state while its tab is not on screen.
These differ from a browser tab:
- Only the inline scripts and
on…handlers you wrote run. One added after the page started, throughinnerHTMLor by a library, is refused, and the console says so. - The page is given no permissions, and nothing asks you. A request for the camera, the microphone or the clipboard is refused.
window.openopens a tab in your web browser, only within a second of a click or key press in the page, and at most five times in one Run.
The pictures show JSpark on a Mac. On Windows, the window looks a little different and uses Ctrl for ⌘, but everything works the same way.