Re:An easier way of using polyfills
by bshimmin on Friday November 07, 2014 @01:26AM
(#8571428)
So we've spent years shouting out the mantra "test for features, not browsers!" and now Mozilla, of all people, tell us that that was basically a bit impractical, and we should just go back to user-agent sniffing like we did 8-10 years ago?
[ Parent
| on HN ]
It looks like Mozilla is testing for virtually any web browser that is in use. That seems OK.
And, you can choose to do feature detection if you wish. Here's a quick example:
https://cdn.polyfill.io/v1/polyfill.js?features=Array.protot...
More information about that can be found here: https://cdn.polyfill.io/v1/docs/api
> and now Mozilla, of all people, tell us that that was basically a bit impractical
No. What Mozilla did was explain their reasons for doing so. So at the very least your comment should engage with their stated reasons in some detail. Otherwise it's hard for the rest of us to know whether you've got a valid objection or you just replied without really reading the original article.
Re:An easier way of using polyfills
by triblondon on Friday November 07, 2014 @07:34PM
(#8575458)
Not Mozilla. The polyfill service is made and hosted by the Financial Times. Mozilla just kindly offered us a posting on the Hacks blog.