JS: migrate from the global window
to globalThis
As of mozjs68 (gjs-1.64) `globalThis` is recommended over `window` and it makes more sense in this context anyways. Migrate the few instances of `window` we use and adjust the eslint configuration. `window` will continue to resolve to `globalThis`, so this won't affect extensions or other downstream users. https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2322 closes #2322
This commit is contained in:
@ -125,8 +125,8 @@ function _sessionUpdated() {
|
||||
|
||||
function start() {
|
||||
// These are here so we don't break compatibility.
|
||||
global.logError = window.log;
|
||||
global.log = window.log;
|
||||
global.logError = globalThis.log;
|
||||
global.log = globalThis.log;
|
||||
|
||||
// Chain up async errors reported from C
|
||||
global.connect('notify-error', (global, msg, detail) => {
|
||||
|
Reference in New Issue
Block a user