globalThis
Widely available since 2022-07-15
The globalThis
property accesses the global this
value (and hence the global object itself) across environments.
Learning resources on MDN
Browser support
- Chrome 71 Released on 2018-12-04
- Chrome Android 71 Released on 2018-12-04
- Edge 79 Released on 2020-01-15
- Firefox 65 Released on 2019-01-29
- Firefox for Android 65 Released on 2019-01-29
- Safari 12.1 Released on 2019-03-25
- Safari on iOS 12.2 Released on 2019-03-25
Specifications
- ECMAScript Language Specification (#sec-globalthis), from TC39 (Ecma International).