Docs/Compatibility

Web APIs

Stable

The Web-platform globals Amber pins with contracts, and the ones it deliberately leaves out.

Each row below is Stable only for its contract. The rest of src/web_api/ is Preview. There is no document, DOM tree, or browser origin in Amber, so several APIs behave like their server-side cousins rather than the browser versions.

Networking

APIIdNotes
fetch, Request, Response, HeadersG9Streaming body reader, redirect modes, AbortSignal, integrity. text() and json() are synchronous. response.body is not a ReadableStream instance.
WebSocket clientG15ws:// handshake, text and binary frames. No subprotocols or permessage-deflate. Not a server.

Data and encoding

APIIdNotes
URL, URLSearchParamsG10No IDNA.
TextEncoder, TextDecoderG10UTF-8 only.
structuredCloneG10The types in the contract, including ArrayBuffer transfer.
atob, btoaG29Throws Error, not DOMException.
Blob, File, FormDataG11text() and arrayBuffer() return values, not Promises.
crypto.subtle, crypto.randomUUID, getRandomValuesG14SHA, HMAC, AES, PBKDF2, ECDH, Ed25519, ECDSA, RSA. No HKDF, RSA-PSS, or X25519.
DOMParserG32Read-only parse tree for HTML and XML. Not a live DOM.

Events, streams, and timers

APIIdNotes
Event, EventTarget, CustomEvent, AbortControllerG12No tree, so propagation does not cross parents.
MessageChannel, BroadcastChannelG12Same-isolate delivery.
ErrorEvent, global onerrorG30 (provisional)Constructed events are not instanceof Event.
ReadableStream, WritableStream, TransformStreamG13No backpressure from queuing strategies.
CompressionStream, DecompressionStreamG13gzip, deflate, deflate-raw; one member per write.
setTimeout, setInterval, queueMicrotask, performanceG13now, mark, measure.

Workers and service workers

APIIdNotes
Dedicated Worker, worker_threadsG16One thread and isolate per worker. Messages are JSON.
navigator.serviceWorker.registerG16Install and activate lifecycle, clients.claim().
Service-worker fetch interceptionG35FetchEvent.respondWith from an activated worker.
caches (Cache Storage)G34In-process memory store. Not an HTTP cache and not persistent.
Background SyncG33Fires on the same isolate. Not Periodic Sync.
navigator.clipboard.writeText / readTextG31Process-local string, not the OS clipboard.

WinterTC baseline

DOMException, URLPattern, navigator, queuing strategies, ReadableStream.from, amber:sockets, wintercg / wintertc export conditions, and import.meta.main / env / resolve are part of the Stable scope. See WinterTC.

Not supported

  • SharedWorker and module workers ({ type: "module" } throws).
  • Push subscriptions, Notification, and the Payment Request API.
  • ClipboardItem read and write (rejects with an error naming ClipboardItem).
  • CacheStorage.match, matchAll, and the ignore* options.
Edit this page on GitHub