Closed bmenant closed 9 years ago
As far as I know, the only way for extension to reload another extension, is by using chrome.management.setEnabled() and that what makes the background page inspection window to close itself.
Do you know of any other way to do so?
Unfortunately, I have no idea.
There is a method called chrome.runtime.reload()
... It’s a bit surprising and frustrating that they didn’t add a reload method to the management object, isn’t it?
Indeed :)
One way to do it is to reload the chrome://extensions page.
chrome.tabs.query({url: 'chrome://extensions'}, function(tabs) {
if (tabs.length === 0) {
//Create a new tab of chrome://extensions
} else {
chrome.tabs.reload(tabs[0].id)
}
});
The background page inspector is the most important tool for extension development. Unfortunately, when the chrome-extensions-reloader reloads an extension, it shuts everything down, including its inspector. As a result, we have to reopen the background inspector each time we save changes... which is painful and makes this extension useless
I am pretty sure there is a way to reload extensions without closing those background inspectors. For instance, the “Reload” button provided on the Chrome’s extension page keeps them opened. Any idea?