function onGot(tabInfo) {
console.log(tabInfo);
}
function onError(error) {
console.log(`Error: ${error}`);
}
const gettingCurrent = browser.tabs.getCurrent();
gettingCurrent.then(onGot, onError);tabs.getCurrent() / notebook
tabs.getCurrent()
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.