1

I would like to know if there is a way to create the same kind of a popup window that you can get with the API for toolbar button or address bar button described here: Popups API documentation Either achieved true the WebExtensions API or other means.

More specifically I do not need the window title bar or title bar buttons nor the address bar, forward/backward buttons etc. Like shown here:

Pop up example picture

According to the documentation you can create extension pages, but they do include title bar and title bar buttons - Extension pages API documentation Like this one: enter image description here

Purpose: I have created my self an extension which adds a button to the contents of a specific web site. When the button is pressed it opens a new tab with a certain cross origin web page. I do not want to click around closing the opened new tab to go back to the previous. A pop up page here will make my life a bit easier as whenever you click outside of it - it closes.

What I tried: Tried opening the external web page as a modal <iframe>. But this leads to a CSP violation in the rare cases that I need to interact with it.

The used images are from the MDB web docs

l000p
  • 176
  • 1
  • 11
  • 2
    Extensions can't do that. Extensions can add a frame element into the web page and make it look like that. See also [Injecting iframe into page with restrictive Content Security Policy](https://stackoverflow.com/a/24649134) – wOxxOm Mar 24 '21 at 11:04
  • @wOxxOm this is a lifesaver. Thanks for providing that answer in the comments. If you submit it as an answer I will be very happy to accept it. – l000p Mar 25 '21 at 07:23

0 Answers0