Provide (or document) access to webextensions window and tab ids for hybrid add-ons and experiments




WebExtensions: Frontend
2 years ago
5 months ago


(Reporter: aswan, Assigned: rpl)


51 Branch

Firefox Tracking Flags

(Not tracked)


(Whiteboard: [hybrid] triaged)



2 years ago
Webextensions APIs use their own identifiers for windows and tabs that are managed by WindowManager and TabManager in ext-utils.js (

With hybrid add-ons and webextensions experiments, authors may write privileged code that interacts directly with webextensions code, but to do so, they need to be able to interpret the identifiers managed by those utilities.  Those utilities are in a state right now where they aren't completely hidden but they aren't formally exported nor are they documented.

If hybrid add-ons and experiments are going to be useful, we need to streamline this, at the very least by documenting how to access and use {Window,Tab}Manager.

Comment 1

2 years ago
luca question?  do we want to write a module to handle simple cases for one or both directions 
-  ID to object more valuable and less dangerous one first.  does is make sense to do in XUL element into ID also?
- drawbacks - more touching of internal stuff, so can impact other APIs if change object this is related to.
- tabs and window IDs are fine, frame IDs too complex.  all assigned in main process.
- could just doc, but potentially more confusing than first cut.
Assignee: nobody → lgreco
Priority: -- → P2
Whiteboard: [hybrid] triaged
For sessions.restore, I am going to need a Firefox Window object that corresponds to a windows.Window (i.e., WebExtensions API) object. Is that something I can get at right now, or does something related to this bug need to be done first in order to allow me to translate between an API window and a real window?

Comment 3

5 months ago
It seems like this might not be needed now, although you say it could be used for WebExtension experiments. Is this something we should keep open?
Flags: needinfo?(aswan)

Comment 4

5 months ago
We have this via extension.tabManager and .windowManager.
/me gets back to work on extension api development docs.
Last Resolved: 5 months ago
Flags: needinfo?(aswan)
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.