Make AudioNode and EventTarget and onaudioprocess an EventHandler
authorEhsan Akhgari <ehsan@mozilla.com>
Fri, 15 Mar 2013 18:30:29 -0400
changeset 271 c68c2551f6c8
parent 270 38125358ffc1
child 272 e26b49247d95
Make AudioNode and EventTarget and onaudioprocess an EventHandler

This fixes https://www.w3.org/Bugs/Public/show_bug.cgi?id=20764.
webaudio/specification.html
--- a/webaudio/specification.html	Mon Mar 11 17:48:08 2013 -0400
+++ b/webaudio/specification.html	Fri Mar 15 18:30:29 2013 -0400
@@ -1276,6 +1276,12 @@
 value explicitly.  <em>block-size</em> is defined to be 128 sample-frames which corresponds to roughly 3ms at a sample-rate of 44.1KHz.
 </p>
 
+<p>
+AudioNodes are <em>EventTarget</em>s, as desribed in <cite><a href="http://dom.spec.whatwg.org/">DOM</a></cite>
+<a href="#DOM">[DOM]</a>.  This means that it is possible to dispatch events to AudioNodes the same
+way that other EventTargets accept events.
+</p>
+
 <div class="block">
 
 <div class="blockTitleDiv">
@@ -1284,7 +1290,7 @@
 <div class="blockContent">
 <pre class="code"><code class="idl-code">
 
-interface <dfn id="dfn-AudioNode">AudioNode</dfn> {
+interface <dfn id="dfn-AudioNode">AudioNode</dfn> : EventTarget {
 
     void connect(AudioNode destination, optional unsigned long output = 0, optional unsigned long input = 0);
     void connect(AudioParam destination, optional unsigned long output = 0);
@@ -2365,7 +2371,7 @@
 
 interface <dfn id="dfn-ScriptProcessorNode">ScriptProcessorNode</dfn> : AudioNode {
 
-    attribute EventListener onaudioprocess;
+    attribute EventHandler onaudioprocess;
 
     readonly attribute long bufferSize;
 
@@ -5248,6 +5254,9 @@
 <div class="section" id="normative-references">
 <h3 id="Normative-references">A.1 Normative references</h3>
 <dl>
+  <dt id="DOM">[DOM] </dt>
+  <dd><a href="http://dom.spec.whatwg.org/">DOM</a>,
+      A. van Kesteren, A. Gregor, Ms2ger. WHATWG.</dd>
   <dt id="RFC2119">[RFC2119] </dt>
     <dd>S. Bradner. <a
       href="http://www.ietf.org/rfc/rfc2119.txt"><cite><span>Key words for use