簡體   English   中英

使用Chrome.tabs API獲取在所有標簽中打開的URL

[英]Get URLs opened in all tabs using Chrome.tabs api

每當應用程序中發生onbeforeunload事件時,我都想使用chrome.tabs api檢查我的應用程序當前打開了多少個標簽。

所以我想知道是否有可能使用chrome.tabs做到這一點,那怎么辦呢。

chrome.tabs.query({windowType:'normal'}, function(tabs) {
    console.log('Number of open tabs in all normal browser windows:',tabs.length);
}); 

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM