html5/spec Overview.html,1.1090,1.1091

Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv19466

Modified Files:
	Overview.html 
Log Message:
Make addCueRange() have an identifier so that people don't have to use currying. (Re: re-thinking 'cue ranges') (credit: ds) (whatwg r1902)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.1090
retrieving revision 1.1091
diff -u -d -r1.1090 -r1.1091
--- Overview.html	22 Jul 2008 02:57:51 -0000	1.1090
+++ Overview.html	22 Jul 2008 09:27:04 -0000	1.1091
@@ -17509,7 +17509,7 @@
            attribute unsigned long <a href="#currentloop" title=dom-media-currentLoop>currentLoop</a>;
 
   // cue ranges
-  void <a href="#addcuerange" title=dom-media-addCueRange>addCueRange</a>(in DOMString className, in float start, in float end, in boolean pauseOnExit, in <a href="#voidcallback">VoidCallback</a> enterCallback, in <a href="#voidcallback">VoidCallback</a> exitCallback);
+  void <a href="#addcuerange" title=dom-media-addCueRange>addCueRange</a>(in DOMString className, in DOMString id, in float start, in float end, in boolean pauseOnExit, in <a href="#cuerangecallback">CueRangeCallback</a> enterCallback, in <a href="#cuerangecallback">CueRangeCallback</a> exitCallback);
   void <a href="#removecueranges" title=dom-media-removeCueRanges>removeCueRanges</a>(in DOMString className);
 
   // controls
@@ -19061,6 +19061,13 @@
    <dd>A group of related ranges can be given the same class name so that
     they can all be removed at the same time.
 
+   <dt>An identifier
+
+   <dt>
+
+   <dd>A string can be assigned to each cue range for identification by
+    script. The string need not be unique and can contain any value.
+
    <dt>A start time
 
    <dt>An end time
@@ -19089,20 +19096,20 @@
 
   <p>The <dfn id=addcuerange
    title=dom-media-addCueRange><code>addCueRange(<var
-   title="">className</var>, <var title="">start</var>, <var
-   title="">end</var>, <var title="">pauseOnExit</var>, <var
-   title="">enterCallback</var>, <var
+   title="">className</var>, <var title="">id</var>, <var
+   title="">start</var>, <var title="">end</var>, <var
+   title="">pauseOnExit</var>, <var title="">enterCallback</var>, <var
    title="">exitCallback</var>)</code></dfn> method must, when called, add a
    <a href="#cue-ranges0">cue range</a> to the <a href="#media7">media
    element</a>, that cue range having the class name <var
-   title="">className</var>, the start time <var title="">start</var> (in
-   seconds), the end time <var title="">end</var> (in seconds), the "pause"
-   boolean with the same value as <var title="">pauseOnExit</var>, the
-   "enter" callback <var title="">enterCallback</var>, the "exit" callback
-   <var title="">exitCallback</var>, and an "active" boolean that is true if
-   the <a href="#current0">current playback position</a> is equal to or
-   greater than the start time and less than the end time, and false
-   otherwise.
+   title="">className</var>, the identifier <var title="">id</var>, the start
+   time <var title="">start</var> (in seconds), the end time <var
+   title="">end</var> (in seconds), the "pause" boolean with the same value
+   as <var title="">pauseOnExit</var>, the "enter" callback <var
+   title="">enterCallback</var>, the "exit" callback <var
+   title="">exitCallback</var>, and an "active" boolean that is true if the
+   <a href="#current0">current playback position</a> is equal to or greater
+   than the start time and less than the end time, and false otherwise.
 
   <p>The <dfn id=removecueranges
    title=dom-media-removeCueRanges><code>removeCueRanges(<var
@@ -19170,7 +19177,8 @@
     <p>Invoke all the non-null "exit" callbacks for all of the <a
      href="#cue-ranges0" title="cue range">cue ranges</a> in <var
      title="">other ranges</var> that have their "active" boolean set to
-     "true" (active), in list order.
+     "true" (active), in list order, passing their identifier as the
+     callback's only argument.
    </li>
    <!-- XXX queue -->
 
@@ -19178,7 +19186,8 @@
     <p>Invoke all the non-null "enter" callbacks for all of the <a
      href="#cue-ranges0" title="cue range">cue ranges</a> in <var
      title="">current ranges</var> that have their "active" boolean set to
-     "false" (inactive), in list order.
+     "false" (inactive), in list order, passing their identifier as the
+     callback's only argument.
    </li>
    <!-- XXX queue -->
 
@@ -19192,20 +19201,20 @@
   <!-- XXX the remainder of this subsection may be removed if we ever
   get a way to mark up callbacks in IDL -->
 
-  <p>Invoking a callback (an object implementing the <code><a
-   href="#voidcallback">VoidCallback</a></code> interface) means calling its
-   <code title=dom-VoidCallback-handleEvent><a
-   href="#handleevent">handleEvent()</a></code> method.
+  <p>Invoking a callback (an object implementing one of the following two
+   interfaces) means calling its <code title="">handleEvent()</code> method.
 
   <pre class=idl>interface <dfn id=voidcallback>VoidCallback</dfn> {
-  void <a href="#handleevent" title=dom-voidCallback-handleEvent>handleEvent</a>();
+  void <span title=dom-voidCallback-handleEvent>handleEvent</span>();
+};
+
+interface <dfn id=cuerangecallback>CueRangeCallback</dfn> {
+  void <span title=dom-cueRangeCallback-handleEvent>handleEvent</span>(in DOMString id);
 };</pre>
 
-  <p>The <dfn id=handleevent
-   title=dom-voidCallback-handleEvent><code>handleEvent</code></dfn> method
-   of objects implementing the <code><a
-   href="#voidcallback">VoidCallback</a></code> interface is the entry point
-   for the callback represented by the object.
+  <p>The <dfn id=handleevent title=""><code>handleEvent</code></dfn> method
+   of objects implementing these interfaces is the entry point for the
+   callback represented by the object.
 
   <h5 id=user-interface><span class=secno>4.7.10.10. </span>User interface</h5>
 

Received on Tuesday, 22 July 2008 09:27:41 UTC