Project

General

Profile

1

    
2
YUI Library - Event - Release Notes
3

    
4
2.4.1
5
  * Reverted clearAttributes() change to fix IE memory leak on iframes/windows
6

    
7
2.4.0
8
  * getListeners/purgeElement accepts either an element reference or an element id
9
  * onAvailable/onContentReady accepts a single id or an array of ids
10
  * No longer removing listeners during the unload event for non-IE browsers
11
  * IE unload strategy for cross page memory leaks changed from removing each listener
12
    to calling clearAttributes()
13
  * the DOMReady property is now public
14
  * Changed IE onDOMReady approach from the defered script node hack to the doScroll('left') hack
15
  * getCharChode now Remaps SHIFT-TAB key code (25) to TAB (9) in Safari
16
  * getCharCode provides the proper key codes for page up and page down in Safari
17
  * Restored object check to _isValidCollection.
18
  * In KeyListener, added keycode constants for some of the special keys.
19
  * Rolled back the change added for hacking around IE errors from bubbled 
20
    events that originally targeted an ActiveX control.
21

    
22
2.3.1
23
  * CustomEvent fire() now catches exceptions thrown by the subscribers so
24
    that the rest of the subscribers execute.  The exception is logged and
25
    stored in the "lastError" property.
26
  * Performance tweak: _isValidCollection fails strings first.
27
  * onAvailable/onContentReady will work if an element ref rather than an
28
    id is provided.
29
  * getListeners: fixed the values for the obj and adjust properties.
30
    Added scope property.
31
  * Added IE hack for when the event target is something that can't be
32
    inspected (like a VML canvas).  In this case the target is set to
33
    the element the listener is bound to.
34

    
35
2.3.0
36
  * addListener now produces a logger warning if the supplied callback is 
37
    undefined.
38
  * Reduced the likelihood that window onload listeners fire before
39
    onAvailable listeners when the two happen near the same moment.
40
  * Fixed an IE error that could occur when the library was injected into 
41
    the page after window onload.
42
  * The onDOMReady listener will be executed immediately if the
43
    DOMReady event had already fired prior to the call.
44
  * Unsubscribing custom events within a handler for the event now works 
45
    properly.
46
  * EventProvider unsubscribeAll will unsubscribe all listeners from
47
    all hosted custom events if the type is not specified.
48
  * Event.getKeyCode now checks keyCode before charCode for Safari normalization.  
49
    Safari arrow key codes are normalized as well.
50
  * Broke up the </script> in Event to allow it to be included inline
51

    
52
2.2.2
53
  * No change
54

    
55
2.2.1
56
  * onAvailable listeners are processed before onContentReady listeners so
57
    they fire in the logical order when an element is found to be available 
58
    and ready in the same pass.
59
  * Added onDOMReady for receiving notification when the DOM is first usable.
60
  * In Internet Explorer, onAvailable/onContentReady checks now start when
61
    DOMReady fires to reduce the possibility of receiving an "operation
62
    aborted" errors when inserting DOM nodes during in the onAvailable/
63
    onContentReady listener execution.
64
  * CustomEvent subscribers supplying undefined callbacks will be notified
65
    when subscribing rather than having an ambiguous error thrown when the
66
    event is fired.
67
  * Fixed missing html tags in the examples.
68
  * POLL_INTERVAL is 10 ms.
69
  * YAHOO.util.CustomEvent is now declared before YAHOO.util.Event.
70

    
71
2.2.0
72

    
73
  * YAHOO.util.KeyListener was moved from the container package into event.
74
  
75
  * The Safari bug that made it so preventDefault would not work with click
76
    and double-click listeners on anchor tags was resolved in version 2.0.4.
77
    The workaround (using DOM0 events for these instead of the normal DOM2
78
    events) is now only used for releases prior to 2.0.4.
79
    
80
  * getListeners/purgeElement now work correctly with unload listeners
81

    
82
  * When legacyEvents are used (Safari<2.0.4 click events), if there was an
83
    existing DOM0 event that the utility replaced, it is executed along with
84
    the listeners that were added with the utility.
85

    
86
  * Restored Event.regCE for compatibility with a beta release of the library
87
    that in use in an external API.
88

    
89
  * unsubscribe in CustomEvent and EventProvider will remove all listeners
90
    if the listener is omitted.
91

    
92
  * Added unsubscribeAll to EventProvider
93

    
94
  * Added Event.lastError which stores the most recent error object if
95
    a browser-specific add/remove listener call throws an exception.
96

    
97
0.12.2
98

    
99
  * Fixed a bug introduced in 0.12.1 release caused nested onAvailable
100
    calls to fail.
101

    
102
0.12.1
103

    
104
  * If an error is thrown during the browser-specific add/remove lister call,
105
    addListener/removeListener will catch the error and return false.
106

    
107
  * onAvailable array items are nulled out instead of deleted when completed to
108
    get around an Opera issue introduced in a recent version of the browser.
109

    
110
0.12.0
111

    
112
   * If the function argument is not provided to Event.removeListener, all
113
     all listeners for the specified event type on the element will be removed.
114

    
115
   * CustomEvent now has an optional parameter that defines the signature of
116
     the listeners for this event.  Two signatures are supported:
117

    
118
       YAHOO.util.CustomEvent.LIST:
119
         param1: event name
120
         param2: array of arguments provided to fire()
121
         param3: <optional> the custom object supplied to subscribe()
122

    
123
       YAHOO.util.CustomEvent.FLAT:
124
         param1: the first argument provided to fire()
125
         param2: <optional> the custom object supplied to subscribe()
126

    
127
     The new flat signature makes it possible to provide a better API 
128
     when using custom events, and it makes it possible to transparently 
129
     wrap DOM events.
130
   
131
   * The parameters for overriding scope in both Event.addListener, and
132
     CustomEvent.subscribe have been augmented.  In addition to the 
133
     previous behavior where a true value would make the previous parameter
134
     the execution scope, an object can be supplied instead.  If an object
135
     is provided, that object becomes the scope obj.  This makes it possible 
136
     to pass a both a custom object and adjust the scope to a different object.
137

    
138
   * Added EventProvider, which is a wrapper for CustomEvent that makes it
139
     possible to subscribe to events by name, whether or not the event has
140
     been created.  This class was designed to be used with YAHOO.augment.
141
     EventProvider custom events are created with the new FLAT listener
142
     signature.
143

    
144
   * CustomEvent subscribers can return false to stop the propagation of
145
     the event.
146

    
147
   * CustomEvents now have an onSubscribe custom event that can used to the
148
     case where a subscriber subscribes to an one-time event that has already
149
     happened.  Also provides a way for the implementer to defer initialization
150
     logic until after the first subscription.
151

    
152
   * Event.getCharCode now always returns keyCode if charCode is not available.
153

    
154
   * Added Event.onContentReady, which is similar to onAvailable, but it also
155
     checks simblings to try to determine when the element's children are
156
     available.
157

    
158
0.11.4
159

    
160
   * Fixed a memory leak in IE6 that occurred when the utility was hosted in 
161
     an iframe.
162

    
163
   * Fixed an issue with Safari click listeners when listeners were removed.
164

    
165
0.11.3
166

    
167
   * The listener cache is now pruned when events are removed.  This fixes
168
     a performance issue when adding many listeners, removing them, and
169
     adding them again repeatedly.
170

    
171
   * Safari click listeners will work correctly if a bound element is removed
172
     from the DOM and a new element with the same ID is added.
173

    
174
   * Removed the code that automatically unsubscribed custom event listeners.
175

    
176
0.11.0
177

    
178
   * Added Event.purgeElement which will remove all listeners added via 
179
     addListener from the supplied element.  If an optional "type" parameter
180
     is supplied, only events of that type will be removed.  Optionally, the
181
     purge can be performed recursively on the element's children as well.
182

    
183
   * Added Event.getListeners which will return all listeners attached to 
184
     a given element.. either all listeners or listeners of a specific type.
185

    
186
   * getTarget now automatically resolves text nodes.  The optional parameter
187
     for this feature is now deprecated.
188

    
189
   * getRelatedTarget now resolves text nodes for the browsers that return the
190
     text node rather than its host HTML element.
191

    
192
   * CustomEvent now logs the custom event activity if the logger widget is available
193

    
194
0.10.0
195

    
196
   * Added Safari dblclick to the list of legacy events.
197

    
198
   * When multiple identical event handlers are defined, multiple calls
199
     to removeListener can now remove all of them.
200

    
201
   * removeListener works properly for unload events
202

    
203
   * Legacy event bookkeeping is more efficient, improving the performance for
204
     adding Safari click events.
205

    
206
   * _unload() is more efficient, improving the page transition experience in 
207
     Safari in particular.
208

    
209
   * addListener, removeListener now return false if the function argument is
210
     not valid.
211

    
212
   * Fixed an operator precedence issue in getCharCode.
213

    
214
   * Added Event.getXY, which returns [Event.getPageX(e), Event.getPageY(e)]
215

    
216
   * Added Event.onAvailable, which will execute the callback when the element
217
     with the supplied id is found.  Currently searches periodically until the
218
     window load event or for up to 10 seconds after the onAvailable method 
219
     was executed.
220

    
221
   * The lazy listener attachment process now will poll beyond the window load
222
     event in order to better handle the case when a listener is defined
223
     late in the page but before the element is in the dom.
224

    
225
   * Fixed browser detection for Opera installations reporting as IE.
226

    
227
   * It is now possible to remove and re-add legacy events (Safari click event).
228

    
(1-1/5)