Vinod Kumar
unread,Mar 3, 2025, 1:20:29 PMMar 3Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Chromium Extensions, Oliver Dunk, Chromium Extensions, Vinod Kumar, woxxom
I have added chrome.runtime.reload() to reload the extension inside the service worker.
if(Condition to reload extension) {
chrome.runtime.reload();
} else {
importAllScripts();
}
To prevent background scripts from being imported while reloading the extension, the importScripts () code was moved into a function. But I am getting the following error related to WorkerGlobalScope.
function importAllScripts() {
importScripts("backgroundscript1.js"); - Failing at this line with this error - Error handling response: NetworkError: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at '
importScripts("backgroundscript2.js");
importScripts("backgroundscript3.js");
}