I want to access the properties of an object windowfrom a background script. I have this in manifest.json:
{
"..": "..",
"permissions": ["http://*.mysite.net/"],
"background": {
"scripts": ["extension.js"]
}
}
and this is in extension.js:
chrome.tabs.onUpdated.addListener(function (tabId, changeInfo, tab) {
if (changeInfo.status === 'complete') {
var tabWindowObject = ??
setInterval(tabWindowObject.someFunction, 10);
}
});
I need this here and not elsewhere (without content scripts and without script). How to get tabWindowObjectin extension.js? In other words, I want to access the tab context inside the Chrome script background.
source
share