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 Symbol.prototype.description #935

Conversation

romainmenke
Copy link
Collaborator

@romainmenke romainmenke commented Dec 7, 2020

this is the big one

I am not very confident about this code and this change might introduce new bugs :/
What I wanted to do :

  • only ship the entire Symbol polyfill to browsers that really need it. Not to every browser that needs Symbol.prototype.description
  • still have a working polyfill for Symbol.prototype.description in all supported browsers

The only way I could think of to do that, was by using a Proxy in modern browsers.
This does introduces duplicate logic and duplicate tests.

I am definitely not an expert on Symbol and might have overlooked nuances when mangling the code for both polyfills.

ci is still running for this one : reference branch

@origamiserviceuser origamiserviceuser added this to incoming in Origami ✨ Dec 7, 2020
@github-actions github-actions bot added the library Relates to an Origami library label Dec 7, 2020
@romainmenke
Copy link
Collaborator Author

@JakeChampion I forgot to finalise the browsers list in config.toml here.
When double checking everything I noticed that Safari 9 doesn't have Proxy.

So I tweaked the polyfill to have a minimal implementation for browsers without Proxy.

@JakeChampion JakeChampion force-pushed the powowow-fix-symbol--gregarious-warthog-6efe5c6c62 branch from 134a0c9 to 83edbf1 Compare December 10, 2020 11:03
@romainmenke romainmenke marked this pull request as ready for review December 11, 2020 17:53
@romainmenke romainmenke requested a review from a team as a code owner December 11, 2020 17:53
@JakeChampion JakeChampion merged commit 17addd4 into JakeChampion:powowow Dec 11, 2020
Origami ✨ automation moved this from incoming to complete Dec 11, 2020
JakeChampion added a commit that referenced this pull request Dec 12, 2020
* fix Symbol.prototype.description

* fix detect

* update config

* remove NativeSymbol

* typo

* add a best effort polyfill for Safari 9

Co-authored-by: Jake Champion <me@jakechampion.name>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 12, 2021
@robertboulton robertboulton removed this from Done in Origami ✨ Jul 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
library Relates to an Origami library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants