3 ms·
Could somebody clarify, but I feel like I won't ever use this. Older browsers won't understand these new "features", so I still will have to code as I am used t
by marknadal 15y ago
Could somebody clarify, but I feel like I won't ever use this. Older browsers won't understand these new "features", so I still will have to code as I am used to. So I guess in 20 years... I might dabble with them.
- JoshTriplett 15y agoYou can use this any time you know your target environment. For instance, if you write JavaScript for Firefox addons, Greasemonkey scripts, Chrome extensions, or node.js, you know exactly what JavaScript engine you'll run on, and you can take advantage of new JavaScript features that engine implements. You can also use new JavaScript features the same way you use other new browser features like WebSocket or cross-domain xmlHttpRequest: when you've determined that all the modern browsers implement the feature you care about. The browser vendors reach a point where they stop supporting older versions with security updates and similar; I'd consider it reasonable to stop supporting a browser when it stops receiving security updates. (You should also evaluate your audience and the browsers they actually use.) At that point, older browsers get the same experience as links or wget: they get the content, but not the enhancements provided by JavaScript or whatever other features you use.