Expand description
Host implementations of Web APIs for fetchlet guests.
The guest runtime calls these as host operations: a name, a JSON message and byte-store handles. They depend on no JavaScript engine, so QuickJS, Boa and V8 share one implementation of each API.
Structs§
- Decompressor
- The streaming decompressor of
DecompressionStream, for host code such as an HTTP client that decodes aContent-Encoding. - Invocation
- The current invocation: its Web API state and its byte store.
- WebLimits
- Caller budgets for Web API operations. Each is unlimited when
None; the embedder owns the values and documents them with its other limits. - WebState
- Web API state that belongs to one invocation, such as open compression streams. The embedder creates it when an invocation begins and drops it when the invocation ends, which releases everything it holds.
Enums§
- Compression
Format - A compression format of
Decompressor, as the Compression Standard names them. - Error
- A failed Web API operation. Embedders map each kind onto their own guest-visible error codes.
Constants§
- PROTOCOL_
VERSION - The version of the operation names and messages. The guest runtime uses host implementations only when it was built for the same version.
Traits§
- Byte
Handles - The embedder’s byte store for the current invocation, which carries binary data between the guest and the host by handle.
Functions§
- capabilities
- The Web APIs this build implements, reported by the
web.capabilitiesoperation so the guest runtime installs only those globals. - dispatch
- Run a Web API operation, or return
Nonewhenoperationis not one, so the embedder can route its own operations.