Closed Bug 1307348 Opened 8 years ago Closed 7 years ago

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

Categories

(WebExtensions :: Frontend, defect, P2)

51 Branch
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: aswan, Assigned: rpl)

Details

(Whiteboard: [hybrid] triaged)

Webextensions APIs use their own identifiers for windows and tabs that are managed by WindowManager and TabManager in ext-utils.js (http://searchfox.org/mozilla-central/source/browser/components/extensions/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.
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?
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)
We have this via extension.tabManager and .windowManager. /me gets back to work on extension api development docs.
Status: NEW → RESOLVED
Closed: 7 years ago
Flags: needinfo?(aswan)
Resolution: --- → FIXED
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.