function onRemoved() {
console.log(`Removed`);
}
function onError(error) {
console.log(`Error: ${error}`);
}
let removing = browser.tabs.remove(2);
removing.then(onRemoved, onError);tabs.remove() / notebook
tabs.remove()
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
function onRemoved() {
console.log(`Removed`);
}
function onError(error) {
console.log(`Error: ${error}`);
}
let removing = browser.tabs.remove([15, 14, 1]);
removing.then(onRemoved, onError);