Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from Mar 26, 2013

Conversation

victor-homyakov
Copy link
Contributor

@savetheclocktower
Copy link
Collaborator

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
Copy link
Contributor Author

Yes, I'll make it.

Victor Homyakov added 2 commits January 27, 2013 01:48
@victor-homyakov
Copy link
Contributor Author

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

@victor-homyakov
Copy link
Contributor Author

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

savetheclocktower added a commit that referenced this pull request Mar 26, 2013
Use native `String#startsWith` and `String#endsWith` if present. Turn existing implementation into a true polyfill.
@savetheclocktower savetheclocktower merged commit adb6479 into prototypejs:master Mar 26, 2013
@victor-homyakov victor-homyakov deleted the patch-33 branch November 25, 2013 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants