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