Closed juliangruber closed 11 years ago
In which IE does String.prototype.indexOf
fail? Just stumpled upon it and wondered why a dependency to the module indexof is necessary.
IE9 is the first to have it, see http://kangax.github.io/es5-compat-table/#Array.prototype.indexOf
Can't see where url
can be an array and that Array.prototype.indexOf
is used. It always is a string (https://github.com/LearnBoost/jsonp/blob/master/index.js#L75) and the changed operation would use String.prototype.indexOf
instead, which does not require to be shimmed. I understand that the applied fix works, but it is not nescessary and introduces another dependency and a module is most easily distributable across various environments when it does not have any dependencies.
I'm writing that, because I'm currently trying to use browserify in combination with other js modules and I often find myself dowloading modules and resolving dependencies manually and I also did that for this module. Still waiting for the day where component-modules are available on npm and I can use them directly with browserify without introducing another preprocessor-step or linking directories :)
yeah you're right, I think I did this while grepping my code base for .indexOf
for microsoft sucks