UI/ EventManager.jsThis library attempts to abstract events so that many controls can use, say, mouse down for example, instead of taking total control of the event The main point of this library is to delegate events to controls that care. Often times, DHTML contorls (tree controls for instance) will take hold of the document on click event, and then no other contorl or process can get that event. This library takes control of the events then allows you to register with it so that everyone can get notified in turn. To register, make a function that takes one parameter. The parameter will be the event object, and will get passed in by the manager to your function when the event gets fired. So for example the following code creates an alert box when anything on the page is clicked The event object has a few tweaks to make it act the same on all browsers, but the most common part of the event is the target property which points to the item that fired the event. Copyright2004-2006 Rob Rohan (robrohan@gmail.com) All rights reserved RelatedUtil/Browser.js Summary
EventManagerAllows delegation of browser events (key press, mouse move, etc) so any process can be notified of an event. Simply add a listener using one fo the Add functions. A listener is a function that takes a single parameter. When called the passed parameter will be the event object. NamespaceSortie.UI Summary
|