See console...

Tested on Chrome, FireFox, Safari 13.1.3

In strict mode, `this` in a function is `undefined` while it is `window` in non-strict mode. `self`, `frames`, `globalThis` are always `window` in both strict and non-strict mode. So, to reference `window`, use `self`, `frames`, or `globalThis` because they work in both strict and non-strict mode.