by eejdoowad · 9y ago · 0 comments
1. Inject UI directly into the document
2. Inject an iframe containing the UI into the document
Both rely on manipulating the document, which can be used to fingerprint users. Most developers opt for 1 because it requires no setup and lets the content script synchronously access the UI. 2 is needed when the injected UI containing sensitive information.
I'd like an extension overlay API that lets you inject: 1. UI local to the tab 2. UI that persists across all tabs
In a brief #webextensions IRC discussion, I was told an overlay API isn't viable for a number of reasons, one of which is multiple extensions may conflict.
Interestingly, Firefox's sidebar API only allows a single sidebar to be shown.
It's exactly the same if two extensions would currently try to manipulate the page by adding a frame (or, worse, a <div> with non-isolated UI) to the same location.
The only difference is, with out-of-page widgets (e.g. overlay regions or popouts), they won't be visible in the page's DOM.