-
Notifications
You must be signed in to change notification settings - Fork 215
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 Constructor WeakMap requires 'new' #51
Conversation
Gruntfile.js
Outdated
.replace(/\n$/, "") | ||
.replace(/^[^{]/gm, " $&"); | ||
.replace(/\n$/, "") | ||
.replace(/^[^{]/gm, " $&"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you undo the change to these two lines?
@Rob--W I just reverted the changes to the mentioned lines. |
Could you squash all commits too? Otherwise |
Here you go, all in one 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@rpl This can be merged.
Wait, the build script of webextension-polyfill itself does not transpile the source to ES5, so the If we used a transpiler, then this patch would be good to go. However, we don't transpile, so why should this PR be merged? |
I double checked and in fact it works as expected as long as the code is not transpiled. The error comes from the transpiled version of the code (using babel). Which means the issue is not much of webextension-polyfill's business. Sorry for the mistake! |
When using this polyfill in Chrome, I'm getting this error:
After some google searches, it seems that extending built-in is not supported. This PR adds a babel plugin allowing that.
Also fix #14
EDIT: Chrome version is 60.0.3112.90, OS is macOS Sierra 10.12.5