W3C home > Mailing lists > Public > public-audio@w3.org > July to September 2013

Re: [web-audio-api] It makes no sense to use EventListener for onaudioprocess if ScriptProcessorNode isn't EventTarget (#116)

From: Olivier Thereaux <notifications@github.com>
Date: Wed, 11 Sep 2013 07:29:42 -0700
To: WebAudio/web-audio-api <web-audio-api@noreply.github.com>
Message-ID: <WebAudio/web-audio-api/issues/116/24244307@github.com>
> [Original comment](https://www.w3.org/Bugs/Public/show_bug.cgi?id=20764#4) by Ehsan Akhgari [:ehsan] on W3C Bugzilla. Tue, 19 Feb 2013 06:12:01 GMT

(In reply to [comment #4](#issuecomment-24244301))
> (In reply to [comment #3](#issuecomment-24244297))
> > Also, in that case, we should rename onaudioprocess for consistency as well.
> 
> This would be a breaking API change for shipping versions, so we'd have to
> be careful to move it to the "deprecated" and recommended section if we
> thought it important to change.  Personally, I don't think there's any
> reason it can't still be called onaudioprocess even though it has nothing to
> do with EventListener

webkit can still support the old API I guess, but the onXXX naming convention is used throughout the web platform for things using event targets, and using such a naming scheme will be very surprising to all web developers, so I think that is a really bad idea.

Also the usage of callbacks can enable us clean up the API by accepting the callback as an argument to the createScriptProcessor function, which makes it unnecessary to expose it on ScriptProcessorNode at all.  Speaking of which, I don't think exposing bufferSize on that node type makes much sense either.

---
Reply to this email directly or view it on GitHub:
https://github.com/WebAudio/web-audio-api/issues/116#issuecomment-24244307
Received on Wednesday, 11 September 2013 14:34:34 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:03:24 UTC