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

[electron-chrome-web-store] Allow installExtension to optionally call beforeInstall

Open Kilian opened this issue 6 months ago • 4 comments

beforeInstall triggers when installing from the chrome web store, but not when calling installExtension.

That makes sense, but it would be nice if an option could be added to installExtension to go through that flow

Kilian avatar Jun 02 '25 14:06 Kilian

What's the use case for this flow? Chrome web store pages contain extension metadata ahead of time which is why beforeInstall only works with installChromeWebStore.

installExtension isn't able to fetch this metadata which is why prompting isn't possible. Technically you could scrape the extension's web store page if you wanted to emulate this behavior.

samuelmaddock avatar Jun 17 '25 04:06 samuelmaddock

My use case is that have an "add extension" button in my UI as well when a chrome store page is detected. Those pages are not responsive, so a custom button in the UI is easier than horizontally scrolling the page.

I'll try extracting the same info from the page and building my own prompt, but given that electron-chrome-web-store already does this, it would be nice if that was accessible.

Kilian avatar Jun 17 '25 09:06 Kilian

Could your "add extension" button press the "Add to Chrome" button in the webpage?

samuelmaddock avatar Jun 18 '25 05:06 samuelmaddock

yep!

Kilian avatar Jun 18 '25 07:06 Kilian