BroadcastChannel.name
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since March 2022.
BroadcastChannel.name
읽기 전용 속성은 지정된 채널의 이름을 고유하게 식별하는 문자열을 반환합니다. 이 이름은 생성 시 BroadcastChannel()
생성자에 전달되므로 읽기 전용입니다.
참고 : 이 기능은 Web Worker에서 사용할 수 있습니다.
값
문자열.
예제
js
// 채널에 연결
const bc = new BroadcastChannel("test_channel");
// postMessage 등의 동작들...
// 채널 이름을 콘솔에 로깅
console.log(bc.name); // "test_channel"
// 완료되면 채널 연결 해제
bc.close();
명세서
Specification |
---|
HTML # dom-broadcastchannel-name-dev |
브라우저 호환성
Report problems with this compatibility data on GitHubdesktop | mobile | server | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
name |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
- User must explicitly enable this feature.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
같이 보기
BroadcastChannel.name
이 속한 인터페이스,BroadcastChannel
.