-
Notifications
You must be signed in to change notification settings - Fork 27.4k
replace helper methods with ES5/ES5 shim #667
Comments
good idea, but 8.3 KB is heavy, so we should only load it when the browser needs it. |
I don't want it to be part of angular.js. we'll just make a requirement that the shim is available when using old browsers. |
that puts the complexity on the user, which I think is outside of the spirit of angular. We should load it, just as we used to lad the ie-compat |
we can be nice and load it if needed, but we should not distribute the shim with angular. instead, we should have a config option that would allow users to override the source url for the shim. by default we can just fetch it from github and if that's not desirable then the developer can specify an alternative location. |
+1 |
Was this ever resolved? |
nope.... Could we trouble you for a pull request? |
meaning you would like me to implement? I can look after the dust settles on my current project. |
What's the status of this? We require a JSON shim for IE7; I think it's fine to expect the user to handle shimming for ES5 aw well. It might be nice to do some check (in the un-minified version) at runtime and throw a nice "This browser doesn't have ES5 methods shimmed. See for more info." We could also add these shims to angular-seed (and friends) and show how to asynchronously load the shims for browsers that need it. |
I looked into this one again. we would benefit only from dropping custom indexOf. so I don't think its worth it to expect users to include the shim just for that on IE. I do think that apps should include es5 shim so that their code looks better, but I'd rather not depend on this since it doesn't buy us anything. |
stuff like indexOf and friends are part of ES5 and available in modern browsers. we don't need to redefine these.
for old browsers, we should require that an ES5 shim is loaded with the app.
this one looks respectible: https://github.com/kriskowal/es5-shim
The text was updated successfully, but these errors were encountered: