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

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