- From: Ian Hickson <ian@hixie.ch>
- Date: Wed, 2 May 2007 01:40:50 +0000 (UTC)
- To: Martijn <martijn.martijn@gmail.com>
- Cc: Maciej Stachowiak <mjs@apple.com>, "T.V Raman" <raman@google.com>, roger@456bereastreet.com, public-html@w3.org
On Wed, 2 May 2007, Martijn wrote: > > 2007/5/1, Maciej Stachowiak <mjs@apple.com>: > > <http://www.whatwg.org/specs/web-apps/current-work/#the-img> > > If the alt attribute is omitted, user agents must treat the element > > as if it had an alt attribute set to the empty string." > > It seems that in that case, this should return true: > <img> > <script> > alert(document.images[0].hasAttribute('alt')); > </script> > > Am I correct? (not sure if that's a good idea, though) The terminology section says: # When it is stated that some element or attribute is ignored, or treated # as some other value, or handled as if it was something else, this refers # only to the processing of the node after it is in the DOM. A user agent # must not mutate the DOM in such situations. HTH, -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 2 May 2007 01:41:03 UTC