function handleUpdated(tabId, changeInfo, tabInfo) { console.log(`Updated tab: ${tabId}`); console.log("Changed attributes: ", changeInfo); console.log("New tab Info: ", tabInfo); } chrome.tabs.onUpdated.addListener(handleUpdated);
或者
chrome.tabs.onUpdated.addListener(function (tabId, changeInfo, tab) { alert(tabId); });
标签:addListener,tabId,console,onUpdated,chrome,tabs From: https://www.cnblogs.com/wingxyz/p/16890846.html