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

Re: [web-audio-api] Behavior of multiple connections to same node needs to be explicitly defined (#143)

From: Olivier Thereaux <notifications@github.com>
Date: Wed, 11 Sep 2013 07:29:56 -0700
To: WebAudio/web-audio-api <web-audio-api@noreply.github.com>
Message-ID: <WebAudio/web-audio-api/issues/143/24244524@github.com>
> [Original comment](https://www.w3.org/Bugs/Public/show_bug.cgi?id=17795#9) by Robert O'Callahan (Mozilla) on W3C Bugzilla. Tue, 31 Jul 2012 23:43:16 GMT

That's an interesting point. However, the addEventListener behavior is also bad. It means

var f = function() { alert("hello"); };
for (var i = 0; i < 2; ++i) {
  document.documentElement.addEventListener("click", f, false);
}

behaves differently from

for (var i = 0; i < 2; ++i) {
  document.documentElement.addEventListener("click", function() { alert("hello"); }, false);
}

and

  document.documentElement.addEventListener("click", f, false);
  document.documentElement.removeEventListener("click", f, false);
  document.documentElement.addEventListener("click", f, false);

behaves differently from

  document.documentElement.addEventListener("click", f, false);
  document.documentElement.addEventListener("click", f, false);
  document.documentElement.removeEventListener("click", f, false);

I don't think being consistent with badness is a good thing.

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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:50:11 UTC