Code Monkey home page Code Monkey logo

Comments (6)

captnfab avatar captnfab commented on August 19, 2024 1

@grahamperrin I browsed through the webextension API and found no such thing as a function returning the PID of a tab. This is to be expected, for two reasons. First, the pid is an os-dependant notion, some os could have uuid instead of pid, others might not allow for mpc and so force the use of threads, etc. But an api for extensions has to be the same for all platforms. Secondly, revealing the pid to a webextension might be a security risk, since it would mean potentially revealing the pid to the entire web.

I searched for such functions in the xul api too, but couldn't manage to find anything else that the snippet present in the bug repport you mentioned.

So, sorry, I'd gladly implement this feature, but I can't do it unless there is a way to get the pid through the API.

from firetitle.

captnfab avatar captnfab commented on August 19, 2024 1

Except it doesn't work.

from firetitle.

grahamperrin avatar grahamperrin commented on August 19, 2024

Thanks for the quick response. WebExtensions APIs aside, for a moment …

… I found https://github.com/mystor/content-pid for a legacy extension. No screenshot at https://addons.mozilla.org/addon/content-pid/, I'll add the extension to a test profile to tell how it presents itself …

from firetitle.

captnfab avatar captnfab commented on August 19, 2024

I see. This addon use the bootstrap api, and it looks like it was indeed possible...

from firetitle.

captnfab avatar captnfab commented on August 19, 2024

I spoke too soon. Apparently, there is a way to retrieve the process id from a frame: https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/webNavigation/getFrame

Rather here: https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/webNavigation/onDOMContentLoaded

from firetitle.

captnfab avatar captnfab commented on August 19, 2024

Apparently, this is being deprecated and removed from the api. See for example the chrome api: https://developer.chrome.com/extensions/webNavigation#method-getFrame

from firetitle.

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.