web + ai spec polyfill testbed
Proposed browser standards like navigator.modelContext (WebMCP), isolated <web-island> elements, and Connection-Allowlist sound good in explainer docs, but teams cannot tell how ergonomic or costly they are until running real code against them. A live conformance harness tests those polyfills side by side in any current browser and measures exact overhead before engines ship everything natively.
Hypothesis
Exercising draft Web + AI browser proposals (
navigator.modelContext,<web-island>+ElementInternals, andConnection-Allowlist) in executable polyfill test suites surfaces naming conflicts and security gaps far earlier than reading explainer docs.
What confirms it: All 15 structured assertions execute reproducibly with PerformanceObserver timing across engines and verify live HTTP Connection-Allowlist: () frame blocking.
What falsifies or bounds it: Polyfills diverge on subtle browser timing semantics (Connection-Allowlist pre-connection DNS blocking, native <web-island> cross-origin paint isolation) that JavaScript cannot replicate.
What this lab tests
Spec Polyfill Testbed (GitHub) runs 15 structured assertions with PerformanceObserver timing across polyfilled navigator.modelContext, <web-island> with ElementInternals, and declarative Connection-Allowlist rules alongside a live HTTP Connection-Allowlist: () probe.
Open questions
- Which polyfill assertions fail ONLY because of missing engine hooks (such as pre-connect allowlists or cross-origin intrinsic sizing)?
- Can this testbed generate WPT-shaped conformance cases cleanly as drafts stabilize?
Iteration log
- — Shipped 15-assertion interactive polyfill suite across WebMCP,
<web-island>, andConnection-Allowlistwith live header probe. - — Moved the 15-assertion conformance matrix and polyfill workbench ahead of setup docs for 700px embeds, added CSP-safe DOM syntax highlighting to code and JSON wire panes, hardened responsive wrapping, and routed all static assets through the Worker with
Cache-Control: no-cacheand 19 passing tests.
Primitives tested: Custom Elements v1, ElementInternals, navigator.modelContext Polyfill, PerformanceObserver, Connection-Allowlist.
This is an active lab under /labs/ and stays off the main RSS feed until graduated into a full essay.