fregante / content-scripts-register-polyfill

WebExtensions: Polyfill for browser.contentScripts.register() for Chrome.
https://npm.im/content-scripts-register-polyfill
MIT License
25 stars 6 forks source link

`unregister` does not unload the CSS #25

Closed fregante closed 3 years ago

fregante commented 3 years ago

Not a huge bug for Chrome users because even disabling an extension won't cause the stylesheet to be unloaded, but it might still be nice to implement it to match Firefox’ behavior.

const registered = await contentScript.register({
    css: ['file.css']
});
registered.unregister(); // Will not unload file.css
fregante commented 3 years ago

It turns out Firefox does not unload it either, so it's not a bug. Details in: