SharedWorkerConnectEventEmptyStringData
- Category
- Miscellaneous
- Type
- No developer-visible change
- Status
- Proposed (Chrome Proposed)
- Intent stage
- None
WPT details: https://wpt.fyi/results/workers/constructors/SharedWorker/connect-event.html
Summary
The data attribute of the SharedWorker connect event is now initialized to the empty string, instead of null, as per the HTML spec.
Motivation
The HTML spec requires the data attribute of the SharedWorker connect event to be initialized to the empty string, but Chromium did not initialize it that way, so its behavior differed from the spec and from Firefox and Safari.
Standards & signals
- Specification: https://html.spec.whatwg.org/multipage/workers.html#run-a-worker
- Firefox: Shipped/Shipping — Stable passes the wpt test.
- Safari: Shipped/Shipping — Stable passes the wpt test.
- Web developers: No signals
- Tracking bug: https://crbug.com/583449815
Ecosystem
- Web Platform Tests: https://wpt.fyi/results/?q=workers%2Fconstructors%2FSharedWorker%2Fconnect-event
- Chrome Platform Showcase: https://chrome-platform-showcase.paulkinlan-ea.deno.net/features
- GenDN reference: https://gendn.paulkinlan-ea.deno.net/features
- chrome.dev demos search: https://www.google.com/search?q=site%3Achrome.dev+SharedWorkerConnectEventEmptyStringData
- MDN Web Docs: https://developer.mozilla.org/en-US/search?q=SharedWorkerConnectEventEmptyStringData
- Baseline status: https://webstatus.dev/?q=SharedWorkerConnectEventEmptyStringData