W3C home > Mailing lists > Public > www-style@w3.org > April 2005

Re: WHATWG Attribute puzzle

From: Ian Hickson <ian@hixie.ch>
Date: Tue, 5 Apr 2005 14:58:53 +0000 (UTC)
To: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Cc: Matthew Raymond <mattraymond@earthlink.net>, W3C CSS <www-style@w3.org>
Message-ID: <Pine.LNX.4.61.0504051455280.2016@dhalsim.dreamhost.com>

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:36 GMT