[Bug 7626] Spec says: "Note: Removing an event handler content attribute does not reset the corresponding event handler attribute.". In fact browsers will remove or "deactivate" the listener when you remove the HTML attribute. Some browsers reset it to null or undef

http://www.w3.org/Bugs/Public/show_bug.cgi?id=7626


Boris Zbarsky <bzbarsky@mit.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bzbarsky@mit.edu




--- Comment #8 from Boris Zbarsky <bzbarsky@mit.edu>  2009-09-29 15:52:27 ---
So I'm confused.  In Gecko, the <body> examples all put stuff on the window, so
that's presumably what you see going on.  This testcase:

<!DOCTYPE html>
<body>
  <p id="p" onclick="">click me</p>
  <script>
    var p = document.getElementById("p");
    p.onclick = function() { alert('clicked'); }
    p.removeAttribute("onclick");
  </script>

doesn't show an alert when clicking on the text.  So is the point that the
behavior for event listeners on <body> needs to match that?


-- 
Configure bugmail: http://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, 29 September 2009 15:52:40 UTC