Bug 86238 - e.preventDefault on a load error event should silent console spew
Summary: e.preventDefault on a load error event should silent console spew
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 86263
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-11 11:39 PDT by Aaron Boodman
Modified: 2012-05-11 15:40 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aaron Boodman 2012-05-11 11:39:07 PDT
var img = new Image();
img.onerror = function(e) {
  e.preventDefault();
}
img.src = "non-existant-url";

The following code creates a console error message. There are many cases where code like this might be used to integrate components that may or may not be present. In such cases, the load error isn't a true error, and it would be nice to be able to silence it.
Comment 1 Mihai Parparita 2012-05-11 11:59:42 PDT
I think the console spew might happen via the inspector directly, before the event is dispatched (at least, if I add a logging statement in the error event handler, it gets output after the red 'GET <url>' line).
Comment 2 Aaron Boodman 2012-05-11 15:40:05 PDT
I'm just closing this in favor of 86263.