<?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>14241</bug_id>
          
          <creation_ts>2011-09-22 11:45:04 +0000</creation_ts>
          <short_desc>&lt;track&gt; Move readyState, onerror, and onload from TextTrack to HTMLTrackElement</short_desc>
          <delta_ts>2011-10-15 00:11:46 +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>HTML5 spec</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/#texttrack</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>blocker</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>14294</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>annevk</cc>
    
    <cc>eoconnor</cc>
    
    <cc>eric.carlson</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>philipj</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>silviapfeiffer1</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>57148</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2011-09-22 11:45:04 +0000</bug_when>
    <thetext>Specification: http://www.whatwg.org/specs/web-apps/current-work/complete/the-iframe-element.html
Multipage: http://www.whatwg.org/C#texttrack
Complete: http://www.whatwg.org/c#texttrack

Comment:
&lt;track&gt; Merge HTMLTrackElement and TextTrack into one interface

Posted from: 2001:4c28:a030:30:223:32ff:fec2:96fa by simonp@opera.com
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_5_8) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.21 Safari/535.2</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57150</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2011-09-22 11:58:24 +0000</bug_when>
    <thetext>I think the API could be better if the TextTrack stuff were moved to the HTMLTrackElement interface and &lt;track&gt; elements are used instead of TextTrack objects. It&apos;s dodgy to have both an element and an object, especially with events and event handlers:

The spec says to fire &apos;load&apos; and &apos;error&apos; on &lt;track&gt; but TextTrack has onload and onerror handlers (nowhere does the spec say to fire &apos;load&apos; or &apos;error&apos; on TextTrack AFAICT).

The spec says to fire &apos;cuechange&apos; on both TextTrack and &lt;track&gt;.

(First I considered whether the spec should make &lt;track onload&gt; reflect TextTrack.onload (like &lt;body onload&gt; reflects window.onload), and only fire the events on the TextTrack object, but then I wondered why there are two objects to begin with.)

We don&apos;t have an element and an object for audio, video, images, etc. We just use the element. Should do the same with &lt;track&gt;.

For in-band tracks, you would create &lt;track&gt; elements and associate them with the &lt;video&gt; without inserting them to the document.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57362</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-09-26 19:42:46 +0000</bug_when>
    <thetext>So what happens when those &lt;track&gt; elements are inserted as children of other &lt;video&gt; elements?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57397</commentid>
    <comment_count>3</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2011-09-27 08:02:02 +0000</bug_when>
    <thetext>Throw an exception when trying to insert them into any document at all, not just as children of other &lt;video&gt; elements.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57504</commentid>
    <comment_count>4</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2011-09-29 12:13:20 +0000</bug_when>
    <thetext>I do not think it is a good idea to introduce such an odd exception to the DOM platform. Maybe just as with StyleSheet the events should only only be dispatched on nodes in the document that caused creation of the StyleSheet.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57505</commentid>
    <comment_count>5</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2011-09-29 12:51:10 +0000</bug_when>
    <thetext>In other words, no error/load event is fired at the TextTrack object, ever? That would certainly be an improvement. In any case, it couldn&apos;t ever fire for anything but a TextTrack associated with a &lt;track&gt; element, as that&apos;s the only thing that loads and parser external resources.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57550</commentid>
    <comment_count>6</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2011-09-30 09:14:59 +0000</bug_when>
    <thetext>We discussed this a bit further and concluded that the spec is fine except onerror and onload should be removed from TextTrack.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57564</commentid>
    <comment_count>7</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2011-09-30 14:56:34 +0000</bug_when>
    <thetext>Shouldn&apos;t we move readyState to HTMLTrackElement as well in that case? It doesn&apos;t make any sense for script-created tracks and for in-band tracks LOADED seems like a bad idea for the same reason that &lt;video&gt; doesn&apos;t have a load event.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57566</commentid>
    <comment_count>8</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-09-30 16:15:09 +0000</bug_when>
    <thetext>That sounds more reasonable (moving the loading mechanic to just the element). I&apos;ll investigate if that&apos;d work.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57745</commentid>
    <comment_count>9</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-10-04 01:04:59 +0000</bug_when>
    <thetext>Yeah, that should work. The text track readiness state wouldn&apos;t change, it just wouldn&apos;t be exposed for in-band tracks (or MutableTextTracks, until I drop them). readState on HTMLTrackElement would just expose the readiness state on its text track.

As far as I can tell, TextTrack.onload and .onerror aren&apos;t used today anyway.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57766</commentid>
    <comment_count>10</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2011-10-04 08:19:31 +0000</bug_when>
    <thetext>Sounds good. I filed http://www.w3.org/Bugs/Public/show_bug.cgi?id=14378 which is entangled with the loading machinery in case you want to do both at the same time.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58264</commentid>
    <comment_count>11</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-10-15 00:11:02 +0000</bug_when>
    <thetext>EDITOR&apos;S RESPONSE: This is an Editor&apos;s Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Accepted
Change Description: see diff given below
Rationale: Did comment 9. It was an easy edit so I didn&apos;t do bug 14378 at the same time.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58265</commentid>
    <comment_count>12</comment_count>
    <who name="">contributor</who>
    <bug_when>2011-10-15 00:11:46 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r6689.
Check-in comment: Move TextTrack.readyState to HTMLTrackElement.
http://html5.org/tools/web-apps-tracker?from=6688&amp;to=6689</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>