GO-Ve01
ServicesDevelopersBooksDictionaryPapersWikidataEncyclopediaSearchBabelCareersDeck

StorageAccessHandle: BroadcastChannel() method

Storage Access API

Storage Access API

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

## Syntax

```js-nolint
BroadcastChannel(channelName)
```

### Parameters

- `channelName`
- : See BroadcastChannel().

### Return value

An unpartitioned BroadcastChannel object.

### Exceptions

- `SecurityError` DomException
- : Thrown if access was not granted.

See BroadcastChannel()

## 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](/docs/Web/API/Storage_Access_API/Using) for a more complete example.

## Specifications

## Browser compatibility

## See also

- Document.requestStorageAccess()
- [Using the Storage Access API](/docs/Web/API/Storage_Access_API/Using)

source: MDN Web Docs mirror · page

Cite this

"StorageAccessHandle: BroadcastChannel() method". MDN Web Docs. CC BY-SA 2.5 (MDN). https://developer.mozilla.org/en-US/docs/Web/API/StorageAccessHandle/BroadcastChannel

JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy

Save to pass ·