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