首页 > 其他分享 >chrome.tabs.onUpdated.addListener(。。

chrome.tabs.onUpdated.addListener(。。

时间:2022-11-14 23:01:07浏览次数:45  
标签:addListener tabId console onUpdated chrome tabs

 

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

相关文章