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/close/index.html | 63 ++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 files/ja/web/api/broadcastchannel/close/index.html (limited to 'files/ja/web/api/broadcastchannel/close') diff --git a/files/ja/web/api/broadcastchannel/close/index.html b/files/ja/web/api/broadcastchannel/close/index.html new file mode 100644 index 0000000000..d573ea251b --- /dev/null +++ b/files/ja/web/api/broadcastchannel/close/index.html @@ -0,0 +1,63 @@ +--- +title: BroadcastChannel.close() +slug: Web/API/BroadcastChannel/close +tags: + - API + - Broadcast Channel API + - BroadcastChannel + - Experimental + - HTML API + - Method + - Reference +translation_of: Web/API/BroadcastChannel/close +--- +

{{APIRef("BroadCastChannel API")}}

+ +

BroadcastChannel.close() は、基礎となるチャネルへの接続を終了し、オブジェクトをガベージコレクションできるようにします。 このチャンネルがもう必要ないことをブラウザーが知る他の方法はないので、これは実行するのに必要なステップです。

+ +

{{AvailableInWorkers}}

+ +

構文

+ +
var str = channel.close();
+
+ +

+ +
// チャンネルに接続
+var bc = new BroadcastChannel('test_channel');
+
+// その他の操作(postMessage など)
+
+// 終了したら、チャンネルから切断します
+bc.close();
+
+ +

仕様

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

ブラウザーの互換性

+ + + +

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

+ +

関連情報

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