IN THIS CHAPTER
The "life" of an event object
Event support in different browser generations
Retrieving information from an event
Prior to version 4 browsers, user and system actions—events—were captured predominantly by event handlers defined as attributes inside HTML tags. For instance, when a user clicked a button, the
clickevent triggered the
While remaining fully backward compatible with the event handler mechanism of old, version 4 browsers had the first event model that turn events into first-class objects whose properties automatically carry a lot of relevant information about the event when it occurs. These properties are fully exposed to scripts, allowing pages to respond more intelligently about what the user does with the page and its elements.
Another new aspect of version 4 event models was the notion of "event propagation." It was possible to have an event processed by an object higher up the element containment hierarchy whenever it made sense to have multiple ...