Skip to main content

Module web

Module web 

Source
Expand description

Web-platform globals with no upstream in llrt, written here so the runtime has exactly one implementation of each. Web-platform globals with no upstream in llrt: atob / btoa, structuredClone, performance, FormData, the compression streams and the timers.

The timers are not installed by init: they carry host state across a scheduled callback, so the host installs them with its own [timers::CallbackPolicy].

Modules§

blob_bytes
Reading bytes back out of a Blob or File.
compression
WHATWG CompressionStream / DecompressionStream.
form_data
WHATWG FormData (spec subset, no deps; multipart serialization studied from the read-only llrt reference). append/set/get/ getAll/has/delete/keys/values/entries/forEach; string, Blob or File values. entries/keys/values/[Symbol.iterator] return real live iterators (see super::js_iterator). A file entry reads back as a File carrying the filename it was stored under, and appending a File supplies that filename without repeating it. The class holds entries and nothing else: a host that puts a FormData on the wire reads FormDataJs::entries_slice and serializes with its own multipart writer, and hands parsed bodies back through FormDataJs::from_entries.
js_iterator
The one { value, done } iterator protocol used by every web-platform collection class (Headers, URLSearchParams, FormData).
performance
performance: High Resolution Time, User Timing and the Performance Timeline.
timers
setTimeout / setInterval / clearTimeout / clearInterval / setImmediate / queueMicrotask — native, ctx.spawn-backed (the timer future lives on the host’s VM executor, so callbacks fire between executes and while a script is parked on a host await; dropping the runtime aborts every armed timer).

Functions§

init
Install atob, btoa, structuredClone, performance, FormData and CompressionStream / DecompressionStream.