Yahoo! UI Library

event  3.3.0

Yahoo! UI Library > event
Search:
 
Filters

Module: event

DOM event listener abstraction layer

This module contains the following classes:

Submodules:

event-base
Custom event engine, DOM event listener abstraction layer, synthetic DOM events.
event-delegate
Adds event delegation support to the library.
event-focus
Adds bubbling and delegation support to DOM events focus and blur.
event-hover
Adds support for a "hover" event. The event provides a convenience wrapper for subscribing separately to mouseenter and mouseleave. The signature for subscribing to the event is

node.on("hover", overFn, outFn);
node.delegate("hover", overFn, outFn, ".filterSelector");
Y.on("hover", overFn, outFn, ".targetSelector");
Y.delegate("hover", overFn, outFn, "#container", ".filterSelector");

Additionally, for compatibility with a more typical subscription signature, the following are also supported:

Y.on("hover", overFn, ".targetSelector", outFn);
Y.delegate("hover", overFn, "#container", outFn, ".filterSelector");
event-key
Functionality to listen for one or more specific key combinations.
event-mouseenter

Adds subscription and delegation support for mouseenter and mouseleave events. Unlike mouseover and mouseout, these events aren't fired from child elements of a subscribed node.

This avoids receiving three mouseover notifications from a setup like

div#container > p > a[href]

where

Y.one('#container').on('mouseover', callback)

When the mouse moves over the link, one mouseover event is fired from #container, then when the mouse moves over the p, another mouseover event is fired and bubbles to #container, causing a second notification, and finally when the mouse moves over the link, a third mouseover event is fired and bubbles to #container for a third notification.

By contrast, using mouseenter instead of mouseover, the callback would be executed only once when the mouse moves over #container.

event-mousewheel
Adds mousewheel event support
event-resize
Adds a window resize event that has its behavior normalized to fire at the end of the resize rather than constantly during the resize.
event-synthetic
Define new DOM events that can be subscribed to from Nodes.

Copyright © 2011 Yahoo! Inc. All rights reserved.