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

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>25795</bug_id>
          
          <creation_ts>2014-05-19 07:01:56 +0000</creation_ts>
          <short_desc>&lt;img&gt; error/loadend are always simple events</short_desc>
          <delta_ts>2014-06-16 10:50:06 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#img-load</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>zcorpan</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>106308</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2014-05-19 07:01:56 +0000</bug_when>
    <thetext>Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/edits.html
Multipage: http://www.whatwg.org/C#img-load
Complete: http://www.whatwg.org/c#img-load
Referrer: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html

Comment:
error/loadend are always simple events
&quot;first fire a simple event named error at the img element and then fire a
simple event named loadend at the img element.&quot;

Why not use progress events for error/loadend here in the same-origin case?

Posted from: 210.95.255.149 by simonp@opera.com
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/537.36 OPR/21.0.1432.48 (Edition Next)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106615</commentid>
    <comment_count>1</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-05-21 20:23:09 +0000</bug_when>
    <thetext>What would it mean for them to be progress events?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106700</commentid>
    <comment_count>2</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2014-05-23 10:18:12 +0000</bug_when>
    <thetext>They would use ProgressEvent instead of just Event. In XHR they use ProgressEvent. &lt;img&gt; seems to switch between ProgressEvent and Event depending on origin, except error/loadend which are always Event. I think they would expose the same information as the last &quot;progress&quot; event.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>106736</commentid>
    <comment_count>3</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-05-23 19:54:20 +0000</bug_when>
    <thetext>Do &quot;error&quot; and &quot;loadend&quot; normally expose the last &quot;progress&quot; event&apos;s information?

If they do normally do that, then sure...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107842</commentid>
    <comment_count>4</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2014-06-16 10:06:22 +0000</bug_when>
    <thetext>Thinking about this some more, it seems simpler and possibly safer to always use Event for error, and not fire &apos;progress&apos; at all until dimensions are known (it would be confusing anyway to fire &apos;progress&apos; events for two ongoing fetches in the parallel loading case).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107847</commentid>
    <comment_count>5</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2014-06-16 10:50:06 +0000</bug_when>
    <thetext>Fire &apos;progress&apos; event only for the current request.
https://github.com/ResponsiveImagesCG/picture-element/commit/22efd4478d7714ac12fd128ca2c455d0f91f42a4</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>