3 ms·
That's what I have, a very small helper library that contains 5 or 6 functions that I use frequently like .closest(), .hideAll(), .showAll() etc. My applicatio
by scottharveyco 8y ago
That's what I have, a very small helper library that contains 5 or 6 functions that I use frequently like .closest(), .hideAll(), .showAll() etc.
My application doesn't use much JS so this seems reasonable to me instead of including a framework for a few functions.
- bzbarsky 8y agoFor what it's worth, https://caniuse.com/#feat=element-closest https://caniuse.com/#feat=element-closest is supported by everyone except IE (and Opera Mini, I guess).
- Piskvorrr 8y agoThat's exactly the point! "Oh, you can code [a polyfill] yourself, and it will work. Mostly. Sort of. jQuery bad, reinventing the wheel good! Never mind that you originally went there to implement some business logic, let's get tangled in the myriad almost-almost-working combinations."
- minitech 8y ago> Oh, you can code [a polyfill] yourself, and it will work. Use a polyfill that already exists. Take it out when browser support is there.