Chapter 10. Events

Events are the lifeblood of the most powerful JavaScript applications. At its core, the browser is an event-based programming platform, and a very nice one at that. Without a firm grasp of JavaScript events, we won't be able to create sophisticated programs, so it's essential that we study how exactly event-based programming fits into the whole JavaScript ecosystem.

In this chapter, we'll talk about events and event-based programming, and we'll look at the two main models that are used for browser event systems. We'll also take a look at the MooTools event system, which unifies these two models and makes cross-browser event-based programming easier and more powerful.

A Loopy World

If you look back at the programs we've worked ...

Get Pro JavaScript with MooTools: Learning Advanced JavaScript Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.