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

[Bug 17795] Behavior of multiple connections to same node needs to be explicitly defined

From: <bugzilla@jessica.w3.org>
Date: Tue, 31 Jul 2012 23:43:17 +0000
Message-Id: <E1SwM5t-0003N3-3n@jessica.w3.org>
To: public-audio@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=17795

--- Comment #10 from Robert O'Callahan (Mozilla) <roc@ocallahan.org> 2012-07-31 23:43:16 UTC ---
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.

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Tuesday, 31 July 2012 23:43:18 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 31 July 2012 23:43:18 GMT