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

On 4/15/14 10:10 PM, Adam Barth wrote:
> That's a slippery notion because sometimes |w| acts like the container
> and sometimes it acts like the thing contained.

Yes, this is a serious problem with the web platform. I wish we had 
distinct objects for "the navigation context" and "the global currently 
inside the navigation context".

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.

>     I guess one could just key it on the Document involved....
>
> Assuming you're in the same origin and can see the Document.

Sure.  In the cases when you're not, you don't get to key things on it. 
  That seems fine to me.  In a world where we had a separate navigation 
context and global, you wouldn't be able to key on the global in this 
situation either.

> Are you
> even allowed to know always when an iframe navigates to another page?

Afaict, yes.  The "load" event on the iframe element itself fires for 
navigations no matter what triggered the navigation or where the 
navigation is to.

-Boris

Received on Wednesday, 16 April 2014 02:19:57 UTC