diff --git a/source b/source index 9aeb9c2618f..862669b2a31 100644 --- a/source +++ b/source @@ -78051,9 +78051,8 @@ interface Window : Eve callback FrameRequestCallback = void (DOMHighResTimeStamp time); -dictionary WindowPostMessageOptions { +dictionary WindowPostMessageOptions : PostMessageOptions { USVString targetOrigin = "/"; - sequence<object> transfer = []; }; -
  • Let targetPort be the port with which this MessagePort is - entangled, if any; otherwise let it be null.

  • +
  • Let transfer be the value of options's transfer member.

  • If transfer contains this MessagePort, then throw a "DataCloneError" @@ -96045,6 +96058,39 @@ interface MessagePort : EventTarget {


    +

    The postMessage(message, + options) method, when invoked on a + MessagePort object must run the following steps:

    +
      +
    1. Let targetPort be the port with which this MessagePort is + entangled, if any; otherwise let it be null.

    2. + +
    3. Run the message port post message steps providing targetPort, + message and options.

    4. +
    + +
    + +

    The postMessage(message, + transfer) method, when invoked on a MessagePort object + must run the following steps:

    + +
      +
    1. Let targetPort be the port with which this MessagePort is + entangled, if any; otherwise let it be null.

    2. + +
    3. Let options be a new instance of PostMessageOptions + object.

    4. + +
    5. Set options's transfer member to be + transfer.

    6. + +
    7. Run the message port post message steps providing + targetPort, message and options.

    8. +
    + +
    +

    The start() method, when invoked, must enable this MessagePort object's port message queue, if it is not already enabled.

    @@ -96937,6 +96983,7 @@ interface DedicatedWorkerGlobalScope : WorkerGlobalScope [Replaceable] readonly attribute DOMString name; void postMessage(any message, optional sequence<object> transfer = []); + void postMessage(any message, optional PostMessageOptions options); void close(); @@ -96965,6 +97012,13 @@ interface DedicatedWorkerGlobalScope : WorkerGlobalScope dedicatedWorkerGlobal. transfer can be passed as a list of objects that are to be transferred rather than cloned. +
    dedicatedWorkerGlobal . postMessage(message [, + options ])
    +
    Clones message and transmits it to the Worker object associated with + dedicatedWorkerGlobal. options can initialized with a transfer + property with a list of objects that are to be transferred rather than cloned.
    +
    dedicatedWorkerGlobal . close()
    Aborts dedicatedWorkerGlobal.
    @@ -96978,9 +97032,11 @@ interface DedicatedWorkerGlobalScope : WorkerGlobalScope worker using the 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.

    + and postMessage() + methods on DedicatedWorkerGlobalScope objects act as if, when invoked, it + immediately invoked the respective postMessage + and postMessage (with options) on the port, + with the same arguments, and returned the same return value.

    To close a worker, given a workerGlobal, run these steps:

    @@ -97672,6 +97728,7 @@ interface Worker : EventTarget { void terminate(); void postMessage(any message, optional sequence<object> transfer = []); + void postMessage(any message, optional PostMessageOptions options); attribute EventHandler onmessage; attribute EventHandler onmessageerror; }; @@ -97704,6 +97761,12 @@ enum WorkerType { "classic", "module" };
    Clones message and transmits it to worker's global environment. transfer can be passed as a list of objects that are to be transferred rather than cloned.
    + +
    worker . postMessage(message [, options ]) +
    Clones message and transmits it to worker's global environment. + options can be initialized with a list of objects specified in the + transfer attribute can be passed as a list of objects that are to be transferred rather than + cloned.
    @@ -97719,10 +97782,12 @@ enum WorkerType { "classic", "module" };

    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() and + postMessage() methods on + Worker objects act as if, when invoked, it immediately invoked the respective + postMessage and + postMessage (with options) on the port, + with the same arguments, and returned the same return value.