ENGINEERING · 04 / 06

Extending the web platform

The web platform is an important computing substrate to bring under the unified model for state, observability, and convergence as the others. An in-place rederivation of its existing semantics via polyfills has to be made — as is the industry tradition — to move responsibility downward through the substrate.

Oxford's work here includes:

01Polyfill

Polyfilling the Fetch API

Adds support for live responses as a mode switch: fetch(url, { live: true }). The core addition is the Live Response module representing the composite implementation of the Live Sessions protocol, the Multi-Response protocol, and the Live State Transfer protocol — in that hierarchy. As a fetch API feature, realtime, interactive experiences emerge directly from the substrate that web applications are built on — rather than by manual construction.

Tags
Fetch APIPolyfillLive ResponseLive SessionsMulti-ResponseLive State Transfer
Repositories
02Polyfill

Polyfilling the port-messaging API family

Adds support for live payloads as a mode switch: postMessage(data, { live: true }). It also supports advanced lifecycle semantics and unifies reply-port implementation across the family. The core addition is the Live State Transfer protocol, bringing the send-by-reference capability to MessageChannel, BroadcastChannel, and the relevant interfaces that implement message ports. These capabilities provide new ways to coordinate distributed application architectures, with the substrate itself absorbing much of the responsibility.

Tags
PolyfillpostMessageMessageChannelBroadcastChannelMessagePortLive State Transfer
Repositories
03Polyfill

Polyfilling the DOM for live queries

Adds support for live queries: document.querySelectorAll(css, { live: true }), and for observability of the isConnected property: Observer.observe(el, 'isConnected', callback), among others. These are driven by the RealDOM Mutation Observer & Live Query engine, designed to directly answer some of the most difficult questions that working with the DOM presents, replacing the limited approximations that the manual approach provides.

Tags
PolyfillDOMquerySelectorAllLive queriesisConnectedRealDOM
Repositories
04Polyfill

Polyfilling the HTML script element

Adds support for the "use live" directive, and the "scoped" attribute — each of which conditions the script into a specific execution mode. The polyfill works by capturing the matching script elements and rewriting them before the native handler sees them — a timing requirement that only the synchronous mode of the RealDOM engine makes possible. The added capabilities enable the most direct way to author modular, composable HTML markup with embedded logic, in the fashion of scoped CSS.

Tags
PolyfillHTML script element"use live"scoped attributeExecution modesRealDOM
Repositories
05Polyfill

Polyfilling the DOM for a namespaced document architecture

Adds support for a namespaced document architecture: <div namespace> — which addresses the DOM's long-standing global-namespace problem. The namespace directive establishes a local resolution scope for IDs within a subtree, providing the most intuitive way to author collision-free modular, composable HTML markup. The polyfill makes it work across the DOM's full range of IDREF attributes, and query selector APIs.

Tags
PolyfillDOMnamespace attributeIDREFQuery selectorsModular HTML
Repositories