News for hackers. Stuff that matters.
Re:Removing jQuery from GitHub.com frontend by EB66 on Thursday July 26, 2018 @03:34PM (#17620264)
FWIW, a few of the non-jQuery alternatives documented on http://youmightnotneedjquery.com are not equivalent -- they lack some of the functionality that jQuery offers. For example, take a look at $.replaceWith(). If you use $.replaceWith() you can supply an element that has event handlers bound to it and those event handlers will persist after the replacement. But in your alternative code ( el.outerHTML = string; ) you can only pass in a string which of course cannot have event handlers bound to it.

There are no comments on this comment yet.