Just out of curiosity, how would you access the global window object inside a function with this signature:
function bla(window){
// How to access the global 'window' object here? Because 'window' is now local.
}
You could use globalThis
a = 1;
function x(window) {
console.log(window.a)
console.log(globalThis.a)
}
x({ a: 2 })