Skip to content

Fix 'trusted-create-element' — do not add element on every DOM changes #450

@AdamWr

Description

@AdamWr

Currently element is added every time when there is change in DOM.

Steps to reproduce:

  1. Add these rules:
example.org#%#//scriptlet('trusted-create-element', 'body', 'a')
example.org#%#//scriptlet('trusted-create-element', 'body', 'div')
  1. Go to - https://example.org/

Website is unresponsive because elements are added in the loop.


Consider also a case when one element is added inside another:

example.org#%#//scriptlet('trusted-create-element', 'body', 'foo')
example.org#%#//scriptlet('trusted-create-element', 'body > foo', 'bar')

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions