globalThis
and/or window
globalThis
If you like to stick things on globalThis
.
- globalthis (npm link).
var globalThis = require('globalthis/polyfill')();
- the usage of
var
there (rather thanlet
orconst
) is appropriate (not just stylistic)
- the usage of
- MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis