Does anybody know of a reliable way to work out if a particular chrome extension is enabled or not?
The docs suggest that 'chrome.extension.sendRequest' calls the callback function if an error occurs, but this doesn't seem to be the case if the exten开发者_如何学Gosion itself doesn't exist.
I've also tried opening a connection to the extension and using the onDisconnect handler to register if the extension doesn't exist. This does seem to work, but I'm at a loss as to how to do one thing if the disconnect handler is called, or another thing if it isn't.
Any suggestions would be much appreciated.
You can check it with chrome.management.*
API.
精彩评论