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 50eb0d7 commit a483df4Copy full SHA for a483df4
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 ErrorCls = 'SensorErrorEvent' in globalThis ? globalThis.SensorErrorEvent : Error
120
- const error = new ErrorCls('error', {
+ const EventCls = 'SensorErrorEvent' in globalThis ? globalThis.SensorErrorEvent : Event
+ const error = new EventCls('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