Firefox 18+ supports String#startsWith, String#endsWith #96

merged 3 commits into from Mar 26, 2013


None yet
3 participants

savetheclocktower commented Jan 24, 2013

Thanks for writing this.

This prevents us from clobbering the native version, but we should go further and make our existing startsWith and endsWith true polyfills. If you feel like it, can you make our existing versions support the extra position argument as documented here and here?

If you don't feel like it, I'm happy to work on it myself when I get the time.


victor-homyakov commented Jan 25, 2013

Yes, I'll make it.


victor-homyakov commented Jan 26, 2013

Firefox has also String#contains, which is similar to Prototype's String#include.


victor-homyakov commented Jan 26, 2013

Review and pull, please. I've checked unit tests on Firefox 18.0.1 (with native implementation) and Chrome 24 (with our polyfill).

savetheclocktower merged commit adb6479 into sstephenson:master Mar 26, 2013

victor-homyakov deleted the victor-homyakov:patch-33 branch Nov 25, 2013

Should also be noted that Prototype's startsWith and endsWith does not align with ES6. It's missing support for the position argument.


jdalton replied Apr 11, 2014

NM, I see edge has added support for position but isn't totally accurate around resolving the position.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment