Skip to main content
Scripts run in a context shaped like a Web Worker. The APIs below are globals and follow the specs, so MDN is the reference.
There’s no window, document, sessionStorage, indexedDB, Worker, alert/prompt or onmessage, even though TypeScript’s DOM types declare them. using works; DisposableStack doesn’t exist.

What’s there

Timers, console and the game events are on Globals, storage on localStorage.

Differences


crypto.subtle

Other algorithms (Ed25519, X25519, SHA-3, …) reject with NotSupportedError.
RSA generateKey blocks the script for tens of milliseconds (4096-bit far more). Generate keys once and keep them.