You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What information was incorrect, unhelpful, or incomplete?
Prior to globalThis, the only reliable cross-platform way to get the global object for an environment was Function('return this')(). However, this causes CSP violations in some settings, so es6-shim uses a check like this, for example:
The idea of a sham is that—IIUC—it just provides the existence of an API, but does not provide any behaviors, so the implementation appears to be quite cracky.
MDN URL: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis
What information was incorrect, unhelpful, or incomplete?
the global across environments content is outdated.
es6-shim source code is changed, for example:
link: https://github.com/paulmillr/es6-shim/blob/master/es6-sham.js#L31
Specific section or headline?
What did you expect to see?
Did you test this? If so, how?
MDN Content page report details
en-us/web/javascript/reference/global_objects/globalthis
The text was updated successfully, but these errors were encountered: