simplify application and remove window references
Sonarqube Scanner / Build and analyze (push) Failing after 1m27s

This commit is contained in:
Florian Zumpe
2026-06-17 16:08:01 +02:00
parent 6a4d84ac6a
commit 32f161483d
20 changed files with 560 additions and 282 deletions
+4 -4
View File
@@ -22,7 +22,7 @@
}
async function requestPermission() {
const orientation = window.DeviceOrientationEvent;
const orientation = globalThis.DeviceOrientationEvent;
if (!orientation) return false;
if (typeof orientation.requestPermission === 'function') {
@@ -51,14 +51,14 @@
if (heading != null) callback?.(heading);
};
eventNames.forEach(name => window.addEventListener(name, listener, true));
eventNames.forEach(name => globalThis.addEventListener(name, listener, true));
return true;
},
stop() {
if (listener) eventNames.forEach(name => window.removeEventListener(name, listener, true));
if (listener) eventNames.forEach(name => globalThis.removeEventListener(name, listener, true));
listener = null;
callback = null;
}
};
}(window.Wegwichtel));
}(globalThis.Wegwichtel));