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

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 UTC