<?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>7843</bug_id>
          
          <creation_ts>2009-10-08 13:49:17 +0000</creation_ts>
          <short_desc>Please make &apos;abort&apos;, &apos; loadend&apos; and &apos;emptied&apos; use &quot;queue a task&quot;. Firing them sync is annoying to implement and doesn&apos;t seem to solve any problem.</short_desc>
          <delta_ts>2010-10-04 13:55:45 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>pre-LC1 HTML5 spec (editor: Ian Hickson)</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#loading-the-media-resource</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>NE</keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>LC</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>philipj</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>zcorpan</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>28131</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2009-10-08 13:49:17 +0000</bug_when>
    <thetext>Section: http://www.whatwg.org/specs/web-apps/current-work/#loading-the-media-resource

Comment:
Please make &apos;abort&apos;, &apos; loadend&apos; and &apos;emptied&apos; use &quot;queue a task&quot;. Firing them sync is annoying to implement and doesn&apos;t seem to solve any problem.

Posted from: 88.131.66.80</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>28328</commentid>
    <comment_count>1</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2009-10-14 08:32:14 +0000</bug_when>
    <thetext>Note that with no synchronous events in the load() method there should be no way of the load() algorithm recursing, so its first step could be removed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>28554</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2009-10-20 09:11:38 +0000</bug_when>
    <thetext>If we make them async, the state of the element will be at odds with the event. For example, &apos;emptied&apos; would fire at a time that doesn&apos;t involve the element being empty. That seems bad, from an API perspective, no?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>28573</commentid>
    <comment_count>3</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2009-10-20 11:14:53 +0000</bug_when>
    <thetext>I&apos;d like to reopen this bug, but can&apos;t see an option to do that (probably need an admin account).

All other events on media elements are async with the actual state and cannot be trusted. In the case of &apos;abort&apos; and &apos;emptied&apos; (&apos;loadend&apos; is no more) the state of the media element is reset before firing them, so there is nothing there which scripts could reasonably depend on.

The main reason I&apos;d like these events to be async is because it would be much easier to implement with all events being treated equally. In an interruptable ECMAScript engine synchronous (from the scripts point of view) event handling requires saving all state and waiting for the handler to finish before continuing. It can be done, but it&apos;s annoying and it would be nice if there were a compelling reason to do it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>28604</commentid>
    <comment_count>4</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2009-10-20 21:52:54 +0000</bug_when>
    <thetext>Ok, done.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>28605</commentid>
    <comment_count>5</comment_count>
    <who name="">contributor</who>
    <bug_when>2009-10-20 21:53:38 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r4212.
Check-in comment: Make &apos;abort&apos; and &apos;emptied&apos; events in load() fire asynchronously.
http://html5.org/tools/web-apps-tracker?from=4211&amp;to=4212
</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>