Lines Matching refs:delegate
1 YUI.add('event-delegate', function(Y) {
7 * @submodule event-delegate
30 * to match multiple Nodes for a single event. In this case, the delegate
40 * @method delegate
41 * @param type {String} the event type to delegate
54 function delegate(type, fn, el, filter) {
59 // Support Y.delegate({ click: fnA, key: fnB }, el, filter, ...);
60 // and Y.delegate(['click', 'key'], fn, el, filter, ...);
67 handles.push(Y.delegate.apply(Y, args));
70 // Y.delegate({'click', fn}, el, filter) =>
71 // Y.delegate('click', fn, el, filter)
78 handles.push(Y.delegate.apply(Y, args));
95 if (isObject(synth) && synth.delegate) {
96 handle = synth.delegate.apply(synth, arguments);
101 Y.log("delegate requires type, callback, parent, & filter", "warn");
109 Y.mix(handle, Y.delegate.apply(Y, args), true);
118 handle.sub._notify = delegate.notifySub;
135 This method is hosted as a private property of the `delegate` method
136 (e.g. `Y.delegate.notifySub`)
148 delegate.notifySub = function (thisObj, args, ce) {
156 var currentTarget = delegate._applyFilter(this.filter, args, ce),
193 This function may be useful when defining synthetic events for delegate
196 Hosted as a property of the `delegate` method (e.g. `Y.delegate.compileFilter`).
204 delegate.compileFilter = Y.cached(function (selector) {
216 Hosted as a protected property of the `delegate` method (e.g.
217 `Y.delegate._applyFilter`).
227 delegate._applyFilter = function (filter, args, ce) {
307 * @method delegate
308 * @param type {string} the event type to delegate
320 Y.delegate = Y.Event.delegate = delegate;