[whatwg] Placeholder option for text input boxes

Benjamin Hawkes-Lewis bhawkeslewis at googlemail.com
Wed Oct 1 06:53:00 PDT 2008


João Eiras wrote:
>> This usage is deprecated because it can not be generalized to all possible attribute names
>> We recommend the use of generic methods on the core Element interface for setting, getting and removing attributes.

[snip]

> Please, don't make such claim again, they are misleading, and clearly
> not realistic.

It may or may not be realistic, but when he says it is "deprecated" 
Kristof is factually correct.

He linked to a Working Draft as a citation, but here's the final DOM 
Level 1 Recommendation:

http://www.w3.org/TR/REC-DOM-Level-1/level-one-html.html#ID-642250288

"HTML attributes are exposed as properties on the element object … for 
compatibility with "DOM Level 0". This usage is deprecated because it 
can not be generalized to all possible attribute names, as is required 
both for XML and potentially for future versions of HTML. We recommend 
the use of generic methods on the core Element interface for setting, 
getting and removing attributes."

Of course, the DOM parts of HTML5 (or whatever spec they end up in) 
could effectively undeprecate this, if desired.

--
Benjamin Hawkes-Lewis



More information about the whatwg mailing list