W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2000

Re: HTMLInputElement, type attribute (errata?)

From: Glenn Adams <gadams@vgi.com>
Date: Fri, 11 Aug 2000 12:49:54 -0400
Message-ID: <009a01c003b4$2cfc9040$26020001@vgi.com>
To: "Adrian Cotter" <adrian.cotter@frogdesign.com>
Cc: <www-dom@w3.org>
I don't believe DOM 1 requires setAttribute to produce an exception when
it would be used to modify an attribute which is also exposed through a
distinct property that happens to be readonly. I'd guess the
implementation you refer to is taking an overly conservative view if it
is producing an exception.

If I were implementing this, I would distinguish the semantics of
setAttribute for elements instantiated during the parsing process and
those created explicitly in the DOM. For the former, I would preserve
the readonly semantics for setAttribute implied by their corresponding
properties in the HTML* interfaces; on the other hand, for those created
explicitly, I would not restrict mutation.

Glenn Adams

----- Original Message -----
From: "Adrian Cotter" <adrian.cotter@frogdesign.com>
To: <www-dom@w3.org>
Sent: Thursday, August 10, 2000 8:55 PM
Subject: HTMLInputElement, type attribute (errata?)

> Have a question regarding
> Interface HTMLInputElement
> readonly attribute DOMString type;
> http://www.w3.org/TR/REC-DOM-Level-1/level-one-html.html#ID-882764350
> it seems strange that this attribute is read only. how is able to
create a
> "password" or "hidden" field as opposed to the "text" field, when this
> read only?
> if I do the following I would obviously get an error (as I do in Mac
IE 5):
> var formElement = document.createElement("INPUT");
> formElement.setAttribute("type","hidden");
> I'm I missing something, or is there some other way to create a hidden
> password (or button,etc) element?
> thanks
> adrian cotter
> developer
> frogdesign
Received on Friday, 11 August 2000 12:45:15 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:07 UTC