Skip to content

BroadcastChannel

Generated from idl/messaging.webidl when the site was built at 7aa23e2.

BroadcastChannel is an interface in idl/messaging.webidl, inheriting EventTarget, exposed in Window, Worker. What it does is on MDN; this page says what niso has of it.

The web features its members belong to, each with its Baseline status on the web and how much of the feature’s WPT suite passes in niso (see Web platform support).

Feature On the web In niso Members
BroadcastChannel Widely available Partial 61% 47 of 76 subtests pass 6
constructor
constructor(DOMString name);
int32_t niso_broadcast_channel_new(niso_dom* dom, const char* name, size_t name_len, niso_handle* out);
attribute
readonly attribute DOMString name;
int32_t niso_broadcast_channel_get_name(niso_dom* dom, niso_handle self, niso_str* out);
operation not in JS
[NisoInternal] undefined send(ArrayBuffer message);
int32_t niso_broadcast_channel_send(niso_dom* dom, niso_handle self, const uint8_t* message, size_t message_len);
operation
undefined close();
int32_t niso_broadcast_channel_close(niso_dom* dom, niso_handle self);
attribute
attribute EventHandler onmessage;
int32_t niso_broadcast_channel_get_onmessage(niso_dom* dom, niso_handle self, void** out);
int32_t niso_broadcast_channel_set_onmessage(niso_dom* dom, niso_handle self, niso_event_handler_non_null_fn value_fn, void* value_userdata, niso_drop_fn value_drop);
attribute
attribute EventHandler onmessageerror;
int32_t niso_broadcast_channel_get_onmessageerror(niso_dom* dom, niso_handle self, void** out);
int32_t niso_broadcast_channel_set_onmessageerror(niso_dom* dom, niso_handle self, niso_event_handler_non_null_fn value_fn, void* value_userdata, niso_drop_fn value_drop);

Members the web has, by the BCD keys web-features 3.45.0 lists, that idl/ doesn’t declare. The list is partial: web-features lists only the keys it maps to a feature.

  • postMessage (BroadcastChannel)