Search code examples
firefox-addonfirefox-addon-webextensions

What is the difference between popup, panel, and detached_panel?


I am using the Window manipulator web extension example to determine which browser.windows.create type I should use. The plugin allows you to quickly create popup, panel, and detached_panel windows.

Here's a snippet from the example:

let createData = {
      type: "panel",
    };
    let creating = browser.windows.create(createData);
    creating.then(() => {
      console.log("The panel has been created");
    });

The problem is that I can't tell the difference between these three types of windows. They all look the same to me.

The documentation at MDN mentions the names of the types but does not seem to explain the differences between them.

Is there something about my setup that is making it so I cannot tell the difference between these types of windows or is it just not readily apparent to the end user?


Solution

  • Firefox only differentiates two types "normal" (or not specified) and everything else. So popup, panel, and detached_panel are basically interchangeable.

    https://searchfox.org/mozilla-central/rev/a777ff11b6d700a698c61e5bd17e73b044304494/browser/components/extensions/parent/ext-windows.js#301-313