- From: Garrett Smith <dhtmlkitchen@gmail.com>
- Date: Sat, 15 Sep 2007 22:06:33 -0700
Yes, I was assuming. That was my mistake. type is in fact a DOM property, not an attribute. Should have thought twice before posting. On 9/15/07, Magnus Kristiansen <magnusrk+whatwg at pvv.org> wrote: > On Fri, 14 Sep 2007 02:52:33 +0200, Garrett Smith <dhtmlkitchen at gmail.com> > wrote: > > > Regarding the [type] attribute: > > ================================================ > > interface HTMLTextAreaElement : HTMLElement { > > attribute DOMString defaultValue; > > readonly attribute HTMLFormElement form; > > attribute DOMString accessKey; > > attribute long cols; > > attribute boolean disabled; > > attribute DOMString name; > > attribute boolean readOnly; > > attribute long rows; > > attribute long tabIndex; > > readonly attribute DOMString type; > > ================================================ > > > > What does the |type| attribute do? > > Input has .type, to mirror the attribute. The fact that both select > (redundant with .multiple) and textarea (always the same) also have .type > suggests to me it was intended to allow a unified view of all form > controls. You can check .type directly without having to bother with > checking the .tagName or similar first. > > -- > Magnus Kristiansen > "Don't worry; the Universe IS out to get you." > -- Programming is a collaborative art. -- Programming is a collaborative art.
Received on Saturday, 15 September 2007 22:06:33 UTC