News for hackers. Stuff that matters.
Re:Lists of JavaScript methods which you can use natively by majewsky on Friday July 01, 2016 @07:46AM (#12015267)
And it will also lead to the site not working out-of-the-box for privacy-conscious people like me who block third-party JS by default.
Re:Lists of JavaScript methods which you can use natively by nailer on Friday July 01, 2016 @09:12AM (#12015712)
'third party JS' is really a synonym for 'third party hosted JS' and they're not a very exact match. You might block mixpanel but I can make my own analytics.
Re:Lists of JavaScript methods which you can use natively by Klathmon on Friday July 01, 2016 @07:49AM (#12015280)
Well you can avoid that with an inline script that checks for it and includes it from a local path if it fails.

But that's just more waiting, and you still end up downloading the ENTIRE script (unless you get REALLY fancy with webpack in a way I don't even want to think about...)

Re:Lists of JavaScript methods which you can use natively by girvo on Friday July 01, 2016 @09:26AM (#12015805)
> But that's just more waiting, and you still end up downloading the ENTIRE script (unless you get REALLY fancy with webpack in a way I don't even want to think about...)

I have a friend who has done, in production, exactly what your subconscious is afraid of. I should get him to do a write up sometime: it's both amazing and horrifying at the same time...

Re:Lists of JavaScript methods which you can use natively by Klathmon on Friday July 01, 2016 @09:50AM (#12015975)
I'd actually love to see that!

I've thought about it a bit before, and always ignored it because there'd be no real benefit.

But i could see writing a crazy webpack config that breaks out all my lodash functions into their own bundle, then tries to add a script tag to the CDN version, doing some quick processing to determine if it's in the cache, and if it's not falling back to including my own custom-built script tag (and canceling the request to the CDN version).

I'm sure it wouldn't provide any benefit to anyone, but it would be a fun code-golf exercise!