If this sounds appealing to you, you may be happy to know that XUL lives on as Unified XUL Platform (UXP) and is still supported by currently maintained browsers.
UXP: https://repo.palemoon.org/MoonchildProductions/UXP
Pale Moon: https://www.palemoon.org/
Basilisk: https://www.basilisk-browser.org/faq.html
SeaMonkey: https://www.seamonkey-project.org/
You can probably drop an absolutely positioned block (relative to the browser chrome, outside the tabbrowser) too, but I think that didn't work in some older versions?
Note that this is all based on very vague memories, so may be off… Also, both scenarios don't bother injecting anything inside the content. This unfortunately means you need to do some annoying math to position things correctly (in particular if funny DPIs are involved).
>However, you should not consider this a strong security mechanism, because there are ways it can be evaded, for example by browser extensions running in the page. It's more of an indication that the page should not access the internals of your shadow DOM tree.
https://developer.mozilla.org/en-US/docs/Web/API/Web_compone...
This presentation talks about using window.find() and other methods:
https://speakerdeck.com/masatokinugawa/shadow-dom-and-securi...