There are five classes defined within the Event Utility. The first,
YAHOO.util.Event provides the mechanism to interact with the events built into the browser, which is supplemented by
YAHOO.util.KeyListener, which deals solely with listening for keyboard events.
The other classes provide means for your own applications to declare, fire, and listen to events in a similar way to how the browser does. We'll see this later.
.on()) method is the one we'll use most often, as this is the method that adds the listener, which executes the callback function whenever the event in question occurs. It takes up to five arguments: