-
-
Notifications
You must be signed in to change notification settings - Fork 26
How to properly open windows for browser Action popups #32
Comments
is your popup in the same session as where the extension is loaded? |
I think so, yeah. Here's where I'm setting the partition: https://github.com/RangerMauve/agregore-browser/blob/master/app/extensions/index.js#L48 Here's where I'm using the partition for the web contents: https://github.com/RangerMauve/agregore-browser/blob/master/app/ui/index.html#L25 It looks like the content scripts from plugins are being injected just fine. 🤔 |
Any errors in the background page webcontents? |
Hey! Thanks for the follow up, I had to focus on other stuff for a while, just getting back into this. It seems that it's having issues with getting the active tab URL. It looks like the action popups might be spawning correctly, but I'm not sure how the active tab stuff would work here. 🤔 |
I'm adding all the windows with extensions.addWindow Could the sandboxing be preventing necessary IPC messages or something? |
I think not, but I'm not sure |
What's actually preventing you from using the new version of this lib? |
I think maybe docs? I tried upgrading earlier and I could get anything to work anymore. 😅 I could try again some time soon. So far I'm thinking it's a race condition where when I click on the action, the BrowserView containing the web content loses focus and therefore there's no longer an active tab to query. |
Err, it doesn't look like the activeTab variable is getting set anywhere? I'll see if that's the issue and maybe I could submit a PR to fix it if that's the case? |
Oh, you should set |
It worked! Thank you so much. 😁 I'll submit a PR to the 6-x-y branch with some docs on the activeTab portion. 💜 |
Hey! I'm loving the library. I'm currently working on getting darkreader to run, and I'm having a problem with the popup action.
I'm opening a page to the popupPage URL, and it's loading, but it's stuck on a loading page.
Similarly, when I try to load the beastify webextension example, it's giving me the error
browser is not defined
. Is there some additional setup I need to do for these pages to make them work correctly? Like, do I need to manually inject the preload script into them?I'm using electron-extension 6.0.4 and electron 9.2.0
The text was updated successfully, but these errors were encountered: