delegate.js
delegate.js copied to clipboard
Replace _getDelegateTarget with closest
Could we simplify this lib by relying on your closest
implementation? It seems the whole of this function can be replaced with a call to closest?
So, this line could be replaced as so:
if (e.delegateTarget = closest(e.target, selector, elem)) {
Aside: I intended to submit PR for this. Couldn't get npm to install as-is (needed to update Karma), and then I couldn't get tests to run