Bug 86238

Summary: e.preventDefault on a load error event should silent console spew
Product: WebKit Reporter: Aaron Boodman <aa>
Component: Web Inspector (Deprecated)Assignee: Nobody <webkit-unassigned>
Status: RESOLVED WONTFIX    
Severity: Normal CC: arv, mihaip, pfeldman
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 86263    
Bug Blocks:    

Aaron Boodman
Reported 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.
Attachments
Mihai Parparita
Comment 1 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).
Aaron Boodman
Comment 2 2012-05-11 15:40:05 PDT
I'm just closing this in favor of 86263.
Note You need to log in before you can comment on or make changes to this bug.