Scriptlets
Scriptlets copied to clipboard
Fix removing element in 'trusted-create-element'
It looks like that if cleanupDelayMs parameter is used, then removed element is added and removed again few times.
Steps to reproduce:
- Add this rule:
example.org#%#//scriptlet('trusted-create-element', 'body', 'div', '', '', '1000')
- Go to - https://example.org/
Added div should be removed after 1 second, but it's added again few times and then removed.
I guess that we should disconnect MutationObserver after removing element.