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
Are you sure that self
is web compatible and that adding it to some environments will not break anything?
#28
Comments
It's definitely not; we explored this in the globalThis proposal. |
tc39/proposal-global#11 (comment)
|
And here is no |
"such as" - that was one example. I recall seeing hundreds of them with a trivial github search; you're welcome to do the same. |
Just searching something on GitHub - is not proper research. I hope that it was not your motivation at the time of this proposal? After exploring some examples of such code, I found that they are used only on tests or not used at all. However, sure, with a big chance somewhere it's used in some code where it can break something. |
If you're aware of another way to do research that isn't fantastically expensive, I'd love to know about it. |
I'm awaiting at least some real examples of what it can break. At least some links to GitHub with an explanation. Otherwise, it's just empty words, not "research". I don't think that it's fantastically expensive. I found some tenths of such cases on GitHub for some minutes - but I don't see the danger in any one of them - however, sure, it's not exhaustively - otherwise, this issue wouldn't be here in this form. |
However, for NodeJS it's not principal since they can implement it in a new major release - it's not browsers and breaking changes are possible. |
The final attempt to get feedback, @jasnell @lucacasonato. |
We've removed |
For example, I'm worried about NodeJS - in some cases, someone detects the environment as NodeJS like
typeof self === 'undefined' && typeof process === 'object'
.Related: zloirock/core-js#1118
The text was updated successfully, but these errors were encountered: