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

Hide Object.assign polyfill behind a module #2350

Merged
merged 1 commit into from
Oct 16, 2014

Conversation

sebmarkbage
Copy link
Collaborator

Because the JS community's polyfilling infrastructure sucks and we'll
have to fix it for them before we require this.

JSX spread uses React.__spread
(which might get special behavior for key/ref, not sure yet)

This never uses the native implementation and throws for prototype chains.
Once the native implementations are faster, we'll start using them.

@sophiebits
Copy link
Collaborator

Is this IE8-compatible?

@sebmarkbage
Copy link
Collaborator Author

Nope, don't use toString etc. as property names.

@sophiebits
Copy link
Collaborator

I guess merge wasn't before anyway. Okay.

@@ -0,0 +1,56 @@
/**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file shouldn't be here. Maybe src/vendor/stubs instead? We'll have to do a bit of trickery to make this work properly.

We can leave it here for now and then move later.

@zpao
Copy link
Member

zpao commented Oct 15, 2014

Heads up, I just added an Object.assign caller in #2343 (for deprecated), so make sure you rebase and update that too.

@zpao
Copy link
Member

zpao commented Oct 16, 2014

Want to get this updated an in soon so we can RC?

Because the JS community's polyfilling infrastructure sucks and we'll
have to fix it for them before we require this.

JSX spread uses React.__spread
(which might get special behavior for key/ref, not sure yet)

This never uses the native implementation and throws for prototype chains.
Once the native implementations are faster, we'll start using them.
sebmarkbage added a commit that referenced this pull request Oct 16, 2014
Hide Object.assign polyfill behind a module
@sebmarkbage sebmarkbage merged commit 828efb7 into facebook:master Oct 16, 2014
@zpao
Copy link
Member

zpao commented Oct 16, 2014

We talked in person but this is failing tests because our Function.prototype.bind polyfill for phantom is enumerable. Turns out this is a good thing because IE8 is still in that enumerable world.

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.

5 participants