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:
+For each string serialized from channel's message queue, + post a message with serialized + to channel.
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:
To post a serialized message
+ given a string serialized and a BroadcastChannel
channel,
+ run these steps:
If channel's closed + flag is true, then abort these steps.
Let targetRealm be destination's relevant realm.
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.
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.
The postMessage(message)
method
steps are:
They are eligible for messaging.
The result of running obtain a storage key for non-storage purposes with their relevant settings object equals sourceStorageKey.
Remove source from destinations.
For each destination in destinations, if destination is + not eligible for messaging, perform the following steps:
+If destination's relevant global object is a Window
+ window, enqueue serialized on message queue.
If the size of destination's message queue
+ is above a certain threshold, the user agent may destroy
+ window's associated Document
.
The user agents can set their own threshold (possibly 0) to trigger the
+ Document
destruction.
The Document
to be destroyed here is not fully active
+ (either detached or in bfcache).
Remove destination from destinations.
Sort destinations such that all BroadcastChannel
objects whose
relevant agents are the same are sorted in creation order,
oldest first. (This does not define a complete ordering. Within this constraint, user agents may
@@ -113772,34 +113843,8 @@ interface BroadcastChannel : EventTarget {
For each destination in destinations, queue a global task on the DOM manipulation task source given destination's relevant - global object to perform the following steps:
- -If destination's closed - flag is true, then abort these steps.
Let targetRealm be destination's relevant realm.
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.
Fire an event named message
at destination, using
- MessageEvent
, with the data
attribute
- initialized to data and the origin
- attribute initialized to the serialization of
- sourceOrigin.