It’d be much more secure to allow the extension to do that without requiring it to put this into the page.
For example, currently you have the DOM of the page, and the extension’s UI is injected into it.
It would be preferable if you’d treat each tab as if it was like
<tab>
<browser src="actualpage"/>
<overlay src="extension1"/>
</tab>
This way an extension that wants to show secure UI on top could do it, and style it, but without it being accessible to the page itself.