W3C home > Mailing lists > Public > public-html@w3.org > May 2007

Re: Support Existing Content

From: Maciej Stachowiak <mjs@apple.com>
Date: Tue, 1 May 2007 17:50:51 -0700
Message-Id: <56972A39-0916-4474-A7BA-E8C868D604F3@apple.com>
Cc: "T.V Raman" <raman@google.com>, roger@456bereastreet.com, public-html@w3.org
To: Martijn <martijn.martijn@gmail.com>


On May 1, 2007, at 3:22 PM, 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)

I don't think that is the intent of the requirement (I think the  
"treat...as if" is with respect to rendering and other behavior). I  
agree that it could be made more clear.

Regards,
Maciej
Received on Wednesday, 2 May 2007 00:51:24 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:15:58 GMT