2 YUI Library - Event - Release Notes
6 * Fixed a bug introduced in 0.12.1 release caused nested onAvailable
11 * If an error is thrown during the browser-specific add/remove lister call,
12 addListener/removeListener will catch the error and return false.
14 * onAvailable array items are nulled out instead of deleted when completed to
15 get around an Opera issue introduced in a recent version of the browser.
19 * If the function argument is not provided to Event.removeListener, all
20 all listeners for the specified event type on the element will be removed.
22 * CustomEvent now has an optional parameter that defines the signature of
23 the listeners for this event. Two signatures are supported:
25 YAHOO.util.CustomEvent.LIST:
27 param2: array of arguments provided to fire()
28 param3: <optional> the custom object supplied to subscribe()
30 YAHOO.util.CustomEvent.FLAT:
31 param1: the first argument provided to fire()
32 param2: <optional> the custom object supplied to subscribe()
34 The new flat signature makes it possible to provide a better API
35 when using custom events, and it makes it possible to transparently
38 * The parameters for overriding scope in both Event.addListener, and
39 CustomEvent.subscribe have been augmented. In addition to the
40 previous behavior where a true value would make the previous parameter
41 the execution scope, an object can be supplied instead. If an object
42 is provided, that object becomes the scope obj. This makes it possible
43 to pass a both a custom object and adjust the scope to a different object.
45 * Added EventProvider, which is a wrapper for CustomEvent that makes it
46 possible to subscribe to events by name, whether or not the event has
47 been created. This class was designed to be used with YAHOO.augment.
48 EventProvider custom events are created with the new FLAT listener
51 * CustomEvent subscribers can return false to stop the propagation of
54 * CustomEvents now have an onSubscribe custom event that can used to the
55 case where a subscriber subscribes to an one-time event that has already
56 happened. Also provides a way for the implementer to defer initialization
57 logic until after the first subscription.
59 * Event.getCharCode now always returns keyCode if charCode is not available.
61 * Added Event.onContentReady, which is similar to onAvailable, but it also
62 checks simblings to try to determine when the element's children are
67 * Fixed a memory leak in IE6 that occurred when the utility was hosted in
70 * Fixed an issue with Safari click listeners when listeners were removed.
74 * The listener cache is now pruned when events are removed. This fixes
75 a performance issue when adding many listeners, removing them, and
76 adding them again repeatedly.
78 * Safari click listeners will work correctly if a bound element is removed
79 from the DOM and a new element with the same ID is added.
81 * Removed the code that automatically unsubscribed custom event listeners.
85 * Added Event.purgeElement which will remove all listeners added via
86 addListener from the supplied element. If an optional "type" parameter
87 is supplied, only events of that type will be removed. Optionally, the
88 purge can be performed recursively on the element's children as well.
90 * Added Event.getListeners which will return all listeners attached to
91 a given element.. either all listeners or listeners of a specific type.
93 * getTarget now automatically resolves text nodes. The optional parameter
94 for this feature is now deprecated.
96 * getRelatedTarget now resolves text nodes for the browsers that return the
97 text node rather than its host HTML element.
99 * CustomEvent now logs the custom event activity if the logger widget is available
103 * Added Safari dblclick to the list of legacy events.
105 * When multiple identical event handlers are defined, multiple calls
106 to removeListener can now remove all of them.
108 * removeListener works properly for unload events
110 * Legacy event bookkeeping is more efficient, improving the performance for
111 adding Safari click events.
113 * _unload() is more efficient, improving the page transition experience in
114 Safari in particular.
116 * addListener, removeListener now return false if the function argument is
119 * Fixed an operator precedence issue in getCharCode.
121 * Added Event.getXY, which returns [Event.getPageX(e), Event.getPageY(e)]
123 * Added Event.onAvailable, which will execute the callback when the element
124 with the supplied id is found. Currently searches periodically until the
125 window load event or for up to 10 seconds after the onAvailable method
128 * The lazy listener attachment process now will poll beyond the window load
129 event in order to better handle the case when a listener is defined
130 late in the page but before the element is in the dom.
132 * Fixed browser detection for Opera installations reporting as IE.
134 * It is now possible to remove and re-add legacy events (Safari click event).