[web-audio-api] JSAudioNode should be an EventTarget (#162)

> Originally reported on W3C Bugzilla [ISSUE-17493](https://www.w3.org/Bugs/Public/show_bug.cgi?id=17493) Fri, 15 Jun 2012 01:04:12 GMT
> Reported by Dean Jackson
> Assigned to 

Currently, the spec says this:

https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#JavaScriptAudioNode-section

interface JavaScriptAudioNode : AudioNode {
  attribute EventListener onaudioprocess;

  readonly attribute long bufferSize;
}

An "onaudioprocess" property? This is not the right way to expose this.

Instead, JavaScriptAudioNode should implement EventTarget, and thus get addEventListener, removeEventListener, etc. I'd prefer it if it removed the property, but I guess there is now some legacy content and there are some misguided developers who think that approach is acceptable.

Then there should be a "audioprocess" event (or something like that).

---
Reply to this email directly or view it on GitHub:
https://github.com/WebAudio/web-audio-api/issues/162

Received on Wednesday, 11 September 2013 14:29:06 UTC