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

Re: [WebIDL] troublesome names, property attributes and related issues

From: Cameron McCormack <cam@mcc.id.au>
Date: Mon, 05 Sep 2011 12:28:30 +1000
Message-ID: <4E6433CE.1080804@mcc.id.au>
To: Garrett Smith <dhtmlkitchen@gmail.com>
CC: Allen Wirfs-Brock <allen@wirfs-brock.com>, public-script-coord@w3.org
On 1/09/11 4:06 PM, Garrett Smith wrote:
> Not sure if it was considered, but element ID or NAME will create a
> corresponding property in certain cases, just as it is all too easy to
> make the mistake:
> <input name="submit" type="submit">
> - which creates a `submit` property on the form's `elements` collection.

Yeah, since HTML5 defines HTMLFormElement as [OverrideBuiltins], 
although I understand that is required for compatibility.

[OverrideBuiltins] should probably be designated as one of those 
features recommended only for legacy reasons.

>> Yes, that'd be the way to do it if we want to avoid properties for
>> constants on interface prototype objects for future APIs.  (I don't
>> think using "static" to indiacte "only put it on the interface object"
>> is best, because spec authors would tend not to use it.)
> Allows for more granular specification at the cost of an extra
> internal property and the consideration of when to use it.

I still think this would end up with spec authors needing to be badgered 
into using "static", when (if we accept that we want to move to a world 
where constants should only be on interface objects) it should just be 
the default.
Received on Monday, 5 September 2011 02:29:06 UTC

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