[whatwg] Window and WindowProxy

Boris Zbarsky bzbarsky at MIT.EDU
Thu Aug 8 05:00:08 PDT 2013

On 8/8/13 7:22 AM, Boris Zbarsky wrote:
> On 8/8/13 2:11 AM, Ian Hickson wrote:
>> I would imagine most languages other than JavaScript would break that
>> invariant.
> Why are we suddenly worrying about languages other than JavaScript?

Let me try that with less snark.

I believe that WindowProxy is solving an issue specific to the 
JavaScript bindings for the web platform: an issue caused by conflating 
"the object representing the current page" and "the object representing 
a given navigation context".

If I were creating bindings for the web platform in another language, or 
for that matter green-field designing JS bindings, I would simply expose 
those as two separate objects, with a "get the current page" getter on 
the navigation context and a "get the navigation context" getter on the 
object representing a page.

So I'm not terribly worried about how other languages will deal with 
WindowProxy, because I don't really expect them to have a WindowProxy. 
And I'm not terribly worries about how they will deal with indexed 
access on a Window, because I don't expect them to do such a thing at 
all in their bindings...  Just like I don't expect other languages to 
have a global scope polluter.


More information about the whatwg mailing list