delegate.js revision 0b7a7611e347abe693e82b51d6f55bae472f0e9c
(function() {
delegates = {},
resolveTextNode = function(n) {
try {
if (n && 3 == n.nodeType) {
return n.parentNode;
}
} catch(e) { }
return n;
},
spec,
ev,
i;
if (nElements > 0) {
do {
if (!ev) {
}
}
}
while (i--);
}
}
}
},
},
});
/**
* Sets up a delegated listener container.
* @event delegate
* @param type {string} 'delegate'
* @param fn {string} the function to execute
* @param el {string|node} the element that is the delegation container
* @param delegateType {string} the event type to delegate
* @param spec {string} a selector that must match the target of the
* event.
* @return {EventHandle} the detach handle
* @for YUI
*/
if (!spec) {
return false;
}
// identifier to target the container
// the custom event for the delegation spec
// the key to the listener for the event type and container
a = Y.Array(arguments, 0, true),
if (!(delegateKey in delegates)) {
}
else { // Node instance
}
});
}
else {
}
delegates[delegateKey] = {};
}
a[0] = ename;
// remove element, delegation spec and context object from the args
// subscribe to the custom event for the delegation spec
}
};
})();