function handleMoved(tabId, moveInfo) {
console.log(
`Tab ${tabId} moved from ${moveInfo.fromIndex} to ${moveInfo.toIndex}`,
);
}
browser.tabs.onMoved.addListener(handleMoved);tabs.onMoved / notebook
tabs.onMoved
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.