focusblur.js revision ef56b4126a1deb54c547f08f1aede9a3541e9a56
/**
* Adds focus and blur event listener support. These events normally
* do not bubble, so this adds support for that so these events
* can be used in event delegation scenarios.
*
* @module event
* @submodule event-focus
*/
(function() {
eventNames = {
},
// Only need to use capture phase for Gecko since it doesn't support
// focusin, focusout, DOMFocusIn, or DOMFocusOut
var a = Y.Array(args, 0, true),
if (el) {
}
else {
}
}
},
eventAdapter = {
on: function () {
}
};
/**
* Adds a DOM focus listener. Uses the focusin event in IE,
* DOMFocusIn for Opera and Webkit, and the capture phase for Gecko so that
* the event propagates in a way that enables event delegation.
*
* @for YUI
* @event focus
* @param type {string} 'focus'
* @param fn {function} the callback function to execute
* @param o {string|HTMLElement|collection} the element(s) to bind
* @param context optional context object
* @param args 0..n additional arguments to provide to the listener.
* @return {EventHandle} the detach handle
*/
/**
* Adds a DOM blur listener. Uses the focusout event in IE,
* DOMFocusOut for Opera and Webkit, and the capture phase for Gecko so that
* the event propagates in a way that enables event delegation.
*
* @for YUI
* @event blur
* @param type {string} 'blur'
* @param fn {function} the callback function to execute
* @param o {string|HTMLElement|collection} the element(s) to bind
* @param context optional context object
* @param args 0..n additional arguments to provide to the listener.
* @return {EventHandle} the detach handle
*/
})();