function handleDetached(tabId, detachInfo) {
console.log(`Tab: ${tabId} moved`);
console.log(`Old window: ${detachInfo.oldWindowId}`);
console.log(`Old index: ${detachInfo.oldPosition}`);
}
browser.tabs.onDetached.addListener(handleDetached);tabs.onDetached / notebook
tabs.onDetached
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.