diff --git a/chrome/test/index.ts b/chrome/test/index.ts index 8d0df4336e..3da3f534be 100644 --- a/chrome/test/index.ts +++ b/chrome/test/index.ts @@ -210,6 +210,19 @@ function executeScriptFramed () { } +// for chrome.tabs.TAB_ID_NONE +function realTabsOnly () { + chrome.webRequest.onBeforeRequest.addListener(function (details) { + if (details.tabId === chrome.tabs.TAB_ID_NONE) { + console.log("Request not related to a tab. %o", details); + return; + } + // ... + }, { + urls: [""] + }); +} + // contrived settings example function proxySettings() { chrome.proxy.settings.get({ incognito: true }, (details) => {