Re: WHATWG Attribute puzzle

On Wed, 6 Apr 2005, Lachlan Hunt wrote:
> > > 
> > > No, it won't work, because UAs are still going to have 
> > > type="datetime" within the DOM, even though they are treating it as 
> > > type="text".
> > 
> > I think you mean that the DOM property would be "text" while the 
> > markup would have "date"...
> 
> No, I meant what I said.  Check Mozilla's DOM inspector to confirm that 
> the attribute value in the DOM will match the value written in the 
> markup.

There are three things.

The attribute in the markup. It has the value the author gave (obviously).

The content attribute accessed via the DOM. It is an in-memory 
representation of the attribute in the markup and therefore the same. This 
is what the [type=""] selector matches against.

The DOM attribute (JS property) of the same name. Its value depends on the 
DOM specs. In the case of the <input> element, the value of the DOM 
attribute "type" is "text" unless the type was actually understood by the 
UA. This is what Matthem was refering to, and is what his intriguing 
:dom() pseudo-class would select on.

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

Received on Tuesday, 5 April 2005 14:58:57 UTC