delegate.js icon indicating copy to clipboard operation
delegate.js copied to clipboard

Replace _getDelegateTarget with closest

Open WickyNilliams opened this issue 9 years ago • 0 comments

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

WickyNilliams avatar Jan 15 '15 10:01 WickyNilliams