README revision 7229821d1486a441146a512ad07fb1c0d4ae49d0
YUI Event Utility
DOM event utilities
3.3.0
- Added support for delegate({ click: fn, keyup: fn2 }, ...)
and delegate(['click', 'keyup'], fn, ...)
- Delegation containers are now potential matches for the filter
- Nested delegate matches will now have callback executed for all matching
targets in bubbling order
- e.stopPropagation() in nested delegate matches now works as expected
- The raw DOM event is no longer double wrapped (was e._event._event)
- event-focus now uses xhtml-friendly feature test to fork for IE
- new event-hover module providing node.on('hover', in, out)
- e.button/e.which normalization.
- e.which normalized for key operations as well.
- Split out IE-specific code into event-base-ie conditional module.
3.2.0
- Added event and facade support for touch
- Synthetic event infrastructure rebuilt. Changes include
* Support for delegation
* Passing DOMEventFacade to notifier.fire(e) now recommended
* Fixed issue where firing the notifier from inside DOM event subs would
result in duplicate synth sub execution if the same synth was
subscribed multiple times on the same Node
* Synths can now be detached with node.purge(t|f, 'synthName')
* Event.define(type, config, *force*) third arg added to override
existing events. Only use this if you really know what you're doing.
* Changed allowDups to preventDups, true by default to mimic existing
behavior elsewhere in the event system
- delegate now defers to synthetic event def more intelligently
- Added support for passing filter function to delegate
- delegate now executes callback for each filter match up the bubble path
- Added detach category support to delegate
- Migrate mouseenter, mouseleave, focus, and blur to Event.define
- Focus and blur now guarantee execution order of subs matches bubble order
when multiple delegates are created from different levels
- event-synthetic added to 'event' rollup module
3.1.1
- fired fireOnce listeners are executed synchronously
3.1.0
- Removed deprecated 'delegate' custom event. As of 3.1 use the delegate method on a Node instance or Y instance.
- Updated the event-focus submodule so that the specialized focus and blur events that enable the focus and blur events to bubble do not apply when adding focus and blur events to the window object.
- Synthetic event creation API added.
- delegate enhancements.
- unload event fix.
- Compatibility with FireFox's untouchable anonymous div.
3.0.0
- Added onreadystatechange fork in domready to handle the event in IE when YUI is hosted in an iframe.
- Added mousewheel support.
- Added Y.delegate function that is a bit easier to use than Y.on('delegate'...
- Default scope of mouseenter and mouseleave events is the Node instance to which the listener is attached
- Default scope of delegated event listeners is the Node instance that matched the supplied CSS selector
- All special DOM event handlers (focus/blur/mousewheel,resize,delegate,etc) are
broken down into submodules. Core DOM event functionality is provided in event-base.js,
and all of the functionality is rolled into event.js.
- Additional Safari key remapping.
- Special DOM events can now be routed through delegate.
- Y.on can target Node and NodeList references correctly.
- Fixed onAvailable lazy DOM listener detach handles.
- When configured to return a detach handle, a single object is always returned.
Previously requests that resolved to multiple listeners returned an array.
3.0.0beta1
- DOM event, custom event, and simulate event moved to separate modules.
- Added an event for DOM event delegation. It only fires if the target or its descendants
match a supplied selector.
Y.on('delegate', fn, el, 'click', 'selector' ...
The event facade sets the following properties:
target: the target of the event
currentTarget: the element that the selector matched
container: the bound element (the delegation container)
- Added mouseenter/mouseleave events
Y.on('mouseenter', fn, el, 'click', 'selector' ...
Y.on('mouseleave', fn, el, 'click', 'selector' ...
- Added Y.on('windowresize', fn), which attempts to normalize
when the event fires across all browsers (once at the end
of the resize rather than continuously during the resize).
- Fixed unsubscribeAll return value.
- Added ability to skip facade creation where performance is a concern.
- Moved DOMReady core to yui-base.
- Focus/blur abstraction works in Opera when the bound element is the target
- purgeElement only reads element guids, it does not create new ones for elements without one.
- Event.attach returns a single handle if the result from collection processing is a single item.
3.0.0pr2
- Fixed IE notification error when no arguments are supplied.
- Added event-simulate.
- getListeners works when the element has no listeners defined.
- Event.addListener removed. Exists only in compat layer.
- addListerer triggers 2.x event behavior.
- Removed extra undefined parameter passed to DOM event listeners.
- Compat layer contains Event.on.
- Event adapter support added to Y.on
- Added Y.on('focus', 'blur' event adaptors (support for propagation
of these events.)
- publish and subscribe support an object for the type, allowing for multiple
- subscriber failures throw an error by default rather than log.
- subscriber failures are not routed through Y.fail in order to
improve the debug experience.
- New facades created every fire()
- before method re-added to EventTarget, which delegates to Do.before or
subscribe.
- EventTarget.after will delegate to Do.after if type is a function
- Added keylistener: Y.on('key', fn, element, 'down:13,65+ctrl+shift')
- event:ready event deprecated in favor of domready.
3.0.0pr1
- Initial Release