[whatwg] The "form" attribute

Ian Hickson ian at hixie.ch
Sat Aug 21 17:28:21 PDT 2004

On Fri, 30 Jul 2004, [ISO-8859-1] Olav Junker Kjær wrote:
> I assume that the type of the "form" HTML attribute is IDREF.

Effectively, yes.

> [...] So the DOM property corresponding to the IDREF attribute is of 
> type DOMString, while a sepereate DOM property (which doesn't correspond 
> directly to a HTML attribute) points directly to the reference element.

Note that in DOM2 HTML, the htmlFor attribute was alone; there was no 
attribute pointing to the element. IMHO this is an error -- the ID is 
mostly useless, it's the control that you want, hence the addition of the 
new attribute in WF2.

So when introducing a new attribute, I don't see much value in providing 
access to the DOMString version. Might as well just go straight to making 
the DOM attribute useful.

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

More information about the whatwg mailing list