Skip to main content
Expresso provides a JavaScript runtime with selected web-like APIs. It is not a browser: DOM, window, cookies, Web Workers, Canvas, and WebGL are not available.

Runtime globals

console is available with the usual log, info, warn, error, debug, trace, dir, table, assert, timing, grouping, and clearing methods.

Fetch

Expresso supports fetch, Headers, FormData, Request, Response, Blob, and AbortController.
The request and response objects support text(), json(), arrayBuffer(), bytes(), blob(), and clone(). Use FormData for string form fields and Headers for case-insensitive request headers. Fetch does not provide browser cookies, browser cache, DOM events, or browser CORS behavior. Check response.ok and response.status explicitly.

Web Streams

Fetch response bodies are exposed as WHATWG-style ReadableStream objects.
ReadableStream supports locked, getReader(), and cancel(). A reader supports read(), cancel(), and releaseLock(). Network response bodies stream incrementally; JavaScript-supplied underlying sources are not supported.

WebSocket

Expresso exposes a WHATWG-style WebSocket for text and binary messaging.
The API exposes url, protocol, extensions, binaryType, readyState, and bufferedAmount, plus send() and close(). Supported events are open, message, error, and close. Connections do not automatically reconnect.

Abort APIs

AbortSignal exposes aborted, reason, onabort, addEventListener, removeEventListener, and throwIfAborted().

Storage

sessionStorage

sessionStorage is synchronous and shared across runtime contexts in the current app process. It is cleared when the app logs out or the process ends.
Use length, key(index), removeItem(key), and clear() to manage values. The store has a 5 MiB total limit and throws QuotaExceededError when exceeded.

AppStorage

AppStorage is persistent, asynchronous, and organized into named scopes. Availability depends on the host providing a storage directory.
The API also supports tables, bulk operations, expiration, usage inspection, clearing scopes, and dropping scopes. Calls reject when storage is unavailable.

URL APIs

URLSearchParams supports append, delete, get, getAll, has, set, sort, entries, keys, values, and forEach.

Performance

The runtime provides performance.now(), timeOrigin, marks, measures, entry queries, and PerformanceObserver for mark and measure entries.