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

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 ="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:;

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


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