electron-browser-shell icon indicating copy to clipboard operation
electron-browser-shell copied to clipboard

[electron-chrome-web-store] installed callback

Open Kilian opened this issue 9 months ago • 7 comments

Currently there is no way to keep track of the installed extensions (other than reading from disk). It would be great if electron-chrome-web-store emitted an event with the extension details (manifest, installation id, folder) so I can keep track of installed extensions and display them in a management interface where user can manually update or remove them.

Kilian avatar Mar 05 '25 14:03 Kilian

Electron's session.getAllExtensions contains this information. Is there anything missing from that API?

samuelmaddock avatar Mar 05 '25 14:03 samuelmaddock

That doesn't trigger when you press the "install in X" button.

Kilian avatar Mar 05 '25 15:03 Kilian

That doesn't trigger when you press the "install in X" button.

The session 'extension-loaded' event should be emitted whenever an extension is loaded into the session. This will be emitted when an extension is installed.

samuelmaddock avatar Mar 06 '25 03:03 samuelmaddock

Hey @Kilian, I'm planning to add an afterInstall as an option when calling installChromeWebStore.

Would that fit your use case?

iamEvanYT avatar Apr 21 '25 18:04 iamEvanYT

@iamEvanYT yeah. My main use case is making sure extensions are installed in all sessions. There'd be multiple solutions for that, but this works!

Kilian avatar Apr 22 '25 11:04 Kilian

Alright. Submitting a PR right now.

iamEvanYT avatar Apr 22 '25 15:04 iamEvanYT

The session 'extension-loaded' event should be emitted whenever an extension is loaded into the session. This will be emitted when an extension is installed.

@samuelmaddock / other readers: this will also be emitted every app start when electron-chrome-web-store loads the already installed extensions, so it's not a good signal for "newly installed extension".

Kilian avatar Jun 03 '25 12:06 Kilian