StorageAccessHandle: BroadcastChannel() method
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Note:
See BroadcastChannel() to understand usage.
Syntax
js
BroadcastChannel(channelName)
Parameters
Return value
An unpartitioned BroadcastChannel object.
Exceptions
SecurityErrorDomException-
Thrown if access was not granted.
Examples
js
document.requestStorageAccess({ BroadcastChannel: true }).then(
(handle) => {
console.log("BroadcastChannel access granted");
handle.BroadcastChannel(channel_name);
},
() => {
console.log("BroadcastChannel access denied");
},
);
Note: See Using the Storage Access API for a more complete example.
Specifications
| Specification |
|---|
| Extending Storage Access API (SAA) to non-cookie storage # dom-storageaccesshandle-broadcastchannel |
Browser compatibility
| desktop | mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
BroadcastChannel
|
|
|
|
|
|
|
|
|
|
|
|
|
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support