I'm writing a Chrome extension using Manifest v3 and I'd like:
- The
actionto specify a popup page (i.e.popup.html) and - Have a function run each time that popup is displayed.
I know the Chrome Extension API has the action.onClicked event (to which I could subscribe in background.js), but the documentation (here) states:
The
action.onClickedevent will not be dispatched if the extension action has specified a popup to show on click on the current tab.
Unfortunately, I want to both show the popup page and run a quick function (to update that popup page) on each fresh extension button push. Since the popup page is itself a web page, is there some other event to which I can subscribe for when the popup is displayed (each time)?