Giter Club home page Giter Club logo

Comments (11)

sentialx avatar sentialx commented on June 27, 2024

is your popup in the same session as where the extension is loaded?

from electron-extensions.

RangerMauve avatar RangerMauve commented on June 27, 2024

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. 🤔

from electron-extensions.

sentialx avatar sentialx commented on June 27, 2024

Any errors in the background page webcontents?

from electron-extensions.

RangerMauve avatar RangerMauve commented on June 27, 2024

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. 🤔

from electron-extensions.

RangerMauve avatar RangerMauve commented on June 27, 2024

I'm adding all the windows with extensions.addWindow

Could the sandboxing be preventing necessary IPC messages or something?

from electron-extensions.

sentialx avatar sentialx commented on June 27, 2024

I think not, but I'm not sure

from electron-extensions.

sentialx avatar sentialx commented on June 27, 2024

What's actually preventing you from using the new version of this lib?

from electron-extensions.

RangerMauve avatar RangerMauve commented on June 27, 2024

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.

from electron-extensions.

RangerMauve avatar RangerMauve commented on June 27, 2024

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?

from electron-extensions.

sentialx avatar sentialx commented on June 27, 2024

Oh, you should set session.activeTab property to the corresponding web contents id by yourself.

from electron-extensions.

RangerMauve avatar RangerMauve commented on June 27, 2024

It worked! Thank you so much. 😁

I'll submit a PR to the 6-x-y branch with some docs on the activeTab portion. 💜

from electron-extensions.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.