web/web_apis library

Web platform APIs (a WinterTC subset) for QuickJS runtimes.

Design notes: doc/design/2026-09-13-web-apis.md.

Classes

JsFetchOptions
Network access for JS fetch. Passing this to JsWebApis enables the global fetch and installs the modules it requires. This object, not the module set, is the network policy: see allowUrl.
JsFetchRequest
One HTTP exchange requested by JS fetch.
JsFetchResponse
Result of a JsFetchHandler call.
JsWebApis
Web platform APIs a runtime installs into each JS context.
JsWebModule
One independently installable unit of the Web platform API.
WebApiHost
Web API state of one JS context: retained JS function handles, Dart timers and in-flight host work. Created by JavascriptRuntime.init and released by JavascriptRuntime.releaseHostCaches before the context is freed.

Typedefs

JsFetchHandler = Future<JsFetchResponse> Function(JsFetchRequest request)
Performs a single HTTP exchange for JS fetch.