Hacker News new | ask | show | jobs
by bzbarsky 2886 days ago
For what it's worth, https://caniuse.com/#feat=element-closest is supported by everyone except IE (and Opera Mini, I guess).
1 comments

That'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."
> 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.