W3C home > Mailing lists > Public > public-script-coord@w3.org > April to June 2014

Re: WindowProxy as the key in ES6 Set/Map/WeakSet/WeakMap

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Wed, 16 Apr 2014 09:14:16 -0400
Message-ID: <534E8228.8000505@mit.edu>
To: David Bruant <bruant.d@gmail.com>, Adam Barth <abarth@chromium.org>
CC: "Mark S. Miller" <erights@google.com>, Rick Waldron <waldron.rick@gmail.com>, Adam Klein <adamk@chromium.org>, "public-script-coord@w3.org" <public-script-coord@w3.org>, Toon Verwaest <verwaest@chromium.org>
On 4/16/14 4:56 AM, David Bruant wrote:
>> Again, my point is that this is a use case people will want a solution
>> for.  We should aim for there being such a solution.
> Is there a reason why `document` doesn't work?

There are two situations in which documents are not in 1-1 
correspondence with globals.

First situation:

   var win = window.open("something");

After that call returns, win.document is an about:blank document.  When 
the document at "something" loads, if it's same-origin with the script 
that did the open() call the new document will replace the about:blank 
document but keep the same global.

Second situation:

   document.open();

This keeps the same document, but creates a new global.

-Boris
Received on Wednesday, 16 April 2014 13:14:50 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:21 UTC