2 ms·
Access to the global object is not at all restricted in strict mode. The changes in strict mode related to the global object are: - can’t define implicit global
by realityking 7y ago
Access to the global object is not at all restricted in strict mode. The changes in strict mode related to the global object are:
- can’t define implicit global variables (you need to be explicit)
- “this” doesn’t refer to the global object
The problem is that different host environment have different names for the global object. That’s what make it hard to write code that works independent of the host environment and that’s what globalThis is aiming to fix.