Chapter 13. Surviving events

This chapter covers

  • Why events are such an issue
  • Techniques for binding and unbinding events
  • Triggering events
  • Using custom events
  • Event bubbling and delegation

The management of DOM events should be relatively simple, but, as you may have guessed by the fact that we’re devoting an entire chapter to it, sadly it’s not.

Although all browsers provide relatively stable APIs for managing events, they do so with differing approaches and implementations. And even beyond the challenges posed by browser differences, the features that are provided by the browsers are insufficient for most of the tasks that need to be handled by even somewhat complex applications.

Because of these shortcomings, JavaScript libraries ...

Get Secrets of the JavaScript Ninja now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.