Lines Matching defs:delegate
5 * @submodule event-delegate
28 * to match multiple Nodes for a single event. In this case, the delegate
38 * @method delegate
39 * @param type {String} the event type to delegate
52 function delegate(type, fn, el, filter) {
57 // Support Y.delegate({ click: fnA, key: fnB }, el, filter, ...);
58 // and Y.delegate(['click', 'key'], fn, el, filter, ...);
65 handles.push(Y.delegate.apply(Y, args));
68 // Y.delegate({'click', fn}, el, filter) =>
69 // Y.delegate('click', fn, el, filter)
76 handles.push(Y.delegate.apply(Y, args));
93 if (isObject(synth) && synth.delegate) {
94 handle = synth.delegate.apply(synth, arguments);
99 Y.log("delegate requires type, callback, parent, & filter", "warn");
107 Y.mix(handle, Y.delegate.apply(Y, args), true);
116 handle.sub._notify = delegate.notifySub;
133 This method is hosted as a private property of the `delegate` method
134 (e.g. `Y.delegate.notifySub`)
146 delegate.notifySub = function (thisObj, args, ce) {
154 var currentTarget = delegate._applyFilter(this.filter, args, ce),
191 This function may be useful when defining synthetic events for delegate
194 Hosted as a property of the `delegate` method (e.g. `Y.delegate.compileFilter`).
202 delegate.compileFilter = Y.cached(function (selector) {
214 Hosted as a protected property of the `delegate` method (e.g.
215 `Y.delegate._applyFilter`).
225 delegate._applyFilter = function (filter, args, ce) {
305 * @method delegate
306 * @param type {string} the event type to delegate
318 Y.delegate = Y.Event.delegate = delegate;