From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/ja/web/api/broadcastchannel/name/index.html | 65 +++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 files/ja/web/api/broadcastchannel/name/index.html (limited to 'files/ja/web/api/broadcastchannel/name') diff --git a/files/ja/web/api/broadcastchannel/name/index.html b/files/ja/web/api/broadcastchannel/name/index.html new file mode 100644 index 0000000000..f7d0345525 --- /dev/null +++ b/files/ja/web/api/broadcastchannel/name/index.html @@ -0,0 +1,65 @@ +--- +title: BroadcastChannel.name +slug: Web/API/BroadcastChannel/name +tags: + - Broadcast Channel API + - BroadcastChannel + - Experimental + - HTML API + - Property + - Read-only + - Reference +translation_of: Web/API/BroadcastChannel/name +--- +

{{APIRef("BroadCastChannel API")}}

+ +

読み取り専用の BroadcastChannel.name プロパティは、指定されたチャンネルをその名前で一意に識別する {{domxref("DOMString")}} を返します。 この名前は作成時に {{domxref("BroadcastChannel.BroadCastChannel", "BroadcastChannel()")}} コンストラクタに渡されるため、読み取り専用です。

+ +

{{AvailableInWorkers}}

+ +

構文

+ +
var str = channel.name;
+
+ +

+ +
// チャンネルに接続
+var bc = new BroadcastChannel('test_channel');
+
+// その他の操作(postMessage など)
+
+// チャンネル名をコンソールに記録します
+console.log(bc.name); // "test_channel"
+
+// 終了したら、チャンネルから切断します
+bc.close();
+ +

仕様

+ + + + + + + + + + + + + + +
仕様状態コメント
{{SpecName('HTML WHATWG', "comms.html#dom-broadcastchannel-name", "BroadcastChannel.name")}}{{Spec2('HTML WHATWG')}}初期定義
+ +

ブラウザーの互換性

+ + + +

{{Compat("api.BroadcastChannel.name")}}

+ +

関連情報

+ + -- cgit v1.2.3-54-g00ecf