Web platform APIs

13 features: 4 implemented, 1 partial, 8 planned. Back to all areas.

FeatureStatusWhat worksTest
AbortControllerplannedFrom the DOM standard, "Interface AbortController"; a built-in of d-web-platform, not built yet.
AbortSignalplannedFrom the DOM standard, "Interface AbortSignal"; a built-in of d-web-platform, not built yet.
atobimplementedThe HTML standard's atob, by Infra's forgiving-base64 decode: ASCII whitespace is ignored, padding is optional, and text that is not base64 throws a DOMException named InvalidCharacterError. The result is a string of code units 0 to 255. Tested with the Web Platform Tests' fetch/data-urls/resources/base64.json (wpt/run.sh).tests/web.js
btoaimplementedThe HTML standard's btoa: a string of code units 0 to 255 as base64 with padding; a code unit above 255 throws a DOMException named InvalidCharacterError.tests/web.js
DOMExceptionimplementedWebIDL's DOMException: a global constructor of (message, name) whose prototype inherits Error.prototype, with the getters name, message and code (the legacy code table), @@toStringTag "DOMException", and the legacy code constants on the constructor and the prototype. An instance is a branded record (Error.isError gives true): a 128-byte record holding its name and message, and a 24-byte handle slot. The web-platform built-ins throw it: atob's and btoa's InvalidCharacterError. A DOMException is not serializable yet (structuredClone does not exist).tests/web.js
HeadersplannedFrom the Fetch standard, "Headers class"; a built-in of d-web-platform, not built yet.
RequestplannedFrom the Fetch standard, "Request class"; a built-in of d-web-platform, not built yet.
ResponseplannedFrom the Fetch standard, "Response class"; a built-in of d-web-platform, not built yet.
structuredCloneplannedFrom the HTML standard, "structuredClone"; a built-in of d-web-platform, not built yet.
TextDecoderpartialThe Encoding standard's TextDecoder for UTF-8, UTF-16LE and UTF-16BE, with the fatal and ignoreBOM options and streaming decode; every label of the standard resolves, and the other encodings are refused as unsupported, by name. Tested with the Web Platform Tests' encoding/resources/encodings.js (wpt/run.sh), whose entries for the other encodings are expected to fail. An instance is a branded record: a 136-byte record (its encoding, flags and decoder state) and a 24-byte handle slot.tests/encoding.js
TextEncoderimplementedThe Encoding standard's TextEncoder: encode and encodeInto, to UTF-8, and the encoding getter, over Object.prototype with @@toStringTag "TextEncoder". An instance is a branded record with no state of its own: a 112-byte record and a 24-byte handle slot.tests/encoding.js
URLplannedFrom the URL standard, "URL class"; a built-in of d-web-platform, not built yet.
URLSearchParamsplannedFrom the URL standard, "Interface URLSearchParams"; a built-in of d-web-platform, not built yet.
At tinyscript commit 0c5984ec; each test is a program that runs the feature.