Skip to content

Web APIs

19 Web platform API packages (plus @gjsify/webrtc-native Vala bridge and @gjsify/web-polyfills meta) implemented for GJS using native GNOME libraries.

Web Platform Coverage

34 of 59 web standards

Coverage of relevant W3C and WHATWG standards, including 10 APIs that are explicitly out of scope for desktop GTK apps (Service Worker, FS Access, Web Bluetooth, …).

58% 32 full 2 partial 15 planned 10 out of scope
5 / 5 Full Full Full Full Full 1 / 5 localStorage + sessionStorage Full libgda could back Planned Planned Service Worker companion Out of scope Browser sandbox; GTK uses Gio.File directly Out of scope 5 / 5 Full Full Full Full Full 1 / 1 Full 4 / 5 Full Full Full Full scheduler.postTask — GLib idle could back Planned 2 / 4 file-based; no DOM-Worker shim Partial Full Browser multi-tab concept Out of scope HTTP cache proxy — irrelevant for GTK apps Out of scope 4 / 7 Phase 1: AudioContext + Source + Gain Partial Full Full Full GStreamer encodebin could back Planned no GNOME backend yet — multi-year effort Planned Native apps use ALSA/JACK directly Out of scope 4 / 8 Full Full Full Full Needed for Adwaita component composition Planned Planned Browser render-pipeline specific Out of scope Planned 2 / 5 Full Full Gdk.Seat.grab could back Planned GTK apps use BlueZ directly Out of scope Native apps use libusb/udev directly Out of scope 3 / 5 Full Full Full Trivial via Blob+streams Planned GTK uses Gio.File directly Out of scope 3 / 3 Full Full Full 0 / 3 Gio.Notification candidate Planned GeoClue2 + consent dialog Planned Planned 0 / 3 GLib.Mutex async wrapper Planned Planned Service Worker tier Out of scope
PackageGNOME LibsImplements
abort-controllerAbortController, AbortSignal (.abort, .timeout, .any)
compression-streamsGioCompressionStream, DecompressionStream (gzip/deflate/deflate-raw)
dom-eventsEvent, CustomEvent, EventTarget
dom-exceptionDOMException (WebIDL)
domparserDOMParser.parseFromString with minimal DOM (excalibur-tiled-sized)
eventsourceSoup 3.0EventSource (Server-Sent Events), TextLineStream
fetchSoup 3.0, Gio, GLibfetch(), Request (raw-body via set_request_body_from_bytes), Response, Headers
formdataFormData, File, multipart encoding
gamepadManette 0.2Gamepad, GamepadButton, GamepadEvent, GamepadHapticActuator (dual-rumble)
message-channelMessageChannel, MessagePort (W3C Channel Messaging; backs @gjsify/iframe WebKit bridge and worker_threads cross-process IPC)
streamsReadableStream, WritableStream, TransformStream, TextEncoder/DecoderStream
web-globalsMeta-register for every Web API global
webaudioGst 1.0, GstApp 1.0AudioContext (GStreamer decodebin + playback chain), AudioBufferSourceNode, GainNode, AudioParam
webcryptoGLibSubtleCrypto (AES, RSA-OAEP/PSS, ECDSA, HMAC, PBKDF2, HKDF, ECDH), CryptoKey, getRandomValues, randomUUID
webrtcGst 1.0, GstWebRTC 1.0, GstSDP 1.0Full W3C WebRTC (RTCPeerConnection, RTCDataChannel, RTCRtpSender/Receiver/Transceiver, MediaStream/Track, getUserMedia, RTCDTMFSender, RTCCertificate)
webrtc-nativeGst 1.0, GstWebRTC 1.0Vala/GObject prebuild — main-thread signal bridges consumed by @gjsify/webrtc
websocketSoup 3.0WebSocket, MessageEvent, CloseEvent (NUL-byte-safe text frames, Autobahn-validated)
webassemblyWebAssembly.compile/instantiate/validate/compileStreaming/instantiateStreaming — Promise-API polyfill wrapping SpiderMonkey’s synchronous constructors; auto-detected by --globals auto
webstorageGiolocalStorage, sessionStorage
xmlhttprequestSoup 3.0, GLibXMLHttpRequest (responseType: arraybuffer / blob / json / text / document), FakeBlob + temp-file plumbing for URL.createObjectURL
PackageNotes
@gjsify/adwaita-webWeb Components (AdwWindow, AdwHeaderBar, AdwPreferencesGroup, AdwCard, AdwSwitchRow, AdwComboRow, AdwSpinRow, AdwToastOverlay, AdwOverlaySplitView) + SCSS partials
@gjsify/adwaita-fontsAdwaita Sans TTF files + @font-face CSS
@gjsify/adwaita-iconsAdwaita symbolic icons as importable SVG strings
PackagePurpose
@gjsify/web-polyfillsUmbrella dep — pulls every Web polyfill for scaffolding templates

Web APIs are available as bare specifiers in GJS builds. The Rolldown plugin handles the aliasing automatically:

// This works in GJS — Soup.Session under the hood
const response = await fetch('https://api.example.com/data');
const data = await response.json();
// WebSocket via Soup.WebsocketConnection
const ws = new WebSocket('wss://echo.example.com');
ws.onmessage = (event) => console.log(event.data);
// WebRTC via GStreamer webrtcbin
const pc = new RTCPeerConnection();
const offer = await pc.createOffer();
await pc.setLocalDescription(offer);