function handleClick() {
browser.sidebarAction.open();
}
browser.browserAction.onClicked.addListener(handleClick);User actions / notebook
User actions
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
async function handleClick() {
let result = await someAsyncFunction();
// this fails, because the handler lost its "user action handler" status
browser.sidebarAction.open();
}
browser.browserAction.onClicked.addListener(handleClick);