Web APIs
BroadcastChannel()
Creates a named channel for eligible contexts within a compatible storage partition.
Formal Syntax & Structure
javascript syntaxjavascript
new BroadcastChannel(name)Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| name | string | Channel name. |
Return Value
BroadcastChannel
Creates a named channel for eligible contexts within a compatible storage partition.
Working Example
Example Snippetjavascript
(async () => {const channel=new BroadcastChannel("v15-lab");try{console.log(channel.name);}finally{channel.close();}})()