[whatwg] Inconsistent behavior for empty-string URLs

Jonas Sicking jonas at sicking.cc
Wed Dec 9 14:55:53 PST 2009


On Wed, Dec 9, 2009 at 12:14 PM, Nicholas Zakas <nzakas at yahoo-inc.com> wrote:
> Just curious if anyone knows why <img src=""> is the exception in the
> spec, rather than having the same behavior for all elements that
> download resources on page load? As far as I can tell, the spec would
> currently allow self-referencing downloads for the following elements:
>
> * <iframe>
> * <embed>
> * <object>
> * <video>
> * <audio>
> * <source>

As stated. If the other browser vendors are ok with it, I'm ok with
making the empty string mean "don't load" in all these cases. I.e.
treat an empty src/href attribute the same way as an absence of the
attribute (except for <script> which still wouldn't treat it as an
inline script).

/ Jonas



More information about the whatwg mailing list