← v154/add-options-bag-to-websocket-constructor · conformance
critique · rev 1
v154/add-options-bag-to-websocket-constructor
rubric
| dimension | score | severity | evidence |
|---|---|---|---|
| factual-source-fidelity | 5/5 | info | Every load-bearing claim traced to a primary source fetched live 2026-09-20: whatwg/websockets PR #76 diff (verbatim WebSocketInit + constructor IDL + the two routing steps), issue #42 (motivation), Chromium websocket.idl (temporary `any` parameter + TODO crbug 542670554), websocket_init.idl (sequence<DOMString> protocols + flag-gated targetAddressSpace), dom_websocket.cc (WebSocketOptionBagEnabled branch, ParseConstructorOptionsWithBag), runtime_enabled_features.json5 (WebSocketOptionBag experimental), Gerrit CLs 8197225 (merged 2026-08-12), 8256918 (open promote-to-stable), 8294944 (abandoned revert), WPT option-bag.any.js (both tests read), intent thread YwkXWzPUJ7U, vendor positions WebKit#708 / mozilla#1444. |
| milestone-mapping | 5/5 | info | Feature id 5080055102439424 confirmed in the milestone=154 listing under 'Enabled by default' (fetched 2026-09-20); slug add-options-bag-to-websocket-constructor derived from the exact listing name 'Add options bag to WebSocket constructor' per invariant #1. The listing bucket vs the trunk flag state (still experimental, promotion CL open) is documented explicitly in the warn-block rather than smoothed over. |
| completeness | 5/5 | info | The surface is the constructor overload plus one dictionary with one spec member; both get child routes with nine-dimension coverage, the union-routing algorithm is inventoried against the overview, and Chromium's flag-gated targetAddressSpace extension is recorded with a pointer to its own tracked feature (4779920606756864) rather than duplicated. reference-contract.json claims implementation-sufficient with 4 inventory items and 23 sources. |
| explanation-quality | 4/5 | info | The routing table makes the six input shapes and their outcomes explicit, including the two traps: a bare-string protocols member (TypeError per Web IDL sequence conversion — the ChromeStatus summary's own example doesn't match the IDL, called out directly) and the typo-silently-ignored dictionary member behavior. |
| examples | 4/5 | minor | Both-forms, feature-detect/fallback, and negotiation examples; TypeError and silent-typo cases shown as commented-out lines. Array-form usage matches the WPT tests verbatim in spirit; examples are source-derived but not executed locally (no Chromium build with the flag in this environment). |
| browser-compat-fallbacks | 5/5 | info | No BCD key and no webstatus.dev web-feature for the overload — both stated plainly with the queries named; interim tables labelled non-BCD; host-constructor Baseline (widely available) given for orientation only; Safari 'Support' position linked to WebKit#708, Firefox 'No signal' to the ChromeStatus record and mozilla#1444. |
| links-validity | 5/5 | info | Zero plain-text citations; every source label links to the canonical original (spec PR + files view, issue, Gerrit CLs, googlesource IDL/cc/flag files, WPT blob, Groups intent thread, standards-position issues). CPS feature route and all three concept routes HEAD-checked 200 on 2026-09-20. |
| accessibility | 5/5 | info | Single h1 per page, sequential h2 outline, th scope=row/col on all tables, baseline banner role=note with aria-label, iframe title + figcaption, soft hyphen in the long child-page h1 token. |
| responsive-ux | 4/5 | info | overflow-wrap:anywhere on h1/lede/inline code, .table-wrap{overflow-x:auto} around every table, pre blocks scroll internally, iframe max-width:100%; verified via the repo responsive matrix (mobile 360px + desktop 1280px screenshots read) before push. |
| showcase-demo-relationship | 5/5 | info | CPS feature route HEAD-200 with three concept routes (both-forms, negotiation, why-a-dictionary — all 200, 2026-09-20); both-forms embedded on the overview via lazy iframe; the other two linked from the figcaption; caption notes the demo needs the WebSocketOptionBag flag. |
modern-web-guidance consulted
- reference documentation page responsive tables code blocks accessibility — Semantic structure: single h1, ordered headings, labelled tables with th scope, descriptive titles for embedded frames, focus-visible interactive elements. (Applied: single h1 + sequential h2 outline on all three pages, th scope on every table, role=note baseline banner with aria-label, iframe title + figcaption.)
- reference documentation page responsive tables code blocks accessibility — Semantic document structure and native elements over ARIA re-implementation; prioritize readable, resilient markup. (Applied: plain sectioned HTML with native tables/figures/pre-code; no scripting required to read any content.)
- embedding third party iframe lazy loading performance — Defer offscreen/heavy embeds so they don't compete with initial render. (Applied: the showcase demo iframe uses loading="lazy" and sits below the examples fold; no other third-party content is loaded.)
open questions
- Whether WebSocketOptionBag actually ships enabled-by-default in Chrome 154 stable (2026-09-22) depends on CL 8256918 merging and possibly a Finch rollout (finch_name WebSocketOptionBag); the pages document the trunk flag state as of 2026-09-20.
- PR #76's web-compat review (objects that today coerce to "[object Object]" and reject) may change the union shape or add mitigations; the routing table and errors sections would need re-anchoring if the merged text differs.
- Whether protocols will also accept a bare DOMString inside the dictionary (as the ChromeStatus summary example implies) if reviewers change the member type from sequence<DOMString> to (DOMString or sequence<DOMString>) — currently documented strictly per the IDL as written.
follow-up goals
- [high · targeted-fix] When whatwg/websockets PR #76 merges (or changes), re-verify the verbatim IDL quotes and the two constructor routing steps against the merged living-standard text and update the specifications table on all three pages.
- [high · targeted-fix] When CL 8256918 (promote WebSocketOptionBag to stable) merges, update the warn-blocks, baseline banner, and compat tables from 'behind an experimental flag' to the shipped milestone, and re-check the chrome://flags guidance.
- [medium · targeted-fix] When BCD adds a WebSocket constructor options-bag subfeature (and webstatus.dev records a web-feature), replace the interim compat tables with BCD-anchored per-version rows.
- [medium · targeted-fix] Execute the WPT option-bag tests (or the examples) in a flagged Chromium build and confirm the TypeError-on-bare-string and silent-unknown-member behaviors match the Web IDL derivation documented on the WebSocketInit page.