focusblur.js revision 5dca01b3e9223702077784d350880971273b2a49
(function() {
CAPTURE_CONFIG = { capture: true },
NOOP = function(){},
// Opera implents capture phase events per spec rather than
// the more useful way it is implemented in other browsers:
// The event doesn't fire on a target unless there is a
// listener on an element in the target's ancestry. If a
// capture phase listener is added only to the element that
// will be the target of the event, the listener won't fire.
// To get around this, we register a NOOP listener on the
// element's parent.
_captureHack = function(type, o) {
if (p) {
}
};
/**
* Adds a DOM focus listener. Uses the focusin event in IE,
* and the capture phase otherwise so that
* the event propagates in a way that enables event delegation.
*
* Note: if you are registering this event on the intended target
* rather than an ancestor, the element must be in the DOM in
* order for it to work in Opera.
*
* @for YUI
* @event focus
*/
var a = Y.Array(arguments, 0, true);
_captureHack(type, o);
}
}
};
/**
* Adds a DOM blur listener. Uses the focusout event in IE,
* and the capture phase otherwise so that
* the event propagates in a way that enables event delegation.
*
* Note: if you are registering this event on the intended target
* rather than an ancestor, the element must be in the DOM
* at the time of registration in order for it to work in Opera.
*
* @for YUI
* @event blur
*/
var a = Y.Array(arguments, 0, true);
_captureHack(type, o);
}
}
};
})();