We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f4a8eb2 commit dbdc047Copy full SHA for dbdc047
src/features/harmful-apis.js
@@ -116,8 +116,8 @@ export default class HarmfulApis extends ContentFeature {
116
if (settings.blockSensorStart) {
117
wrapMethod(globalThis.Sensor?.prototype, 'start', function () {
118
// block all sensors
119
- const EventCls = 'SensorErrorEvent' in globalThis ? globalThis.SensorErrorEvent : Event
120
- const error = new EventCls('error', {
+ const ErrorCls = 'SensorErrorEvent' in globalThis ? globalThis.SensorErrorEvent : Error
+ const error = new ErrorCls('error', {
121
error: new DOMException('Permissions to access sensor are not granted', 'NotAllowedError')
122
})
123
// isTrusted will be false, but not much we can do here
0 commit comments