Re: WindowProxy

On Wed, 23 Sep 2009, James Graham wrote:
> The section on WindowProxy seems slightly unclear.
> * It is not quite clear whether there should be an object called 
> WindowProxy in the global scope. Presumably there shouldn't because 
> there is no WindowProxy interface (and so no IDL) but since this is a 
> bit odd it could be called out explicitly.


> * It is not clear what it means to "proxy all operations to the Window 
> object". I guess it means something like "every time a function is 
> called on the WindowProxy object (including an ECMAScript internal 
> function), instead call it on the Window object".

I've changed the text to not use the word "proxy".

> For these proxied calls it is unclear if the "this" object should be the 
> Window object or the WindowProxy object.

I'm not sure how you could tell the difference.

> * window is a WindowProxy object. Should window instanceof Window return 
> true (I think it should).

Yes, because the 'instanceof' operation in this instance is proxied over 
to the underlying Window, like everything else.

> Per WebIDL InterfaceObject.[[HasInstance]](object) returns true if 
> "[object] is a host object the implements the interface for which 
> [InterfaceObject.prototype] is the interface prototype object". It's 
> unclear if window "implements the interface" defined by Window in the 
> sense meant by WebIDL.

The [[HasInstance]] call is proxied also.

I've added this as an example.

Ian Hickson               U+1047E                )\._.,--....,'``.    fL       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Tuesday, 6 October 2009 02:18:43 UTC