This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 11497 - Don't fire an "error" event for <img src="">
Summary: Don't fire an "error" event for <img src="">
Status: RESOLVED WONTFIX
Alias: None
Product: HTML WG
Classification: Unclassified
Component: LC1 HTML5 spec (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-08 00:43 UTC by Jonas Sicking (Not reading bugmail)
Modified: 2011-08-04 05:34 UTC (History)
7 users (show)

See Also:


Attachments

Description Jonas Sicking (Not reading bugmail) 2010-12-08 00:43:33 UTC
+++ This bug was initially created as a clone of Bug #11450 +++

The whole reason that we have special handling for <img src="">, rather than just resolving "" against the current base and attempting to load it, is that it is apparently quite common for sites to do:

<img src="<?php echo $top_banner;?>">

where sometimes people forget to set, or opt not to set, $top_banner.

In this case it doesn't make sense to fire an "error" event since no load actually failed.

Instead I propose we change step 5 to say:

"If the element's src attribute's value is the empty string, then set the element to the unavailable state and abort these steps.
Comment 1 Ian 'Hixie' Hickson 2010-12-08 00:59:45 UTC
http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2009-December/024613.html contains data that suggests that we should fire 'error' for compat.

The spec sasys that src="" is invalid anyway, so I'm not really sure it's a big deal if we fire an 'error' event.
Comment 2 Ian 'Hixie' Hickson 2011-01-11 02:38:05 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Rejected
Change Description: no spec change
Rationale: see comment 1
Comment 3 Michael[tm] Smith 2011-08-04 05:34:43 UTC
mass-move component to LC1