Vote count:
0
I'm trying to create a Chrome extension that executes some code (takes about 4 seconds) and afterwards does a callback that redirects the user to a page. However, no redirect takes place with the following code:
chrome.webRequest.onBeforeRequest.addListener(function(details) {
functionThatTakes4Seconds(function(){
return {
redirectUrl: redirect
};
);
}, {
urls: ["url.com"]
}, ["blocking"]);
When I don't run the function that takes 4 seconds the redirect works:
chrome.webRequest.onBeforeRequest.addListener(function(details) {
return {
redirectUrl: redirect
};
}, {
urls: ["url.com"]
}, ["blocking"]);
Does it timeout? Is there a workaround for this?
asked 51 secs ago
Chrome extension webrequest redirect after executing code that takes 4/5 seconds
Aucun commentaire:
Enregistrer un commentaire