W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2008

[whatwg] Placeholder option for text input boxes

From: Maciej Stachowiak <mjs@apple.com>
Date: Wed, 01 Oct 2008 17:11:28 -0700
Message-ID: <1BB057AD-D38C-4BEB-8C20-BB3B5D19F6FF@apple.com>

On Oct 1, 2008, at 10:27 AM, Aaron Boodman wrote:

> On Wed, Oct 1, 2008 at 10:05 AM, Kristof Zelechovski
> <giecrilj at stegny.2a.pl> wrote:
>> Please.  This thread is not abort how to write JavaScript code in  
>> general.
>> It is about how to write the feature detection code.  This kind of  
>> code
>> should be especially robust and relying on deprecated features does  
>> not make
>> it more so.
>
> Ok, let's separate out the 'how people should program' part from the
> 'what we will support part'. My opinion is that input.placeholder
> should be supported, because it is consistent with how everything else
> works.
>
> I don't think that most web developers even know that accessing
> attributes as properties is deprecated, and would be surprised that
> setting input.placeholder does nothing.

We don't have a placeholder property in the interface for HTML <input>  
elements, but this is due to oversight and lack of subsequent demand.  
It was not meant to be a principled stand on the merits of DOM  
attributes. Personally I think using getAttribute and setAttribute for  
everything is a painful and error-prone coding style.

Regards,
Maciej
Received on Wednesday, 1 October 2008 17:11:28 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:06 UTC