You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by ziggythehamster <gi...@git.apache.org> on 2014/02/19 03:48:15 UTC

[GitHub] couchdb pull request: Add polyfill for IE8 Array.indexOf

GitHub user ziggythehamster opened a pull request:

    https://github.com/apache/couchdb/pull/153

    Add polyfill for IE8 Array.indexOf

    IE8 does not support Array.indexOf. This polyfill adds this missing method when needed (if not supported by the browser).
    
    NB: I have no way of testing this as I did the change on a Windows machine without IE8 and without anything that could compile CouchDB.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ziggythehamster/couchdb ie8-futon-indexof

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/couchdb/pull/153.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #153
    
----
commit 5927b4324a4a5efef023fe7cc5cf298aac8daabb
Author: Keith Gable <zi...@ignition-project.com>
Date:   2014-02-19T02:42:59Z

    Add Array.indexOf polyfill from the Mozilla Developer Network.

commit 3fd8543f2d613f7c8052696e55df2cae5232d1f3
Author: Keith Gable <zi...@ignition-project.com>
Date:   2014-02-19T02:44:13Z

    Load Array.indexOf polyfill.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. To do so, please top-post your response.
If your project does not have this feature enabled and wishes so, or if the
feature is enabled but not working, please contact infrastructure at
infrastructure@apache.org or file a JIRA ticket with INFRA.
---

[GitHub] couchdb pull request: Add polyfill for IE8 Array.indexOf

Posted by ziggythehamster <gi...@git.apache.org>.
Github user ziggythehamster commented on the pull request:

    https://github.com/apache/couchdb/pull/153#issuecomment-35507769
  
    @garrensmith - I like the ES5 Shim much better. I'll update this PR with the ES5 Shim and the license.skip change to make Travis happy.
    
    @everyone else - This fix is needed to support IE8 on Windows 7, which someone on the user@ mailing list requested.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. To do so, please top-post your response.
If your project does not have this feature enabled and wishes so, or if the
feature is enabled but not working, please contact infrastructure at
infrastructure@apache.org or file a JIRA ticket with INFRA.
---

[GitHub] couchdb pull request: Don't use Array.indexOf in IE8

Posted by ziggythehamster <gi...@git.apache.org>.
Github user ziggythehamster closed the pull request at:

    https://github.com/apache/couchdb/pull/153


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb pull request: Add polyfill for IE8 Array.indexOf

Posted by BigBlueHat <gi...@git.apache.org>.
Github user BigBlueHat commented on the pull request:

    https://github.com/apache/couchdb/pull/153#issuecomment-35519514
  
    @rnewson good call on the date and my too-quick copy paste from MDN's copyright page. They have liberal licenses on their code regardless...but we would need to attribute them in the NOTICE and LICENSE files. etc.
    
    @garrensmith @ziggythehamster @kxepal I'd vote for $.indexOf from jQuery (if it's sufficient) over es5-shim to keep the changes small and targeted and not include more libraries.
    
    @ziggythehamster thanks for being here. Thanks for contributing code. Now it's back to Fauxton for me. :grin: 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. To do so, please top-post your response.
If your project does not have this feature enabled and wishes so, or if the
feature is enabled but not working, please contact infrastructure at
infrastructure@apache.org or file a JIRA ticket with INFRA.
---

[GitHub] couchdb pull request: Add polyfill for IE8 Array.indexOf

Posted by garrensmith <gi...@git.apache.org>.
Github user garrensmith commented on the pull request:

    https://github.com/apache/couchdb/pull/153#issuecomment-35481965
  
    Thats actually a better idea and should hopefully prevent any other issues. @ziggythehamster could you change this PR to rather include the es5-shim. You will also have to add the licensing to `LICENSE` and `NOTICE`. There are plenty of examples in those files to help you. You will also have to add the es5-shim to `license.skip`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. To do so, please top-post your response.
If your project does not have this feature enabled and wishes so, or if the
feature is enabled but not working, please contact infrastructure at
infrastructure@apache.org or file a JIRA ticket with INFRA.
---

[GitHub] couchdb pull request: Don't use Array.indexOf in IE8

Posted by garrensmith <gi...@git.apache.org>.
Github user garrensmith commented on the pull request:

    https://github.com/apache/couchdb/pull/153#issuecomment-37106140
  
    @ziggythehamster as this is just a mirror of the Couchdb repo. We cannot close this pull request even though it has been merged. Could you close this pull request for us.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb pull request: Add polyfill for IE8 Array.indexOf

Posted by garrensmith <gi...@git.apache.org>.
Github user garrensmith commented on the pull request:

    https://github.com/apache/couchdb/pull/153#issuecomment-35476190
  
    This looks fine to me. My only concern would be is that licensed correctly? What is the correct way of licensing content from the Mozilla Developer Network?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. To do so, please top-post your response.
If your project does not have this feature enabled and wishes so, or if the
feature is enabled but not working, please contact infrastructure at
infrastructure@apache.org or file a JIRA ticket with INFRA.
---

[GitHub] couchdb pull request: Add polyfill for IE8 Array.indexOf

Posted by rnewson <gi...@git.apache.org>.
Github user rnewson commented on the pull request:

    https://github.com/apache/couchdb/pull/153#issuecomment-35483590
  
    We are deleting Futon entirely, maybe we should just bring that forward to the next release and put Fauxton in its rightful place?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. To do so, please top-post your response.
If your project does not have this feature enabled and wishes so, or if the
feature is enabled but not working, please contact infrastructure at
infrastructure@apache.org or file a JIRA ticket with INFRA.
---

[GitHub] couchdb pull request: Add polyfill for IE8 Array.indexOf

Posted by MikaelSoderstrom <gi...@git.apache.org>.
Github user MikaelSoderstrom commented on the pull request:

    https://github.com/apache/couchdb/pull/153#issuecomment-35491040
  
    > really, I don't think that performance is matters in place of locating user role in the list that almost always has 1-2-3 elements, max 10 elements.
    
    Absolutely, but when you can use the standardized methods, I think you should. :) Another solution would be to use [underscore](http://underscorejs.org/), but I still prefer Array.prototype.indexOf in this case (and use the shim in older browsers).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. To do so, please top-post your response.
If your project does not have this feature enabled and wishes so, or if the
feature is enabled but not working, please contact infrastructure at
infrastructure@apache.org or file a JIRA ticket with INFRA.
---

[GitHub] couchdb pull request: Add polyfill for IE8 Array.indexOf

Posted by deathbearbrown <gi...@git.apache.org>.
Github user deathbearbrown commented on the pull request:

    https://github.com/apache/couchdb/pull/153#issuecomment-35521109
  
    +1 to $.indexOf


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. To do so, please top-post your response.
If your project does not have this feature enabled and wishes so, or if the
feature is enabled but not working, please contact infrastructure at
infrastructure@apache.org or file a JIRA ticket with INFRA.
---

[GitHub] couchdb pull request: Add polyfill for IE8 Array.indexOf

Posted by andywenk <gi...@git.apache.org>.
Github user andywenk commented on the pull request:

    https://github.com/apache/couchdb/pull/153#issuecomment-35479288
  
    Garren - is this a question we should ask legal@ ? Would you do this?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. To do so, please top-post your response.
If your project does not have this feature enabled and wishes so, or if the
feature is enabled but not working, please contact infrastructure at
infrastructure@apache.org or file a JIRA ticket with INFRA.
---

[GitHub] couchdb pull request: Don't use Array.indexOf in IE8

Posted by ziggythehamster <gi...@git.apache.org>.
Github user ziggythehamster commented on the pull request:

    https://github.com/apache/couchdb/pull/153#issuecomment-36552486
  
    It's actually $.inArray, and I have altered my branch to contain that fix. :)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb pull request: Add polyfill for IE8 Array.indexOf

Posted by MikaelSoderstrom <gi...@git.apache.org>.
Github user MikaelSoderstrom commented on the pull request:

    https://github.com/apache/couchdb/pull/153#issuecomment-35481578
  
    An alternative is to use ES5 shim instead, which should fix other errors where functions on the ES5 Array.prototype and other things like .bind() are used.
    
    https://github.com/es-shims/es5-shim
    
    It´s licensed with The MIT License.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. To do so, please top-post your response.
If your project does not have this feature enabled and wishes so, or if the
feature is enabled but not working, please contact infrastructure at
infrastructure@apache.org or file a JIRA ticket with INFRA.
---

[GitHub] couchdb pull request: Add polyfill for IE8 Array.indexOf

Posted by garrensmith <gi...@git.apache.org>.
Github user garrensmith commented on the pull request:

    https://github.com/apache/couchdb/pull/153#issuecomment-35518341
  
    @BigBlueHat I understand your frustration. But we need to find a balance between merging quickly and making sure they the right patch for Couchdb. As @ziggythehamster said adding the es5-shim is not much more work and I think a much better addition. So I would prefer to see that added instead. At this stage we know that `indexOf` fails in one section. But we don't know if there are other features failing in other pages. Adding the shim should cover us.
    
    @ziggythehamster in terms of licensing. Just add the es5-shim license to the files NOTICE and LICENSE. Add the es5-shim file to license.skip. Plenty of examples in those files to help.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. To do so, please top-post your response.
If your project does not have this feature enabled and wishes so, or if the
feature is enabled but not working, please contact infrastructure at
infrastructure@apache.org or file a JIRA ticket with INFRA.
---

[GitHub] couchdb pull request: Add polyfill for IE8 Array.indexOf

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on the pull request:

    https://github.com/apache/couchdb/pull/153#issuecomment-35518506
  
    > @rnewson @garrensmith @kxepal please consider merging this sooner than later to keep this community awesome. :smile:
    
    I'm fine with any solution, just wanted to note, that for such trivial fix there is no need to get yet another library into the code base when there is possible to easily reuse existed functionality to make things just works. I understand position about to seek in the perfect solution, but Futon is not the case any more to care about performance, features, purity of the implementation or something. That was my 5 cents.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. To do so, please top-post your response.
If your project does not have this feature enabled and wishes so, or if the
feature is enabled but not working, please contact infrastructure at
infrastructure@apache.org or file a JIRA ticket with INFRA.
---

[GitHub] couchdb pull request: Add polyfill for IE8 Array.indexOf

Posted by garrensmith <gi...@git.apache.org>.
Github user garrensmith commented on the pull request:

    https://github.com/apache/couchdb/pull/153#issuecomment-35520319
  
    Ok I'm happy with the $.indexOf fix. It is the easiest fix.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. To do so, please top-post your response.
If your project does not have this feature enabled and wishes so, or if the
feature is enabled but not working, please contact infrastructure at
infrastructure@apache.org or file a JIRA ticket with INFRA.
---

[GitHub] couchdb pull request: Add polyfill for IE8 Array.indexOf

Posted by rnewson <gi...@git.apache.org>.
Github user rnewson commented on the pull request:

    https://github.com/apache/couchdb/pull/153#issuecomment-35516375
  
    How did you date the code sample in question to after August 20, 2010?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. To do so, please top-post your response.
If your project does not have this feature enabled and wishes so, or if the
feature is enabled but not working, please contact infrastructure at
infrastructure@apache.org or file a JIRA ticket with INFRA.
---

[GitHub] couchdb pull request: Don't use Array.indexOf in IE8

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on the pull request:

    https://github.com/apache/couchdb/pull/153#issuecomment-36614262
  
    Merged in [77724c9](https://git-wip-us.apache.org/repos/asf?p=couchdb.git;a=commit;h=77724c94b959ebe4feb124e21dfbad504f50f824), thanks!
    
    > Also note that the tests still use indexOf... There's not a fantastic way to fix that, and I'm okay with the tests failing on IE8.
    
    Tests are no longer runs in browser (no, you can, but without any warranty for the result) so it's not a problem.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Re: [GitHub] couchdb pull request: Add polyfill for IE8 Array.indexOf

Posted by Garren Smith <ga...@apache.org>.
Also a good approach. It would just require finding all the instances of `indexOf` and replacing with `$.inArray`

On 19 Feb 2014, at 11:52 AM, kxepal <gi...@git.apache.org> wrote:

> Github user kxepal commented on the pull request:
> 
>    https://github.com/apache/couchdb/pull/153#issuecomment-35482011
> 
>    Erhm...this may sounds awkward and everyone will recall one good joke from StackOverflow site, but why not to use jQuery instead? (:
> 
>    [$.inArray](http://api.jquery.com/jQuery.inArray/)
> 
> 
> ---
> If your project is set up for it, you can reply to this email and have your
> reply appear on GitHub as well. To do so, please top-post your response.
> If your project does not have this feature enabled and wishes so, or if the
> feature is enabled but not working, please contact infrastructure at
> infrastructure@apache.org or file a JIRA ticket with INFRA.
> ---


[GitHub] couchdb pull request: Add polyfill for IE8 Array.indexOf

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on the pull request:

    https://github.com/apache/couchdb/pull/153#issuecomment-35482011
  
    Erhm...this may sounds awkward and everyone will recall one good joke from StackOverflow site, but why not to use jQuery instead? (:
    
    [$.inArray](http://api.jquery.com/jQuery.inArray/)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. To do so, please top-post your response.
If your project does not have this feature enabled and wishes so, or if the
feature is enabled but not working, please contact infrastructure at
infrastructure@apache.org or file a JIRA ticket with INFRA.
---

[GitHub] couchdb pull request: Add polyfill for IE8 Array.indexOf

Posted by ziggythehamster <gi...@git.apache.org>.
Github user ziggythehamster commented on the pull request:

    https://github.com/apache/couchdb/pull/153#issuecomment-35516537
  
    It's really not a huge deal to change the patch to do ES5-Shim. How would I handle the licensing bit?
    ________________________________
    From: BigBlueHat<ma...@github.com>
    Sent: ‎2/‎19/‎2014 10:09
    To: apache/couchdb<ma...@noreply.github.com>
    Cc: Keith Gable<ma...@ignition-project.com>
    Subject: Re: [couchdb] Add polyfill for IE8 Array.indexOf (#153)
    
    Let's merge this and not wait for a heavier change for this on-it's-way-out project.
    
    The licensing for array.indexof.js is public domain:
    > Code samples added on or after August 20, 2010 are in the public domain. No licensing notice is necessary, but if you need one, you can use: "Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/".
    
    Per: https://developer.mozilla.org/en-US/docs/Project:MDN/About#Copyrights_and_licenses
    
    On the list several people said "patches welcome." A patch arrives and the conversation spins off into all the various options for re-implementing this same feature. Apache CouchDB can't afford to have this keep happening. It's exhausting.
    
    @rnewson @garrensmith @kxepal please consider merging this sooner than later to keep this community awesome. :smile:
    
    Fauxton is still some ways out from feature parity and will have it's own set of issues with old browsers.
    
    Just input from a concerned citizen. :innocent:
    
    ---
    Reply to this email directly or view it on GitHub:
    https://github.com/apache/couchdb/pull/153#issuecomment-35515126


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. To do so, please top-post your response.
If your project does not have this feature enabled and wishes so, or if the
feature is enabled but not working, please contact infrastructure at
infrastructure@apache.org or file a JIRA ticket with INFRA.
---

[GitHub] couchdb pull request: Add polyfill for IE8 Array.indexOf

Posted by garrensmith <gi...@git.apache.org>.
Github user garrensmith commented on the pull request:

    https://github.com/apache/couchdb/pull/153#issuecomment-35508275
  
    Great. Looking forward to it.
    
    On 19 Feb 2014, at 5:07 PM, Keith Gable <no...@github.com> wrote:
    
    > @garrensmith - I like the ES5 Shim much better. I'll update this PR with the ES5 Shim and the license.skip change to make Travis happy.
    > 
    > @everyone else - This fix is needed to support IE8 on Windows 7, which someone on the user@ mailing list requested.
    > 
    > —
    > Reply to this email directly or view it on GitHub.
    > 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. To do so, please top-post your response.
If your project does not have this feature enabled and wishes so, or if the
feature is enabled but not working, please contact infrastructure at
infrastructure@apache.org or file a JIRA ticket with INFRA.
---

[GitHub] couchdb pull request: Add polyfill for IE8 Array.indexOf

Posted by BigBlueHat <gi...@git.apache.org>.
Github user BigBlueHat commented on the pull request:

    https://github.com/apache/couchdb/pull/153#issuecomment-35515126
  
    Let's merge this and not wait for a heavier change for this on-it's-way-out project.
    
    The licensing for array.indexof.js is public domain:
    > Code samples added on or after August 20, 2010 are in the public domain. No licensing notice is necessary, but if you need one, you can use: "Any copyright is dedicated to the Public Domain. http://creativecommons.org/publicdomain/zero/1.0/".
    
    Per: https://developer.mozilla.org/en-US/docs/Project:MDN/About#Copyrights_and_licenses
    
    On the list several people said "patches welcome." A patch arrives and the conversation spins off into all the various options for re-implementing this same feature. Apache CouchDB can't afford to have this keep happening. It's exhausting.
    
    @rnewson @garrensmith @kxepal please consider merging this sooner than later to keep this community awesome. :smile: 
    
    Fauxton is still some ways out from feature parity and will have it's own set of issues with old browsers.
    
    Just input from a concerned citizen. :innocent: 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. To do so, please top-post your response.
If your project does not have this feature enabled and wishes so, or if the
feature is enabled but not working, please contact infrastructure at
infrastructure@apache.org or file a JIRA ticket with INFRA.
---

[GitHub] couchdb pull request: Don't use Array.indexOf in IE8

Posted by ziggythehamster <gi...@git.apache.org>.
Github user ziggythehamster commented on the pull request:

    https://github.com/apache/couchdb/pull/153#issuecomment-36552583
  
    Also note that the tests still use indexOf... There's not a fantastic way to fix that, and I'm okay with the tests failing on IE8.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb pull request: Don't use Array.indexOf in IE8

Posted by BigBlueHat <gi...@git.apache.org>.
Github user BigBlueHat commented on the pull request:

    https://github.com/apache/couchdb/pull/153#issuecomment-37103206
  
    @ziggythehamster feel free close this at your leisure. Thanks!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb pull request: Add polyfill for IE8 Array.indexOf

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on the pull request:

    https://github.com/apache/couchdb/pull/153#issuecomment-35490347
  
    > One of the benefits with jQuery is that it just works in all older and modern browsers (if you are using 1.9.x that is). The drawback is that you will not the same performance as the built-in functions.
    > 
    > You can test $.inArray() and Array.prototype.indexOf here:
    > http://jsperf.com/in-array-vs-inarray-vs-indexof
    
    really, I don't think that performance is matters in place of locating user role in the list that almost always has 1-2-3 elements, max 10 elements.
    
    > Is it really that important to support a browser that not even Microsoft is going to support in 1½ month?
    
    Good point, but we couldn't just remove Futon without breaking compatibility (there are couchapps that depends on his js libs). Also we'll probably have to keep some LTS release for some time when 2.0 will be done. Moreover, people are lazy and if they have no serious reasons they wouldn't reinstall OS with all the software on it and support end deadline will not make all IE8 disappear in the moment. And this fix looks not so much complex to let him in (:


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. To do so, please top-post your response.
If your project does not have this feature enabled and wishes so, or if the
feature is enabled but not working, please contact infrastructure at
infrastructure@apache.org or file a JIRA ticket with INFRA.
---

[GitHub] couchdb pull request: Add polyfill for IE8 Array.indexOf

Posted by rnewson <gi...@git.apache.org>.
Github user rnewson commented on the pull request:

    https://github.com/apache/couchdb/pull/153#issuecomment-35516543
  
    Also, I'm told Fauxton *has* feature parity today. Is that untrue? If so, what's missing?
    
    Supporting Futon *and* Fauxton is a burden, and preserving Futon reduces the pressure to fix Fauxton's missing features, whatever they may be.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. To do so, please top-post your response.
If your project does not have this feature enabled and wishes so, or if the
feature is enabled but not working, please contact infrastructure at
infrastructure@apache.org or file a JIRA ticket with INFRA.
---

[GitHub] couchdb pull request: Add polyfill for IE8 Array.indexOf

Posted by MikaelSoderstrom <gi...@git.apache.org>.
Github user MikaelSoderstrom commented on the pull request:

    https://github.com/apache/couchdb/pull/153#issuecomment-35506289
  
    Ahh, forgot that Windows 7 was shipped with IE 8. Well, then I guess there must be support for it.
    
    I still suggest that ES5 shim and similar should be used where the browser doesn't support a specific API. If the user is using any of the modern browsers, they should get the best experience possible, while users with older browsers should still be able to use it.
    
    Mixing different frameworks just because you can could easily lead to confused developers in the end. ECMAScript 5th Edition has this indexOf function, and since it´s possible to shim it, I don't see any reason for why anything else should be used.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. To do so, please top-post your response.
If your project does not have this feature enabled and wishes so, or if the
feature is enabled but not working, please contact infrastructure at
infrastructure@apache.org or file a JIRA ticket with INFRA.
---

Re: [GitHub] couchdb pull request: Add polyfill for IE8 Array.indexOf

Posted by Nick North <no...@gmail.com>.
I also initially took the view that CouchDb should not have to support IE8,
as Microsoft won't. But searching around shows that Windows 7 initially
came with IE8, which puts it under the same support cycle as Windows 7,
meaning there are years of pain yet to suffer.

Nick


On 19 February 2014 10:37, MikaelSoderstrom <gi...@git.apache.org> wrote:

> Github user MikaelSoderstrom commented on the pull request:
>
>     https://github.com/apache/couchdb/pull/153#issuecomment-35485395
>
>     One of the benefits with jQuery is that it just works in all older and
> modern browsers (if you are using 1.9.x that is). The drawback is that you
> will not the same performance as the built-in functions.
>
>     You can test $.inArray() and Array.prototype.indexOf here:
>     http://jsperf.com/in-array-vs-inarray-vs-indexof
>
>     If you can use the native methods, you should do that.
>
>     And if we take a look at the ES5 support in browsers, we can see that
> IE 8 is the last version of IE that doesn't have full support for this (IE
> 9 supports everything except strict mode, which it will just ignore):
>     http://kangax.github.io/es5-compat-table/
>
>     Since IE 8 is the latest version that can be installed on Windows XP,
> and Microsoft is not going to support Windows XP after april this year, I
> guess CouchDB shouldn't have to either.
>
>     Is it really that important to support a browser that not even
> Microsoft is going to support in 1½ month?
>
>
> ---
> If your project is set up for it, you can reply to this email and have your
> reply appear on GitHub as well. To do so, please top-post your response.
> If your project does not have this feature enabled and wishes so, or if the
> feature is enabled but not working, please contact infrastructure at
> infrastructure@apache.org or file a JIRA ticket with INFRA.
> ---
>

[GitHub] couchdb pull request: Add polyfill for IE8 Array.indexOf

Posted by MikaelSoderstrom <gi...@git.apache.org>.
Github user MikaelSoderstrom commented on the pull request:

    https://github.com/apache/couchdb/pull/153#issuecomment-35485395
  
    One of the benefits with jQuery is that it just works in all older and modern browsers (if you are using 1.9.x that is). The drawback is that you will not the same performance as the built-in functions.
    
    You can test $.inArray() and Array.prototype.indexOf here:
    http://jsperf.com/in-array-vs-inarray-vs-indexof
    
    If you can use the native methods, you should do that.
    
    And if we take a look at the ES5 support in browsers, we can see that IE 8 is the last version of IE that doesn't have full support for this (IE 9 supports everything except strict mode, which it will just ignore):
    http://kangax.github.io/es5-compat-table/
    
    Since IE 8 is the latest version that can be installed on Windows XP, and Microsoft is not going to support Windows XP after april this year, I guess CouchDB shouldn't have to either.
    
    Is it really that important to support a browser that not even Microsoft is going to support in 1½ month?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. To do so, please top-post your response.
If your project does not have this feature enabled and wishes so, or if the
feature is enabled but not working, please contact infrastructure at
infrastructure@apache.org or file a JIRA ticket with INFRA.
---