From 089985e86d541b5688e98d9d0281a3ba2fc86e20 Mon Sep 17 00:00:00 2001
From: Dave Tapuska Let targetWindow be this Let targetRealm be targetWindow's Realm. Let targetOrigin be the value of options's If targetOrigin is a single U+002F SOLIDUS character (/), then set
targetOrigin to incumbentSettings's origin. Let transfer be the value of options's Let serializeWithTransferResult be
StructuredSerializeWithTransfer(message, transfer). Rethrow
any exceptions. The Let targetWindow be this Run the window post message steps providing targetWindow,
+ message, and options. The Let targetWindow be this Let options be «[ "targetOrigin" → targetOrigin,
+ "transfer" → transfer ]». Run the window post message steps providing
+ targetWindow, message, and options. Posts a message through the channel. Objects listed in transfer are
transferred, not just cloned, meaning that they are no longer usable on the sending side. The The message port post message steps, given a targetPort, message
+ and options are as follows: Let targetPort be the port with which this Let transfer be the value of options's If transfer contains this
The Let targetPort be the port with which this Run the message port post message steps providing targetPort,
+ message and options. The Let targetPort be the port with which this Let options be «[ "transfer" → transfer ]». Run the message port post message steps providing
+ targetPort, message and options. The Window
object.targetOrigin
member.transfer
member.postMessage(message,
+ options)
method, when invoked on a
+ Window
object, must run the following steps:
+
+
+ Window
object.postMessage(message,
+ targetOrigin, transfer)
method, when invoked on a
+ Window
object, must run the following steps:
+
+
@@ -96276,16 +96315,22 @@ interface MessageChannel {
Window
object.[Exposed=(Window,Worker,AudioWorklet), Transferable]
interface MessagePort : EventTarget {
void postMessage(any message, optional sequence<object> transfer = []);
+ void postMessage(any message, PostMessageOptions options);
void start();
void close();
// event handlers
attribute EventHandler onmessage;
attribute EventHandler onmessageerror;
+};
+
+dictionary PostMessageOptions {
+ sequence<object> transfer = [];
};
. Its value represents the name given to the
worker using the postMessage
(message [, transfer] )postMessage
(message [, options] )
- postMessage(message,
- transfer)
method, when invoked on a MessagePort
object, must
- run the following steps:
-
MessagePort
is
- entangled, if any; otherwise let it be null.transfer
member.MessagePort
, then throw a "DataCloneError
"
@@ -96512,6 +96556,35 @@ interface MessagePort : EventTarget {
+ postMessage(message,
+ options)
method, when invoked on a
+ MessagePort
object must run the following steps:
+
+
+ MessagePort
is
+ entangled, if any; otherwise let it be null.
+
+ postMessage(message,
+ transfer)
method, when invoked on a MessagePort
object
+ must run the following steps:
+
+
+ MessagePort
is
+ entangled, if any; otherwise let it be null.
+
start()
method, when invoked, must
enable this MessagePort
object's port message queue, if it is not
already enabled.postMessage
(message [,
transfer ])postMessage
(message [,
+ options ])Worker
object associated with
dedicatedWorkerGlobal. transfer can be passed as a list of objects that are
to be transferred rather than cloned.Worker
constructor, used primarily for debugging purposes.
The postMessage()
- method on DedicatedWorkerGlobalScope
objects must act as if, when invoked, it
- immediately invoked the method of the same name
- on the port, with the same arguments, and returned the same return value.
The postMessage(message [,
+ transfer] )
and postMessage(message
+ [,options] )
methods on DedicatedWorkerGlobalScope
objects
+ act as if, when invoked, it immediately invoked the respective postMessage(message [, transfer]
+ ) and postMessage(message
+ [,options] )
on the port, with the same arguments, and returned the same return
+ value.
To close a worker, given a workerGlobal, run these steps:
@@ -98139,6 +98222,7 @@ interface Worker : EventTarget { void terminate(); void postMessage(any message, optional sequence<object> transfer = []); + void postMessage(any message, PostMessageOptions options); attribute EventHandler onmessage; attribute EventHandler onmessageerror; }; @@ -98167,7 +98251,8 @@ enum WorkerType { "classic", "module" };terminate
()postMessage
(message [, transfer ])
+ postMessage
(message [, transfer ] )
+ postMessage
(message [, options ] )
All messages received by that port must immediately be retargeted at the Worker
object.
The postMessage()
method on
- Worker
objects must act as if, when invoked, it immediately invoked the method of the same name on the port, with the same
- arguments, and returned the same return value.
The postMessage(message [,
+ transfer ] )
and postMessage(message [, options ]
+ )
methods on Worker
objects act as if, when invoked, it immediately
+ invoked the respective postMessage(message
+ [, transfer ] )
and postMessage(message [, options
+ ] )
on the port, with the same arguments, and returned the same return value.