W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2012

Re: "var" declarations shadowing properties from Window.prototype

From: Brendan Eich <brendan@mozilla.com>
Date: Sun, 12 Aug 2012 11:02:09 -0700
Message-ID: <5027EFA1.9020800@mozilla.com>
To: Boris Zbarsky <bzbarsky@MIT.EDU>
CC: Allen Wirfs-Brock <allen@wirfs-brock.com>, Cameron McCormack <cam@mcc.id.au>, public-script-coord@w3.org, es-discuss@mozilla.org
Boris Zbarsky wrote:
> On 8/11/12 10:57 PM, Brendan Eich wrote:
>> I think WebIDL and interface-based method definition made onload, 
>> e.g., predefined on
>> window objects, or more recently on Window.prototype. Was this useful?
>
> It's required for web compat, as I said earlier in this thread.  They 
> _could_ perhaps be predefined as data properties set to null,

Right, Brandon Benvie raised this idea. It goes back to the simpler data 
(and masquerading native accessor) model of ur-JS/DOM.

> but data properties which have as a side effect of setting them to a 
> function object the registration of an event listener... which starts 
> to look a lot like an accessor property to me.

It does, unless there's an equivalent "polling" semantics where no 
registration is required, just recurring [[Get]] probes (with caching 
optimizations, whatever -- all unobservable so out of the spec's sight). 
Is there such an equivalent "polling" or "probing" semantics?

/be
Received on Sunday, 12 August 2012 18:02:40 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:06 UTC