diff --git a/source b/source index e4aed77eb44..c6fe89f0786 100644 --- a/source +++ b/source @@ -99976,6 +99976,22 @@ location.href = '#foo'; data-x="window-navigation-api">navigation API, entriesForNavigationAPI, and reactivatedEntry.

+
  • Let window be the Window whose + associated Document is document.

  • + +
  • Let channels be a list of BroadcastChannel objects whose + relevant global object is window.

  • + +
  • Sort channels by the creation order, oldest first.

  • + +
  • For each channel in channels:

    + +
  • +
  • If document's current document readiness is "complete", and document's page showing flag is false, @@ -113696,8 +113712,9 @@ interface BroadcastChannel : EventTarget {

    -

    A BroadcastChannel object has a channel name and a closed flag.

    +

    A BroadcastChannel object has a channel name, a + closed flag and an initially empty queue + message queue.

    The new BroadcastChannel(name) constructor steps are:

    @@ -113725,6 +113742,37 @@ interface BroadcastChannel : EventTarget { worker is not a suspendable worker.

  • +

    To post a serialized message + given a string serialized and a BroadcastChannel channel, + run these steps:

    + +
      +
    1. If channel's closed + flag is true, then abort these steps.

    2. + +
    3. Let targetRealm be destination's relevant realm.

    4. + +
    5. +

      Let data be StructuredDeserialize(serialized, + targetRealm).

      + +

      If this throws an exception, catch it, fire an + event named messageerror at + destination, using MessageEvent, with the origin attribute initialized to the serialization of sourceOrigin, and then + abort these steps.

      +
    6. + +
    7. Fire an event named message at channel, using MessageEvent, + with the data attribute initialized to data + and the origin attribute initialized to the + serialization of sourceOrigin.

    8. +
    + +

    The postMessage(message) method steps are:

    @@ -113751,8 +113799,6 @@ interface BroadcastChannel : EventTarget { match the following criteria: