I have a question about chrome extension install/update event. If I add the onInstalled event listener in a top level code in the background script, is there a time frame in
Given that the document says
“Listeners must be registered synchronously from the start of the page.”
and
“Do not register listeners asynchronously, as they will not be properly triggered.”
, it seems they guarantee every synchronously-attached listener not to miss any, no matter how long it takes to evaluate your code. And this would be done by Chrome firing events after evaluating your entire code.
My hypothesis is that onInstalled
actually works like onInitialized
. No test data, though.