3 ms·
He is trying to explain patters and how to use it in real world solutions; that means cross-browsers solutions that do not rely on ES5.
by jQueryIsAwesome 15y ago
He is trying to explain patters and how to use it in real world solutions; that means cross-browsers solutions that do not rely on ES5.
- oinksoft 15y agojQueryIsAwesome, you must not know what an ES5 shim is. It is a cross-browser solution. https://github.com/kriskowal/es5-shim https://github.com/kriskowal/es5-shim Especially when you note that JavaScript is not just run in browsers these days, and that most server-side deployments do implement ES5 features, it makes very little sense for modern tutorials to avoid ES5 features unless they are trying to demonstrate drop-in snippets with no library dependencies. It seems clear that the author is not shy about including other libraries with his code.
- prodigal_erik 15y ago> In many cases, this means that these shims cause many ES5 methods to silently fail. Considering you don't even get the opportunity to detect the problem and turn off the failing progressive enhancement in favor of the non-js behavior, this doesn't seem like a realistic alternative to just writing pre-ES5 code that's known to work.
- oinksoft 15y agoThat's just FUD though. The potentially "silently failing" methods are all documented, and do not include any of the most commonly used ES5 features (Function.prototype.bind, Array.prototype.filter, etc.).
- Silhouette 15y agoFrom the readme for that library: > This package requires quite a bit more attention and testing. > It is not likely to behave as advertised in a large cross-section of browsers. That doesn't sound like a cross-browser solution. In fact, it doesn't sound like a professional-level solution at all. Perhaps one day it will be, but if you're arguing that using this kind of library is a best practice today and that developers should eschew jQuery in favour of such alternatives, then I don't think your position is credible at all.