This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 25413 - BroadcastChannel: what's the use case for MessageEvent.channel
Summary: BroadcastChannel: what's the use case for MessageEvent.channel
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-22 18:00 UTC by Jonas Sicking (Not reading bugmail)
Modified: 2014-04-30 00:04 UTC (History)
2 users (show)

See Also:


Attachments

Description Jonas Sicking (Not reading bugmail) 2014-04-22 18:00:41 UTC
It seems to always be the same as .target when a message is fired at a BroadcastChannel.

The only feature that it seems to provide is the ability to test if a MessageEvent was fired at a broadcast channel, as opposed to a window/worker/messageport/etc. That can be easily accomplished by testing

event.target instanceof BroadcastChannel
Comment 1 Ian 'Hixie' Hickson 2014-04-22 18:22:19 UTC
I guess we could add a "name" attribute to BroadcastChannel and remove "channel" from MessageEvent, sure. Should I go ahead and do that?
Comment 2 Jonas Sicking (Not reading bugmail) 2014-04-22 18:33:49 UTC
Please do.
Comment 3 contributor 2014-04-30 00:04:37 UTC
Checked in as WHATWG revision r8589.
Check-in comment: Instead of MessageEvent.channel, use MessageEvent.target.name.
http://html5.org/tools/web-apps-tracker?from=8588&to=8589