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

Fix Function.prototype.bind polyfill by using Mozillas suggested script #1043

Merged
merged 1 commit into from Mar 15, 2015
Merged

Fix Function.prototype.bind polyfill by using Mozillas suggested script #1043

merged 1 commit into from Mar 15, 2015

Conversation

matthelm
Copy link
Contributor

@matthelm matthelm commented Mar 5, 2015

Problem

This PR fixes a bug with the Function.prototype.bind polyfill where arguments passed into bind weren't being included when the function was eventually executed. I've included three examples showing the expectation without a polyfill, what's currently happening in master, and how the polyfill should be implemented in order to emulate the baseline.

No Polyfill (baseline)
C3 master (broken)

Solution

C3 matthelm:phantom-polyfill (fixed)

The code for the PR is copied from MDN's suggested polyfill here. I'm unsure how to best write tests for this code, and because the current polyfill didn't have tests I'm submitting this PR without any. That said, I'm happy to add them.

@matthelm
Copy link
Contributor Author

@masayuki0812 Please review at your convenience.

masayuki0812 added a commit that referenced this pull request Mar 15, 2015
Fix Function.prototype.bind polyfill by using Mozillas suggested script
@masayuki0812 masayuki0812 merged commit a6f3d02 into c3js:master Mar 15, 2015
@masayuki0812
Copy link
Member

Looks nice. Thank you very much!!

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

2 participants