[19] BroadcastChannel オブジェクトは、
EventTarget としての状態に加えて、
次の状態を持ちます。
[14] BroadcastChannel コンストラクターは、
次のようにしなければなりません >>13。DOMString と解釈した結果に設定します。BroadcastChannel オブジェクトを返します。BroadcastChannel
BroadcastChannel インターフェイスのメンバーBroadcastChannel インターフェイス name 属性[22] BroadcastChannel インターフェイスの
name IDL属性は、
次のようにしなければなりません >>13。
[24] BroadcastChannel オブジェクトは、
通信路名を持ちます >>13。
コンストラクターで指定された値が設定されます。この値は以後変更されることはありません。
BroadcastChannel インターフェイス close 属性[31] BroadcastChannel インターフェイスの
close メソッドは、
次のようにしなければなりません >>13。BroadcastChannel設定群オブジェクトの大域オブジェクトのBroadcastChannel群から、
文脈オブジェクトを削除します。BroadcastChannel群から、
文脈オブジェクトを削除します。
[33] BroadcastChannel オブジェクトは、
閉じ済みフラグを持ちます >>13。
初期値は偽です。
[25] 大域オブジェクトは、BroadcastChannel群という集合を持ちます。
初期状態は空です。
[46] イベントループは、BroadcastChannel群という集合
(重複のない順序付きリスト) を持ちます。初期状態は空です。
この集合から項目への参照は弱い参照とし、ごみ収集されたら除去するものとします。
[26] BroadcastChannel BC にイベントリスナーが追加され、
そのイベント型が message の場合、次のようにしなければなりません
>>13。BroadcastChannel設定群オブジェクトの大域オブジェクトのBroadcastChannel群に、
BC を追加します。BroadcastChannel群に、
BC を追加します。
[29] BroadcastChannel BC からイベント型が message
のイベントリスナーがすべて削除された場合、次のようにしなければなりません
>>13。BroadcastChannel設定群オブジェクトの大域オブジェクトのBroadcastChannel群から、
BC を削除します。BroadcastChannel群から、
BC を削除します。
[35] BroadcastChannel を作成して message
のイベントリスナーを登録すると、大域オブジェクトにも登録されることになります。
スクリプトから BroadcastChannel への参照を削除しても、
(まだイベントリスナーが呼び出される可能性が残るため)
大域オブジェクトからの参照は破棄されず、残ったままになります。
このため、必要がなくなったら明示的に close
メソッドを呼び出すことが強く推奨されています >>13。
[66] 送受信の処理全体については、 postMessage を参照。
[37] postMessage は、指定されたメッセージを受信する
BroadcastChannel を、次のように決定します。
[38] 始点設定群と始点通信路の
BroadcastChannelすべてのリストとは、
次の条件をすべて満たすもののリストとしなければなりません >>13。
[50] このリストにおいては、BroadcastChannel設定群オブジェクトの有責イベントループが同じもの同士は古い順としなければなりません
>>13。
[67] なお、対象検索の範囲は、Webブラウザーが1つの利用者エージェントであるとみなす範囲に当然に限定されるものと思われます。
例えば private browsing モードと通常モードとでは異なる利用者エージェントに属すると考えられ、
BroadcastChannel によってその境界を超えることはできません。
[68] Chrome は通常窓とシークレットウィンドウのどちらも BroadcastChannel
を実装していますが、相互に通信することはできません。
[51] このリストの作成は、次のように等価に書き換えることができます。
[1] Web Applications 1.0 r8274 New BroadcastChannel feature to send messages to other tabs in the same origin, so you don't have to abuse the onstorage event, and don't need to use a heavy shared worker for something otherwise trivial. ( ( 版)) http://html5.org/tools/web-apps-tracker?from=8273&to=8274
[2] Web Applications 1.0 r8450 Oops, forgot to make BroadcastChannel inherit from EventTarget ( ( 版)) http://html5.org/tools/web-apps-tracker?from=8449&to=8450
[3] [whatwg] BroadcastChannel should support structured clones ( ( 版)) http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2014-April/254182.html
[4] Web Applications 1.0 r8590 Make BroadcastChannel support structured clones ( ( 版)) http://html5.org/tools/web-apps-tracker?from=8589&to=8590
[5] Web Applications 1.0 r8593 Change the sort order for broadcast channel messages to be easier to implement ( ( 版)) http://html5.org/tools/web-apps-tracker?from=8592&to=8593
[7] Re: [whatwg] BroadcastChannel memory leak ( (Ian Hickson 著, 版)) http://lists.w3.org/Archives/Public/public-whatwg-archive/2014Jun/0034.html
[8] Web Applications 1.0 r8661 Add BroadcastChannel.close() ( ( 版)) http://html5.org/r/8661
[9] 966439 – Implement BroadcastChannel API ( ( 版)) https://bugzilla.mozilla.org/show_bug.cgi?id=966439
[10] Reduce the number of terms BroadcastChannel introductory text uses · whatwg/html@f363b95 ( 版) https://github.com/whatwg/html/commit/f363b9585a7d48c67f0b06895545db588d093ce8
[11] Clarify settings object, realm, and global relationships · whatwg/html@0866f1b ( 版) https://github.com/whatwg/html/commit/0866f1b3f4b4ea5a99a30909e9bbe557dea0b460
[12] Chromium Blog: Chrome 54 Beta: Custom Elements V1, BroadcastChannel, and media platform improvements ( ()) https://blog.chromium.org/2016/09/chrome-54-beta-custom-elements-v1.html
[69] Make BroadcastChannel work in workers, part 2 (annevk著, ) https://github.com/whatwg/html/commit/4bf5ccd8abacc1c6efe48fb7375266d559a8a83b
[18] should BroadcastChannel be disabled if a window does not have access to storage? · Issue #3054 · whatwg/html () https://github.com/whatwg/html/issues/3054