Bug 161472
Summary: | [META] Implement BroadcastChannel | ||
---|---|---|---|
Product: | WebKit | Reporter: | Yingle <yljia> |
Component: | WebKit Misc. | Assignee: | Chris Dumez <cdumez> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | 709922234, beidson, bugmail, cdumez, david.fahlander, david.malcom.graham, edwardjsabol, feliziani.emanuele, fred.wang, ggaren, hello, ian, koddsson, lwarlow, minijus.l, m.kurz+webkitbugs, nicolas, philip, rbuis, rniwa, sihui_liu, tomac, yljia, youennf, yoyo837, zac.spitzer |
Priority: | P2 | ||
Version: | Safari 9 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Bug Depends on: | 187001, 227919, 227924, 229814, 230164, 230181, 230235, 230236 | ||
Bug Blocks: |
Yingle
https://html.spec.whatwg.org/multipage/comms.html#broadcastchannel
https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Frédéric Wang (:fredw)
Some WPT tests have been imported in 187001, see LayoutTests/imported/w3c/web-platform-tests/webmessaging/.
Rob Buis
Implementing this would also improve some WPT tests that use BroadcastChannel to test some other feature.
Emanuele Feliziani
This provides a simple way to sync functionality across tabs (especially login/logout). Other browsers have had this for years (see https://hacks.mozilla.org/2015/02/broadcastchannel-api-in-firefox-38/ and https://developers.google.com/web/updates/2016/09/broadcastchannel). I hope this gets prioritized soon.
Ryosuke Niwa
In order for us to implement this feature, we need to have the partitioning of BroadcastChannel spec'ed since non-partitioned BroadcastChannel would introduce a new tracking vulnerability.
Philip Jägenstedt
The spec issue is tracked in https://github.com/whatwg/html/aissues/5803 now (filed by rniwa)
Thomas Steiner
Correct spec issue link: https://github.com/whatwg/html/issues/5803 (there was a superfluous ’a’ in the link in the previous comment.
Richard Cooke
Would be great to have this n Safari and not have to fallback to polling IndexedDB.
David Fahlander
Communicating between service worker and DOM windows can be essential for sync use cases in PWAs. Safari is the only modern browser not supporting this.
There is a polyfill for this with its limitations: It doesn't support workers and it doesn't support structured cloning - https://www.npmjs.com/package/broadcastchannel-polyfill.
Polyfilling it for workers is harder to do.
It would be awesome if BroadcastChannel could soon become present in all modern browsers and if only Safari implements it we would be there.
Thomas Steiner
(For folks relying on the `BroadcastChannel` polyfill: it's currently broken in 14.1 due to https://bugs.webkit.org/show_bug.cgi?id=225344.)
Chris Dumez
All implemented via subtasks and enabled by default.