-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
feat: make it strict mode & CSP compatible if possible #396
base: main
Are you sure you want to change the base?
Conversation
@benjamn hi, can you review this? this is a small PR |
|
@Jack-Works What do you think about this alternate approach? #378 (comment) |
@benjamn hi that's a cool trick but in some environment like moddable (a JS engine for embedded env) the |
I'd recommend using all of I have a sneaking suspicion that it will cause a massive deoptimization is everything but the newest browsers. The |
I'm proposing it as the most stable and tested way one more time: https://github.com/zloirock/core-js/blob/v3.8.3/packages/core-js/internals/global.js |
Has this PR stalled? Would love to see it go in for those of us tring to build things in CSP environments. |
I'm just waiting for the maintainer to respond. There aren't so many things I need to up-to-date with. |
@Jack-Works This PR will fail Content Security Policy, please check the better way that @zloirock has linked in previous comment. |
The original version also violates CSP. I'm making it better on modern browser to use globalThis directly so it don't have to violate CSP |
I have rebased to master to resolve merge conflicts. |
Updated |
Is this issue still relevant? Or is it fixed in regenerator-runtime v.0.13.9? |
It's fixed only for engines with |
I keep snoozing this tab "Until next month", hoping every time it re-appears that the PR will have been merged. This really seems like a good fix for the described issue, in addition to being backwards-compatible. On a side note, I can't remember ever actually have gotten very pissed off when debugging, but when I was debugging the strange CSP issue I had almost a year ago, and finally finding out the reason things were failing, the snarky comment that this PR thankfully removes - certainly had me swearing. Anyhow, I'm crossing my fingers this will be fixed in January! :) |
Use well-known global names if possible