Page clean up after extension disabled/uninstalled

My extension add some extra HTML to the users page. How can I delete this when extension context will loss?

In Google Chrome I can detect it using code below.

setInterval(() => {
    if (! || === undefined) {
}, 2000);

There is some example - extension add border and spelling errors counter inside of textarea. After extension context loss those elements isn’t clickable.
Screenshot 2020-02-01 at 18.52.31

There is no reliable way for clean up.

That’s bad news :frowning:

Is there exists any hack for workaround this problem?

I believe that reliable ways include workarounds. Unless workarounds may involve the user, in which case it is to reload the page after the extension was disabled or uninstalled.