Skip to content

Web Standards Support

Thunder aims for broad Web Standards compliance. Functions deployed to the runtime can use the same APIs they would use in a modern browser or in Cloudflare Workers, with the obvious exception of DOM and browser-only surfaces.

CategoryCountPercentage
Full62 / 8177%
Partial3 / 814%
None16 / 8120%

The following APIs are available with full spec-level behaviour.

APINotes
fetch()HTTP/1.1 and HTTP/2. Respects egress proxy settings.
RequestAll standard constructors and methods.
ResponseIncludes Response.json(), Response.redirect().
HeadersIterable. Case-insensitive.
WebSocketClient-side new WebSocket(url) with per-isolate connection limit.
APINotes
URLWHATWG URL spec.
URLSearchParamsFull iteration and mutation support.
URLPatternPattern matching for URL routing.
APINotes
TextEncoderUTF-8 encoding.
TextDecoderUTF-8, UTF-16, and legacy encodings.
atob() / btoa()Base-64 encode and decode.
structuredClone()Deep clone of structured-cloneable values.
APINotes
cryptoGlobal crypto.getRandomValues() and crypto.randomUUID().
CryptoKeyKey objects for use with SubtleCrypto.
SubtleCryptocrypto.subtle — digest, sign, verify, encrypt, decrypt, key generation.
APINotes
ReadableStreamIncluding ReadableStream.from() and async iteration.
WritableStreamBackpressure-aware writes.
TransformStreamPipeable transform chains.
CompressionStreamgzip, deflate, deflate-raw.
DecompressionStreamgzip, deflate, deflate-raw.
APINotes
BlobImmutable binary data.
FileExtends Blob with name and lastModified.
FormDataMultipart form construction and parsing.
APINotes
setTimeout() / clearTimeout()Timer scheduling within wall-clock budget.
setInterval() / clearInterval()Repeating timers within wall-clock budget.
queueMicrotask()Microtask queue scheduling.
AbortControllerCreate abort signals.
AbortSignalSignal cancellation of async operations.
APINotes
EventTargetaddEventListener, removeEventListener, dispatchEvent.
EventBase event class.
CustomEventUser-defined event payloads.
APINotes
consolelog, warn, error, info, debug, time, timeEnd, timeLog, trace, assert, dir, table.
performanceperformance.now() for high-resolution timing.
IntlFull ICU-based internationalisation (number, date, collation, pluralisation).

APIStatusNotes
navigatorPartialnavigator.userAgent returns the Thunder version string. Other properties are stubs.
cachesPartialCache API interface is present; behaviour is runtime-scoped, not persisted.
MessageChannel / MessagePortPartialUsable within a single isolate; cross-isolate messaging is not supported.

The following APIs are not available in the Thunder runtime. Attempting to access them will result in a ReferenceError or a stub that throws.

APIReason
document, window, HTMLElement, all DOM APIsNo browser rendering engine.
localStorage / sessionStorageNo persistent client-side storage.
IndexedDBNo persistent client-side storage.
ServiceWorkerNot applicable to edge function model.
SharedWorkerNot applicable to edge function model.
Worker (dedicated)Use isolate-level concurrency instead.
WebGPUNo GPU access in edge environment.
WebRTCNo peer-to-peer media support.
WebTransportNot yet implemented.
NotificationBrowser-only API.
GeolocationBrowser-only API.
Bluetooth / USB / Serial / HIDHardware APIs not applicable.
Screen / MediaDevicesBrowser-only APIs.

Use standard feature detection when writing portable code:

if (typeof crypto.subtle !== "undefined") {
// SubtleCrypto is available
}
if (typeof WebSocket !== "undefined") {
// WebSocket client is available
}

This avoids hard failures when the same bundle is tested in environments with different API surfaces.