DEV Community

loading...

globalThis in a nutshell

Beto Muniz
Indie Creator @ listtta.com ~ seujob.tech ~ protocoloalterado.com.br • OSS Crafter • Writing about Web Development
・1 min read

globalThis is a global object reference for client and server applications using JavaScript.

👉 It’s helpful to create cross-platform apps and libraries.

🔒 Due to security, globalThis is a Proxy reference of the global object on the browser.

globalThis.fetch("https://...");
Enter fullscreen mode Exit fullscreen mode

Discussion (0)