<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>86238</bug_id>
          
          <creation_ts>2012-05-11 11:39:07 -0700</creation_ts>
          <short_desc>e.preventDefault on a load error event should silent console spew</short_desc>
          <delta_ts>2012-05-11 15:40:05 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Web Inspector (Deprecated)</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>86263</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Aaron Boodman">aa</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>arv</cc>
    
    <cc>mihaip</cc>
    
    <cc>pfeldman</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>621837</commentid>
    <comment_count>0</comment_count>
    <who name="Aaron Boodman">aa</who>
    <bug_when>2012-05-11 11:39:07 -0700</bug_when>
    <thetext>var img = new Image();
img.onerror = function(e) {
  e.preventDefault();
}
img.src = &quot;non-existant-url&quot;;

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&apos;t a true error, and it would be nice to be able to silence it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>621852</commentid>
    <comment_count>1</comment_count>
    <who name="Mihai Parparita">mihaip</who>
    <bug_when>2012-05-11 11:59:42 -0700</bug_when>
    <thetext>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 &apos;GET &lt;url&gt;&apos; line).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>622045</commentid>
    <comment_count>2</comment_count>
    <who name="Aaron Boodman">aa</who>
    <bug_when>2012-05-11 15:40:05 -0700</bug_when>
    <thetext>I&apos;m just closing this in favor of 86263.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>