4.7 Further reading and sources of this chapter
Environments and the global object in the ECMAScript specification:
- Section “Lexical Environments” provides a general overview over environments.
- Section “Global Environment Records” covers the global environment.
- Section “ECMAScript Standard Built-in Objects” describes how ECMAScript manages its built-in objects (which include the global object).
globalThis
:
- 2ality post “ES feature:
globalThis
” - Various ways of accessing the global
this
value: “A horrifyingglobalThis
polyfill in universal JavaScript” by Mathias Bynens
The global object in browsers:
- Background on what happens in browsers: “Defining the WindowProxy, Window, and Location objects” by Anne van Kesteren
- Very technical: section “Realms, settings objects, and global objects” in the WHATWG HTML standard
- In the ECMAScript specification, we can see how web browsers customize global
this
: section “InitializeHostDefinedRealm()”