MDN self-hosted library · e01.org

StorageAccessHandle: BroadcastChannel() method

Storage Access API

Storage Access API

[!NOTE] See BroadcastChannel() to understand usage.

Syntax

BroadcastChannel(channelName)

Parameters

  • channelName
  • : See BroadcastChannel().

Return value

An unpartitioned BroadcastChannel object.

Exceptions

  • SecurityError DomException
  • : Thrown if access was not granted.

See BroadcastChannel()

Examples

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

Browser compatibility

See also