Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想记录一个 chrome 应用程序的活动,这是一个新的标签替换。单击链接将使应用程序在当前窗口中加载新页面。如何记录此类活动,console.log 似乎没有做任何事情。我是新手,请帮忙。谷歌开发页面不是很广泛:(
您可以console.log()从后台页面使用并处理来自此代码的每个页面的加载:
console.log()
chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab){ if(changeInfo['status'] == 'complete'){ console.log(tabId, changeInfo['url'], tab['url']); } });