Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Intent to implement: BroadcastChannel API

95 views
Skip to first unread message

Andrea Marchesini

unread,
Sep 24, 2014, 6:43:43 AM9/24/14
to dev-pl...@lists.mozilla.org
Summary: (from the spec) Pages on a single origin opened by the same user in the same user agent but in different unrelated browsing contexts sometimes need to send notifications to each other, for example "hey, the user logged in over here, check your credentials again".
For elaborate cases, e.g. to manage locking of shared state, to manage synchronisation of resources between a server and multiple local clients, to share a WebSocket connection with a remote host, and so forth, shared workers are the most appropriate solution.
For simple cases, though, where a shared worker would be an unreasonable overhead, authors can use the simple channel-based broadcast mechanism described in this section.

Link to standard: http://www.whatwg.org/specs/web-apps/current-work/multipage/web-messaging.html#broadcasting-to-other-browsing-contexts

Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=966439

Platform coverage: All

Preference behind which this will be implemented: dom.broadcastchannel.enabled

Note: Actually I've already implemented this API but I forgot to send this intent to implement email months ago. It has received the first positive review. I hope to land this API soon, if there are no objections.

Andrea Marchesini

unread,
Sep 24, 2014, 6:44:01 AM9/24/14
to dev-pl...@lists.mozilla.org

Jonas Sicking

unread,
Sep 24, 2014, 12:49:21 PM9/24/14
to Andrea Marchesini, dev-platform
Yes!

Though as previously expressed, I don't think we should ship this until it
supports sending Blobs.

But we should definitely land preffed off as soon as patches are reviewed.

/ Jonas
On Sep 24, 2014 3:45 AM, "Andrea Marchesini" <amarc...@mozilla.com>
wrote:
> _______________________________________________
> dev-platform mailing list
> dev-pl...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
>

Mounir Lamouri

unread,
Sep 30, 2014, 6:54:01 AM9/30/14
to dev-pl...@lists.mozilla.org
On Thu, 25 Sep 2014, at 02:49, Jonas Sicking wrote:
> Yes!
>
> Though as previously expressed, I don't think we should ship this until
> it
> supports sending Blobs.

What do other UAs implement?

-- Mounir

Jonas Sicking

unread,
Sep 30, 2014, 8:51:58 PM9/30/14
to Mounir Lamouri, dev-platform
I don't know. Does anyone else implement BroadcastChannel yet?

/ Jonas

Mounir Lamouri

unread,
Oct 1, 2014, 4:47:32 AM10/1/14
to Jonas Sicking, Andrew Overholt, dev-platform
It seems an information that would be worth adding to Intent to
{Implement,Ship}. It's clearly valuable because there is a big
difference in being the last to implement something and the first. Also,
not following exactly the specification would have a different impact in
both cases.

-- Mounir

Anne van Kesteren

unread,
Oct 1, 2014, 4:52:21 AM10/1/14
to Jonas Sicking, dev-platform, Mounir Lamouri
On Wed, Oct 1, 2014 at 2:51 AM, Jonas Sicking <jo...@sicking.cc> wrote:
> I don't know. Does anyone else implement BroadcastChannel yet?

Last activity at Google appears to be four months ago:
https://code.google.com/p/chromium/issues/detail?id=161070 No activity
in other browsers as far as I can tell.

Seems we can safely do this then and upgrade the functionality later.


--
https://annevankesteren.nl/

Jonas Sicking

unread,
Oct 1, 2014, 5:46:36 AM10/1/14
to Anne van Kesteren, dev-platform, Mounir Lamouri
The problem is that the upgraded functionality can't be feature
detected. Which is why I'd rather wait a release until we can
implement the full feature.

/ Jonas

Andrew Overholt

unread,
Oct 1, 2014, 9:55:12 AM10/1/14
to Mounir Lamouri, dev-platform
On 01/10/14 04:46 AM, Mounir Lamouri wrote:
> On Wed, 1 Oct 2014, at 10:51, Jonas Sicking wrote:
>> On Tue, Sep 30, 2014 at 3:54 AM, Mounir Lamouri <mou...@lamouri.fr>
>> wrote:
>>> On Thu, 25 Sep 2014, at 02:49, Jonas Sicking wrote:
>>>> Yes!
>>>>
>>>> Though as previously expressed, I don't think we should ship this until
>>>> it
>>>> supports sending Blobs.
>>>
>>> What do other UAs implement?
>>
>> I don't know. Does anyone else implement BroadcastChannel yet?
>
> It seems an information that would be worth adding to Intent to
> {Implement,Ship}.

Good idea. Done:
https://wiki.mozilla.org/index.php?title=WebAPI%2FExposureGuidelines&diff=1020648&oldid=1003407
.

Andrea Marchesini

unread,
Oct 9, 2014, 8:15:30 AM10/9/14
to Jonas Sicking, dev-platform
My implementation supports sending blobs.
However, the API is still disabled by pref.

----- Original Message -----
> From: "Jonas Sicking" <jo...@sicking.cc>
> To: "Andrea Marchesini" <amarc...@mozilla.com>
> Cc: "dev-platform" <dev-pl...@lists.mozilla.org>
> Sent: Wednesday, September 24, 2014 5:49:21 PM
> Subject: Re: Intent to implement: BroadcastChannel API
>
> Yes!
>
> Though as previously expressed, I don't think we should ship this until it
> supports sending Blobs.
>

Jonas Sicking

unread,
Oct 9, 2014, 12:48:13 PM10/9/14
to Andrea Marchesini, dev-platform
I think that as soon as it's reviewed, we should enable and ship it!

/ Jonas

On Thu, Oct 9, 2014 at 5:14 AM, Andrea Marchesini <amarc...@mozilla.com>
0 new messages