globalThisBaseline · Widely available
The globalThis property accesses the global this value (and hence the global object itself) across environments.
Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Jan 15, 2020. Widely available since Jul 15, 2022.
Browser support
DesktopChrome
1–70Not supported
71+Supportedsince Dec 4, 2018
Current: 155Edge
12–18Not supported
79+Supportedsince Jan 15, 2020
Current: 154Firefox
1–64Not supported
65+Supportedsince Jan 29, 2019
Current: 157Safari
1–12Not supported
12.1+Supportedsince Mar 25, 2019
Current: 27MobileChrome Android
18–70Not supported
71+Supportedsince Dec 4, 2018
Current: 155Firefox Android
4–64Not supported
65+Supportedsince Jan 29, 2019
Current: 157Safari iOS
1–12Not supported
12.2+Supportedsince Mar 25, 2019
Current: 27How to use
This feature is Baseline widely available — use it freely, no fallback needed.
Example
Full syntax and examples are on MDN: globalThis.
Feature detection
JS · check before using
if (typeof globalThis !== "undefined") {
// globalThis is available
}