mozilla

Revision 92190 of element.addEventListener

  • Revision slug: Talk:DOM/element.addEventListener
  • Revision title: element.addEventListener
  • Revision id: 92190
  • Created:
  • Creator: Nickolay
  • Is current revision? No
  • Comment

Revision Content

random notes:

  • I think the "traditional" way should be on a separate page discussing events.
  • The "this" section should be updated to explicitly warn about a common var myObject = {listener: function() { this.doStuff() }, doStuff: function() {alert("yay")} }; addEventListener("load", myObject.listener, false); mistake.
  • registering/removing anonymous functions listeners
  • listener as an object implementing the interface (with possible uses)
  • fourth param, useful for chrome code.

I hope to remember to add this later this week. --Nickolay 14:24, 28 March 2006 (PST)

Revision Source

<p>random notes:
</p>
<ul><li> I think the "traditional" way should be on a separate page discussing events.
</li><li> The "this" section should be updated to explicitly warn about a common <code>var myObject = {listener: function() { this.doStuff() }, doStuff: function() {alert("yay")}  }; addEventListener("load", myObject.listener, false);</code> mistake.
</li><li> registering/removing anonymous functions listeners
</li><li> listener as an object implementing the interface (with possible uses)
</li><li> fourth param, useful for chrome code.
</li></ul>
<p>I hope to remember to add this later this week. --<a href="User:Nickolay">Nickolay</a> 14:24, 28 March 2006 (PST)
</p>
Revert to this revision