Add event handler attributes (Bug 17008). Fix IDL to comply with WebIDL spec (Bug17007).
authorAaron Colwell <acolwell@google.com>
Fri, 01 Jun 2012 12:11:11 -0700
changeset 5 e433598d22a7
parent 4 0c4cf4b54490
child 6 9c94dacbbf12
Add event handler attributes (Bug 17008). Fix IDL to comply with WebIDL spec (Bug17007).
media-source/media-source.html
media-source/media-source.xml
--- a/media-source/media-source.html	Mon May 21 15:30:01 2012 -0700
+++ b/media-source/media-source.html	Fri Jun 01 12:11:11 2012 -0700
@@ -276,27 +276,27 @@
     <pre class="idl">
 partial interface HTMLMediaElement {
   // URL passed to src attribute to enable the media source logic.
-  readonly attribute [URL] DOMString <a href="#dom-mediasourceurl">mediaSourceURL</a>;
+  readonly attribute DOMString <a href="#dom-mediasourceurl">mediaSourceURL</a>;
 
   // Manages IDs for appending media to the source.
-  void <a href="#dom-sourceaddid">sourceAddId</a>(in DOMString id, in DOMString type);
-  void <a href="#dom-sourceremoveid">sourceRemoveId</a>(in DOMString id);
+  void <a href="#dom-sourceaddid">sourceAddId</a>(DOMString id, DOMString type);
+  void <a href="#dom-sourceremoveid">sourceRemoveId</a>(DOMString id);
 
   // Returns the time ranges buffered for a specific ID.
-  TimeRanges <a href="#dom-sourcebuffered">sourceBuffered</a>(in DOMString id);
+  TimeRanges <a href="#dom-sourcebuffered">sourceBuffered</a>(DOMString id);
 
   // Append segment data.
-  void <a href="#dom-sourceappend">sourceAppend</a>(in DOMString id, in Uint8Array data);
+  void <a href="#dom-sourceappend">sourceAppend</a>(DOMString id, Uint8Array data);
 
   // Abort the current segment.
-  void <a href="#dom-sourceabort">sourceAbort</a>(in DOMString id);
+  void <a href="#dom-sourceabort">sourceAbort</a>(DOMString id);
 
   // end of stream status codes.
   const unsigned short <a href="#dom-eos_no_error">EOS_NO_ERROR</a> = 0;
   const unsigned short <a href="#dom-eos_network_err">EOS_NETWORK_ERR</a> = 1;
   const unsigned short <a href="#dom-eos_decode_err">EOS_DECODE_ERR</a> = 2;
 
-  void <a href="#dom-sourceendofstream">sourceEndOfStream</a>(in unsigned short status);
+  void <a href="#dom-sourceendofstream">sourceEndOfStream</a>(unsigned short status);
 
   // states
   const unsigned short <a href="#dom-source_closed">SOURCE_CLOSED</a> = 0;
@@ -304,6 +304,10 @@
   const unsigned short <a href="#dom-source_ended">SOURCE_ENDED</a> = 2;
 
   readonly attribute unsigned short <a href="#dom-sourcestate">sourceState</a>;
+
+  [TreatNonCallableAsNull] attribute Function? <a href="#dom-onsourceopen">onsourceopen</a>;
+  [TreatNonCallableAsNull] attribute Function? <a href="#dom-onsourceended">onsourceended</a>;
+  [TreatNonCallableAsNull] attribute Function? <a href="#dom-onsourceclose">onsourceclose</a>;
 };
 
     </pre>
@@ -473,6 +477,29 @@
     <h2 id="event-summary">4. Event Summary</h2>
     <table>
       <thead>
+	<tr>
+	  <th><a href="http://dev.w3.org/html5/spec/webappapis.html#event-handlers" title="event handlers">Event handler</a></th>
+	  <th><a href="http://dev.w3.org/html5/spec/webappapis.html#event-handler-event-type">Event handler event type</a></th>
+	</tr>
+      </thead>
+      <tbody>
+	<tr>
+	  <td><dfn id="dom-onsourceopen"><code>onsourceopen</code></dfn></td>
+	  <td><code><a href="#dom-sourceopen">sourceopen</a></code></td>
+	</tr>
+	<tr>
+	  <td><dfn id="dom-onsourceended"><code>onsourceended</code></dfn></td>
+	  <td><code><a href="#dom-sourceended">sourceended</a></code></td>
+	</tr>
+	<tr>
+	  <td><dfn id="dom-onsourceclose"><code>onsourceclose</code></dfn></td>
+	  <td><code><a href="#dom-sourceclose">sourceclose</a></code></td>
+	</tr>
+      </tbody>
+    </table>
+    <hr>
+    <table>
+      <thead>
         <tr>
           <th>Event name</th>
           <th>Interface</th>
--- a/media-source/media-source.xml	Mon May 21 15:30:01 2012 -0700
+++ b/media-source/media-source.xml	Fri Jun 01 12:11:11 2012 -0700
@@ -274,27 +274,27 @@
     <pre class="idl">
 partial interface HTMLMediaElement {
   // URL passed to src attribute to enable the media source logic.
-  readonly attribute [URL] DOMString <precoderef>mediaSourceURL</precoderef>;
+  readonly attribute DOMString <precoderef>mediaSourceURL</precoderef>;
 
   // Manages IDs for appending media to the source.
-  void <premethodref>sourceAddId</premethodref>(in DOMString id, in DOMString type);
-  void <premethodref>sourceRemoveId</premethodref>(in DOMString id);
+  void <premethodref>sourceAddId</premethodref>(DOMString id, DOMString type);
+  void <premethodref>sourceRemoveId</premethodref>(DOMString id);
 
   // Returns the time ranges buffered for a specific ID.
-  TimeRanges <premethodref>sourceBuffered</premethodref>(in DOMString id);
+  TimeRanges <premethodref>sourceBuffered</premethodref>(DOMString id);
 
   // Append segment data.
-  void <premethodref>sourceAppend</premethodref>(in DOMString id, in Uint8Array data);
+  void <premethodref>sourceAppend</premethodref>(DOMString id, Uint8Array data);
 
   // Abort the current segment.
-  void <premethodref>sourceAbort</premethodref>(in DOMString id);
+  void <premethodref>sourceAbort</premethodref>(DOMString id);
 
   // end of stream status codes.
   const unsigned short <precoderef>EOS_NO_ERROR</precoderef> = 0;
   const unsigned short <precoderef>EOS_NETWORK_ERR</precoderef> = 1;
   const unsigned short <precoderef>EOS_DECODE_ERR</precoderef> = 2;
 
-  void <premethodref>sourceEndOfStream</premethodref>(in unsigned short status);
+  void <premethodref>sourceEndOfStream</premethodref>(unsigned short status);
 
   // states
   const unsigned short <precoderef>SOURCE_CLOSED</precoderef> = 0;
@@ -302,6 +302,10 @@
   const unsigned short <precoderef>SOURCE_ENDED</precoderef> = 2;
 
   readonly attribute unsigned short <precoderef>sourceState</precoderef>;
+
+  [TreatNonCallableAsNull] attribute Function? <precoderef>onsourceopen</precoderef>;
+  [TreatNonCallableAsNull] attribute Function? <precoderef>onsourceended</precoderef>;
+  [TreatNonCallableAsNull] attribute Function? <precoderef>onsourceclose</precoderef>;
 };
 
     </pre>
@@ -454,6 +458,29 @@
     <h2 id="event-summary">4. Event Summary</h2>
     <table>
       <thead>
+	<tr>
+	  <th><a href="http://dev.w3.org/html5/spec/webappapis.html#event-handlers" title="event handlers">Event handler</a></th>
+	  <th><a href="http://dev.w3.org/html5/spec/webappapis.html#event-handler-event-type">Event handler event type</a></th>
+	</tr>
+      </thead>
+      <tbody>
+	<tr>
+	  <td><codedfn>onsourceopen</codedfn></td>
+	  <td><coderef>sourceopen</coderef></td>
+	</tr>
+	<tr>
+	  <td><codedfn>onsourceended</codedfn></td>
+	  <td><coderef>sourceended</coderef></td>
+	</tr>
+	<tr>
+	  <td><codedfn>onsourceclose</codedfn></td>
+	  <td><coderef>sourceclose</coderef></td>
+	</tr>
+      </tbody>
+    </table>
+    <hr />
+    <table>
+      <thead>
         <tr>
           <th>Event name</th>
           <th>Interface</th>