Live data from Hacker News

Removing jQuery from GitHub.com front end

githubengineering.com

21–26 of 26 posts

Re: Removing jQuery from GitHub.com front end

#21
post #18

I don't use jQuery anymore, but damn do I miss the simplicity of fadeIn() and fadeOut(). Trying to do the same with CSS transitions is much more complicated and brittle.

You can use the Web Animations API for this: https://developer.mozilla.org/en-US/docs/Web/API/Web_Animati...

The Web Animations API is nice but it's a working draft that's only supported by FF and Chrome, no Safari or Edge.

Re: Removing jQuery from GitHub.com front end

#22
post #9

> Set up metrics that tracked ratio of jQuery calls used per overall line of code and monitored that graph over time to make sure that it’s either staying constant or going down, not up. Would love to know how this was done.

As a guess, wrap each method in a function that records access and run original method? That way you can get stats for each method.

That sounds like a case for decorators!

Re: Removing jQuery from GitHub.com front end

#26
post #21
post #18

Earlier quoted context omitted.

You can use the Web Animations API for this: https://developer.mozilla.org/en-US/docs/Web/API/Web_Animati...

The Web Animations API is nice but it's a working draft that's only supported by FF and Chrome, no Safari or Edge.

Safari (desktop and iOS) is actually getting it in the next release. It's also well-polyfilled, we just add it to our Polyfill.io config.

According to caniuse, global native support is at 74%.

Post reply on HN