Skip to content

Fix 'prevent-element-src-loading' — thrown error if 'thisArg' is undefined #270

@AdamWr

Description

@AdamWr

Steps to reproduce

  1. Add this rule
example.org#%#//scriptlet('prevent-element-src-loading', 'script', 'TEST_WHATEVER_QWERTYU')
  1. Go to - https://example.org/
  2. In browser console run:
addEventListener('visibilitychange', () => {
    console.log('test');
});

Script should works correctly, but it throws error, because thisArg is undefined in this case.

Screenshots

image

image

It looks like that it's a new issue and it worked correctly in previous version (I mean in scriptlets library 1.6.x).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions