diff --git a/source b/source index 419a2fdbd0e..9aeb9c2618f 100644 --- a/source +++ b/source @@ -78044,11 +78044,17 @@ interface Window : Eve void cancelAnimationFrame(unsigned long handle); void postMessage(any message, USVString targetOrigin, optional sequence<object> transfer = []); + void postMessage(any message, optional WindowPostMessageOptions options); }; Window includes GlobalEventHandlers; Window includes WindowEventHandlers; -callback FrameRequestCallback = void (DOMHighResTimeStamp time); +callback FrameRequestCallback = void (DOMHighResTimeStamp time); + +dictionary WindowPostMessageOptions { + USVString targetOrigin = "/"; + sequence<object> transfer = []; +}; -
  • Let targetWindow be this Window object.

    -
  • Let targetRealm be targetWindow's Realm.

  • @@ -95410,6 +95425,9 @@ function receiver(e) { window, in same-origin cases. See discussion at https://github.com/whatwg/html/issues/1542#issuecomment-233502636 --> +
  • Let targetOrigin be the value of options's targetOrigin member.

  • +
  • If targetOrigin is a single U+002F SOLIDUS character (/), then set targetOrigin to incumbentSettings's origin.

    @@ -95430,6 +95448,9 @@ function receiver(e) {
  • +
  • Let transfer be the value of options's transfer member.

  • +
  • Let serializeWithTransferResult be StructuredSerializeWithTransfer(message, transfer). Rethrow any exceptions.

  • @@ -95483,6 +95504,36 @@ function receiver(e) { +

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

    +
      +
    1. Let targetWindow be this Window object.

    2. + +
    3. Run the window post message steps providing targetWindow, + message and options.

    4. +
    + +

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

    + +
      +
    1. Let targetWindow be this Window object.

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

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

    6. + +
    7. Set options's transfer member to be + transfer.

    8. + +
    9. Run the window post message steps providing + targetWindow, message and options.

    10. +
    +