W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2006

[whatwg] <img> element comments

From: Matthew Raymond <mattraymond@earthlink.net>
Date: Sat, 04 Nov 2006 16:27:18 -0500
Message-ID: <454D05B6.2020405@earthlink.net>
Lachlan Hunt wrote:
> Ian Hickson wrote:
>> On Fri, 3 Nov 2006, Anne van Kesteren wrote:
>>> * It should probably mention 'img.src = foo' (that loading directly 
>>> starts). I thought that 'img.setAttribute("src", foo)' even did 
>>> different things in browsers (when the element is not yet inserted into 
>>> the document) so reflect might not be accurate.
>> I couldn't find a difference. Any idea what it was?
> 
> I don't know of any difference and I don't think there should be any, 
> even if some implementations currently do.  It would only be confusing 
> for authors if they behaved differently.

   Right. There can be differences between the initial value of an
attribute contained in markup and the instantaneous value in the DOM,
such as the case with <input value=""> or <option selected>, but with
<img>, I can't think of a situation where the |src| value could change
from the initial value in markup. Setting the |src| attribute's
instantaneous value and setting the value in markup are one and the same
in this case.
Received on Saturday, 4 November 2006 13:27:18 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:49 UTC