1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
9d72f6dde28ac73a64c77de6d9b64cdcb317ec43Eric FerraiuoloEvent Infrastructure Change History
9d72f6dde28ac73a64c77de6d9b64cdcb317ec43Eric Ferraiuolo===================================
2b7999a7eea7047a8ec79f8ea00af354d1fe5485Luke Smith * `event-simulate` references to `window` replaced with `Y.config.win`
2b7999a7eea7047a8ec79f8ea00af354d1fe5485Luke Smith * `event-resize` no longer throws an exception in IE [#2531310]
2b7999a7eea7047a8ec79f8ea00af354d1fe5485Luke Smith * "avilable" and "contentready" handlers that throw exceptions no longer
2b7999a7eea7047a8ec79f8ea00af354d1fe5485Luke Smith result in infinite polling [#2531375]
2b7999a7eea7047a8ec79f8ea00af354d1fe5485Luke Smith * Added `event-touch`, `event-flick`, `event-move`, and `event-valuechange` to
2b7999a7eea7047a8ec79f8ea00af354d1fe5485Luke Smith the `event` virtual rollup in accordance with the docs.
2b7999a7eea7047a8ec79f8ea00af354d1fe5485Luke Smith * 'key' event does a better job parsing character filters. Uses `e.which`
4d9562842326610fb53e926ee2418fcc4a843970Luke Smith * `node.delegate('focus', fn, '.not-focusable')` now works. Properly supports
f289044230f3ec07aae10000f833895c7824524eLuke Smith delegation where the filter matches non-focusable parent nodes of the
f289044230f3ec07aae10000f833895c7824524eLuke Smith focused target. Same for blur. [#2531334] (`event-focus`)
4d9562842326610fb53e926ee2418fcc4a843970Luke Smith * `node.delegate('focus', fn, filterThatMatchesNode); node.focus();` now
f289044230f3ec07aae10000f833895c7824524eLuke Smith works. [#2531734]
49e7c2bb7ad8592b1d002327aae55a93a7375fbdLuke Smith * Calling Y.on('syntheticEvent', callback) without a context/selector argument
49e7c2bb7ad8592b1d002327aae55a93a7375fbdLuke Smith now defaults to `window` (or the global object) [Ticket #2530081]
49e7c2bb7ad8592b1d002327aae55a93a7375fbdLuke Smith * event-resize, a.k.a. Y.on('windowresize', ...) migrated to synthetic event
49e7c2bb7ad8592b1d002327aae55a93a7375fbdLuke Smith infrastructure. Now detachable, etc. Also properly throttles the resize
49e7c2bb7ad8592b1d002327aae55a93a7375fbdLuke Smith event on newer Gecko engines. That browser sniff was old! [Ticket #2530805]
8f376757fe852d2a0c22855555533a2aadf06affLuke Smith * `event-outside` added for "outside" events.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * `Y.Event.define(name)` adds name to `DOM_EVENTS` whitelist. Accepts event
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo name string or array of string names.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * `event-hover` properly pulls in required module `event-mouseenter`.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * DOM event subscriptions are now removed and objects cleaned up after last
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo subscription is detached; same for synthetic events.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * `key` synthetic event migrated to official synth infrastructure; and now
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo supports delegation.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * `key` event spec param now supports letters and named keys. E.g.:
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo `'enter+ctrl' == '13+ctrl'`, `'up:a' == 'up:65'` and `'A' == '65+shift'`.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * Added experimental config `YUI({ lazyEventFacade: true })` that triggers a
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo mode for DOM EventFacades in IE8 to use getters to access event properties
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo that involve any calculation, such as `e.target` and `e.currentTarget`; this
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo should also improve performance.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * `mouseenter` and `mouseleave` events now filter the native event rather than
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo the generated `DOMEventFacades` for `mouseover`/`mouseout`. This results in
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo fewer calls to `Y.one` (`e.target`, `currentTarget`, `relatedTarget`) as
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo well, so should improve performance.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * Added `onceAfter()` method to do a self-detaching `after()` subscription.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo [Ticket #2529464]
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * `Y.on(type, callback, HTMLElement[], COMPAT)` subscriptions to attach to
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo multiple elements in one call now correctly use native DOM elements instead
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo of Nodes for all subscriptions. [Ticket #2529807]
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * Plugged the leaked global `GLOBAL_ENV`. [Ticket #2530227]
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * Fixed synth architecture to properly resubscribe to synths that use
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo `processArgs` if the target is not available at the time of subscription.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo [Ticket #2530293]
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * Added support for `delegate({ click: fn, keyup: fn2 }, …)` and
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo `delegate(['click', 'keyup'], fn, …)`.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * Delegation containers are now potential matches for the filter.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * Nested delegate matches will now have callback executed for all matching
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo targets in bubbling order.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * `e.stopPropagation()` in nested delegate matches now works as expected.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * The raw DOM event is no longer double wrapped (i.e. was: `e._event._event`).
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * `event-focus` now uses XHTML-friendly feature test to fork for IE.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * New `event-hover` module providing `node.on('hover', in, out)`.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * `e.which` normalized for key operations as well.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * Split out IE-specific code into `event-base-ie` conditional module.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * Added event and facade support for touch.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * Synthetic event infrastructure rebuilt. Changes include:
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * Support for delegation.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * Passing `DOMEventFacade` to `notifier.fire(e)` now recommended.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * Fixed issue where firing the notifier from inside DOM event subs would
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo result in duplicate synth sub execution if the same synth was subscribed
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo multiple times on the same Node.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * Synths can now be detached with `node.purge(t|f, 'synthName')`.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * `Event.define(type, config, *force*)` third arg added to override existing
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo events. Only use this if you really know what you're doing.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * Changed `allowDups` to `preventDups`, `true` by default to mimic existing
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo behavior elsewhere in the event system.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * `delegate()` now defers to synthetic event def more intelligently.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * Added support for passing filter function to delegate.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * `delegate()` now executes callback for each filter match up the bubble path.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * Added detach category support to `delegate()`.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * Migrate `mouseenter`, `mouseleave`, `focus`, and `blur` to `Event.define`.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * `focus` and `blur` now guarantee execution order of subs matches bubble
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo order when multiple delegates are created from different levels.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * `event-synthetic` added to 'event' rollup module.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * fired `fireOnce()` listeners are executed synchronously.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * Removed deprecated `delegate` custom event. As of 3.1.0 use the `delegate()`
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo method on a `Node` instance or `Y` instance.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * Updated the `event-focus` submodule so that the specialized `focus` and
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo `blur` events that enable the `focus` and `blur` events to bubble do not
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo apply when adding `focus` and `blur` events to the `window` object.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * Synthetic event creation API added.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * `delegate` enhancements.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * `unload` event fix.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * Compatibility with Firefox's untouchable anonymous `div`.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * Added `onreadystatechange` fork in `domready` to handle the event in IE when
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo YUI is hosted in an `iframe`.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * Added `mousewheel` support.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * Added `Y.delegate()` function that is a bit easier to use than
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo `Y.on('delegate', …)`.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * Default scope of `mouseenter` and `mouseleave` events is the `Node` instance
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo to which the listener is attached.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * Default scope of delegated event listeners is the `Node` instance that
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo matched the supplied CSS selector.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * All special DOM event handlers (`focus`, `blur`, `mousewheel`, `resize`,
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo `delegate`, etc.) are broken down into submodules. Core DOM event
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo functionality is provided in event-base.js, and all of the functionality is
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * Additional Safari key remapping.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * Special DOM events can now be routed through `delegate()`.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * `Y.on()` can target `Node` and `NodeList` references correctly.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * Fixed `onAvailable()` lazy DOM listener detach handles.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * When configured to return a detach handle, a single object is always
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo returned. Previously requests that resolved to multiple listeners returned
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * DOM event, custom event, and simulate event moved to separate modules.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * Added an event for DOM event delegation. It only fires if the target or its
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo descendants match a supplied selector.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo Y.on('delegate', fn, el, 'click', 'selector', …)
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo The event facade sets the following properties:
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * `target`: the target of the event.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * `currentTarget`: the element that the selector matched.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * `container`: the bound element (the delegation container).
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * Added `mouseenter`/`mouseleave` events:
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * `Y.on('mouseenter', fn, el, 'click', 'selector', …)`
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * `Y.on('mouseleave', fn, el, 'click', 'selector', …)`
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * Added `Y.on('windowresize', fn)`, which attempts to normalize when the event
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo fires across all browsers (once at the end of the resize rather than
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo continuously during the resize).
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * Fixed `unsubscribeAll()` return value.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * Added ability to skip facade creation where performance is a concern.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * Moved `DOMReady` core to `yui-base`.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * Focus/blur abstraction works in Opera when the bound element is the target.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * `purgeElement` only reads element guids, it does not create new ones for
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo elements without one.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * `Event.attach()` returns a single handle if the result from collection
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo processing is a single item.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * Fixed IE notification error when no arguments are supplied.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * Added `event-simulate`.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * `getListeners()` works when the element has no listeners defined.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * `Event.addListener()` removed. Exists only in compat layer.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * `addListerer()` triggers 2.x event behavior.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * Removed extra undefined parameter passed to DOM event listeners.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * Compat layer contains `Event.on()`.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * Event adapter support added to `Y.on()`.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * Added `focus` and `blur` event adaptors (support for propagation of these
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * publish and subscribe support an object for the type, allowing for multiple
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * subscriber failures throw an error by default rather than log.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * subscriber failures are not routed through `Y.fail` in order to improve the
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo debug experience.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * New facades created every `fire()`.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * `before()` method re-added to `EventTarget`, which delegates to
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo `Do.before()` or `subscribe()`.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * `EventTarget.after()` will delegate to `Do.after()` if type is a function.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * Added keylistener: `Y.on('key', fn, element, 'down:13,65+ctrl+shift')`.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * `event:ready` event deprecated in favor of `domready`.
41088a00c37a8daf6b649306cc5e6c38c1135e73Eric Ferraiuolo * Initial Release.