-
Notifications
You must be signed in to change notification settings - Fork 136
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
Symbol should not be polyfilled on Chrome 49 (neither on Chrome 42 and 38) #1161
Conversation
Hi @Nickinthebox - thanks for the pull-request, the tests for this are running at https://github.com/Financial-Times/polyfill-library/actions/runs/1875430851 |
polyfills/Symbol/config.toml
Outdated
@@ -27,7 +27,7 @@ edge_mob = "<13" | |||
ie = "*" | |||
ie_mob = "*" | |||
safari = "<9" | |||
chrome = "<49" | |||
chrome = "<38" |
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.
@Nickinthebox have you ran the tests for this polyfill on chrome 38 and seen that they pass? The same question applies to the other polyfills in the pull-request as well.
If not, I can do that sometime this week 👍
@Nickinthebox The tests for Chrome 42 and lower are failing on this pull-request - https://github.com/Financial-Times/polyfill-library/runs/5272168306?check_suite_focus=true Would you be able to look into resolving those at all? |
This is weird because the fail of tests are on other polyfill. For example, in the logs I see:
Which is about AbordSignal which is supposed to be polyfilled on Chrome 38: And this is not changed by my PR... 🤷 |
This is likely because AbortSignal depends on Symbol, which was changed in this pull-request |
/ok-to-test sha=e0be16b running tests at https://github.com/Financial-Times/polyfill-library/actions/runs/4902362724 |
@Nickinthebox I've tried to reproduce the issue you are facing but I wasn't able to. If you are using polyfill.io you shouldn't be getting the In chrome 49 : https://polyfill.io/v3/polyfill.min.js?features=Symbol.replace https://polyfill.io/v3/polyfill.min.js?features=Symbol Is it possible your project is also using |
In deed we also use core-js! I will dig into this. Sorry for the noise. |
@Nickinthebox and/or @romainmenke should we be closing this PR? |
Closed as not needed |
On Chrome 49 (windows XP), we have an error:
TypeError: Cannot redefine property: replace
if our polyfill.io URL include the polyfill of Symbol.Chrome 49 is the last available Chrome on Windows XP / Vista and Mac OS 10.6-10.8 (x64)
Chrome 42 is the last available Chrome on Android 4
Chrome 38 is the last available Chrome on Mac OS 10.6 (I1-32)
I checked on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol and fixed some limits in the code for
Symbol
as well asSymbol.iterator
andSymbol.unscopables
.However, according to https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/replace ,
Symbol.replace
(which seems to cause the error) is only supported from version 50... so I have let <50 for theSymbol.replace
config... I hope the error will disappear with this PR (not tested).