0

I newbie in chrome extension and I need help in this case, I have a problem where setTimeoutis not working properly it is running crazy like this 15 sec,10 sec,1 sec,1 sec,1 sec ... I tried also to use setInterval but I got same issue

chrome.webNavigation.onErrorOccurred.addListener(info => {
if (!info.frameId && (info.error === 'net::ERR_NAME_NOT_RESOLVED' || 'net::ERR_TUNNEL_CONNECTION_FAILED')) {
console.log(info)
setTimeout(timeoutTrigger(info),15000)
}
});
function timeoutTrigger(info)
{
chrome.tabs.update(info.tabId, {url: info.url});
}
Mr.Max
  • 1

0 Answers0