Is my browser action button on the overflow menu?

As far as I can tell, the following is impossible, the API doesn’t provide direct access to this information. Is anyone aware of a method for obtaining the information indirectly?

browser.menus.onClicked.addListener((menuInfo, currTab) => {
    switch (menuInfo.menuItemId) {
        case 'bamenu_reload':
            oPrefs.popuptab = 3;
            /**** The following does not appear to exist ****/
            let buttonhidden = await browser.browserAction.isOverflowed({
                tabId: currTab.id
            });
            if (buttonhidden){
                // Show in a window
                browser.windows.create({
                    url: browser.extension.getURL('popup.html'),
                    type: "popup", state: 'normal', 
                    top: 50, width: 706, height: 604
                });
            } else {
                // Trigger the popup from the button and then remove the popup
                browser.browserAction.setPopup({popup: browser.extension.getURL('popup.html')})
                .then(browser.browserAction.openPopup())
                .then(browser.browserAction.setPopup({popup: ''}));
            }
            break;
    }
});

You could detect it based on the popup sizing.

Hmm, I imagine it would be somewhat unsightly to close the popup and launch a window. Maybe some animation??

Currently, when I reset the browser action by calling

browser.browserAction.setPopup({popup: ''})

the popup just closes instantly, which is not what happens when the button is on the toolbar.

No one has complained about this yet, it’s more of a theoretical possibility, so I may mull this for a while.

Yes. However you asked if there was a way to detect it… I honestly think you should instead try and invest resources into making your interface work when opened from the overflow menu instead. It would also make it easier to make the extension UI work on mobile, for example.