async function shownInActiveTab() {
let tabs = await browser.tabs.query({
currentWindow: true,
active: true,
});
let shown = await browser.pageAction.isShown({
tabId: tabs[0].id,
});
console.log(shown);
}pageAction.isShown() / notebook
pageAction.isShown()
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.