3 ms·
allow me to acquaint you with Element.matches(): https://developer.mozilla.org/en-US/docs/Web/API/Element/matches https://developer.mozilla.org/en-US/docs/Web/
by leeoniya 6y ago
allow me to acquaint you with Element.matches():
https://developer.mozilla.org/en-US/docs/Web/API/Element/matches https://developer.mozilla.org/en-US/docs/Web/API/Element/mat...
https://jsfiddle.net/dg3rL81z/ https://jsfiddle.net/dg3rL81z/
- ww520 6y agoI mean, sure, I can use the lower level API to check in a separate step. The point of a library is to provide the functionality to reduce the boiler plate checking.
- leeoniya 6y agoalright then. sounds like you're able to make an informed decision for yourself. when i was doing jquery dev i never needed so much event delegation that avoiding an occasional 1-liner for event filtering* justified using a lib that's 10x larger. * in limited cases like tabular data or large lists