mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 04:50:18 +00:00
add test for chrome.tabs.TAB_ID_NONE
This commit is contained in:
@@ -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: ["<all_urls>"]
|
||||
});
|
||||
}
|
||||
|
||||
// contrived settings example
|
||||
function proxySettings() {
|
||||
chrome.proxy.settings.get({ incognito: true }, (details) => {
|
||||
|
||||
Reference in New Issue
Block a user