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

Re: Getters establish own properties, or why is [NamedPropertiesObject] discouraged?

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Fri, 24 Feb 2012 13:13:15 -0500
Message-ID: <4F47D33B.7040407@mit.edu>
To: public-script-coord@w3.org
On 2/24/12 1:05 PM, Garrett Smith wrote:
> No, using getter/setter instead does not mean that the properties are
> "own".

Per current webidl spec, defining a "getter" or "setter" on the 
interface does mean the properties involved are own properties.  Please 
see the spec.

> In fact, it is often the case where an object's getter or
> setter resides on the prototype chain. For example, the style
> property, in Gecko is a getter on the prototype chain:-
> document.body.hasOwnProperty("style");.

That's not a "getter" in the IDL.

Try something more like this:

   <body name="foo">

Received on Friday, 24 February 2012 18:13:43 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:05 UTC