Thanks for the PSA Andrew. Since we're going from throwing an exception to not throwing one, this does seem like a safe change.
Reading through the spec, it indeed doesn't seem like broadcasting from an opaque origin should throw, but at the same time, IIUC, this broadcast will also not reach any other browsing contexts, as an opaque origin would be serializable to "null". Do I understand this correctly? Or would two opaque origins in two different browsing contexts be able to BroadcastMessage each other after this change? On Fri, Mar 18, 2022 at 8:31 PM Andrew Williams <[email protected]> wrote: > Hi blink-dev@, > > As implemented in Chrome today, attempting to create a BroadcastChannel > instance in an opaque origin context will result in an exception being > thrown. We plan to ship a minor change that will allow BroadcastChannel > instances to be created and used in these contexts, which will align Chrome > with the HTML standard [1] and with Firefox / Safari. We don’t expect any > breakage as a result of this change, and there is existing web platform > test coverage [2] [3] to ensure that BroadcastChannel works as expected in > opaque origin contexts. A CL implementing the change [4] has been reviewed > and is ready to land, so we expect this to ship with M102. This effort is > tracked by crbug 670024 [5]. > > Let me know if you have any questions. Thank you! > > -Andrew > > [1] > https://html.spec.whatwg.org/multipage/web-messaging.html#broadcasting-to-other-browsing-contexts > > > [2] > https://github.com/web-platform-tests/wpt/blob/master/webmessaging/broadcastchannel/sandbox.html > > [3] > https://github.com/web-platform-tests/wpt/blob/master/webmessaging/broadcastchannel/opaque-origin.html > > [4] https://chromium-review.googlesource.com/c/chromium/src/+/3520021 > [5] https://bugs.chromium.org/p/chromium/issues/detail?id=670024 > > -- > You received this message because you are subscribed to the Google Groups > "blink-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAEa0%2BkVpMwdP8VCujnidyyE9Fr0m41f%2Bdu3kfd7Msd7zNdhKsw%40mail.gmail.com > <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAEa0%2BkVpMwdP8VCujnidyyE9Fr0m41f%2Bdu3kfd7Msd7zNdhKsw%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "blink-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAL5BFfVMwK8ZJU0Hk31%3DGFFDOqanF8obLyf%2BD8FZq4z_rDc%2B7g%40mail.gmail.com.
