From c07b4b713d4a3f1c0a739cd2141fee2a8e9b7afe Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Thu, 14 Feb 2019 15:25:56 +0100 Subject: [PATCH 1/2] Make window.name deal with lack of browsing context Tests: https://github.com/web-platform-tests/wpt/pull/15391. Helps with #4363. --- source | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/source b/source index ed6c04e299e..bdd520018ff 100644 --- a/source +++ b/source @@ -78750,10 +78750,27 @@ dictionary WindowPostMessageOptions : PostMessageOptions
-

The name attribute of the Window object - must, on getting, return the current name of the - browsing context; and, on setting, set the name of the browsing context to the new value.

+

The name attribute's getter, when invoked, must run + these steps:

+ +
    +
  1. If this Window object does not have an associated browsing + context, then return the empty string.

  2. + +
  3. Return this Window object's associated browsing context's name.

  4. +
+ +

The name attribute's setter, when invoked, must run these + steps:

+ +
    +
  1. If this Window object does not have an associated browsing + context, then return.

  2. + +
  3. Set this Window object's associated browsing context's name to the given value.

  4. +

The name gets reset when the browsing context is navigated to another origin.

From f9cc3c22365ca7a7f05553a80b3c37d2e03d9610 Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Tue, 19 Feb 2019 11:42:22 +0100 Subject: [PATCH 2/2] use "window bc" --- source | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/source b/source index bdd520018ff..d138f8c9b6a 100644 --- a/source +++ b/source @@ -78754,22 +78754,22 @@ dictionary WindowPostMessageOptions : PostMessageOptions these steps:

    -
  1. If this Window object does not have an associated browsing - context, then return the empty string.

  2. +
  3. If this Window object's browsing context is + null, then return the empty string.

  4. -
  5. Return this Window object's associated browsing context's name.

  6. +
  7. Return this Window object's browsing + context's name.

The name attribute's setter, when invoked, must run these steps:

    -
  1. If this Window object does not have an associated browsing - context, then return.

  2. +
  3. If this Window object's browsing context is + null, then return.

  4. -
  5. Set this Window object's associated browsing context's name to the given value.

  6. +
  7. Set this Window object's browsing context's + name to the given value.

The name gets reset when the browsing context is