I am trying to wire some analytics into the onStartup
event of my Chrome Extension per the docs. However, the event never seems to fire when the extension is opened via the icon in the browser.
Note that the onInstalled
event in the below code fires as expected when the extension is installed, reloaded, etc.
chrome.runtime.onInstalled.addListener(function(details) {
console.log('Extension installed: ' + details.reason);
});
chrome.runtime.onStartup.addListener(function() {
console.log('Extension started');
});
Note I'm running Chrome v37 - the onStartup
event has been available since v23.