Closed Bug 1487017 Opened 7 years ago Closed 7 years ago

WebExtensions API unreachable from pages, even when opened by the API

Categories

(Thunderbird :: Add-Ons: Extensions API, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 63.0

People

(Reporter: darktrojan, Assigned: darktrojan)

References

Details

Attachments

(1 file)

I've started to create some proof-of-concept extensions, but they're rather unusable at the moment because you can't open a tab with a moz-extension:// page in it, and have that page access the API. I've done some investigating into how to inject the API, but I'm hoping the Firefox team will point me in the right direction.
It seems like this might be something useful to remember for later.
Assignee: nobody → geoff
Status: NEW → ASSIGNED
Attachment #9005130 - Flags: review?(philipp)
Comment on attachment 9005130 [details] [diff] [review] 1487017-initialise-browser-1.diff Review of attachment 9005130 [details] [diff] [review]: ----------------------------------------------------------------- Neat trick! Does this insert the background page APIs, or the content scripts APIs? I'm thinking it should insert the same subset as if you opened the page in the browser, which I believe isjust the storage apis, message passing and whatever else I forgot. r+ if this is the case, otherwise I'd appreciate if you could revise.
Attachment #9005130 - Flags: review?(philipp) → review+
Maybe webextension-view-type is something to look into.
I don't understand. A moz-extension page has the same permissions as the background page.
That answers my question. I was thinking that depending on how they are openend moz-extension pages would have a limited set of API permissions, similar to how content scripts just have a few APIs like the storage API and then do message passing. As you mention they have the same permissions as background pages, so the r+ stands and this can go in.
Keywords: checkin-needed
Pushed by mozilla@jorgk.com: https://hg.mozilla.org/comm-central/rev/5a27c6b6d6c9 Tell the WebExtensions mechanism about content tab <browser>, so the API is injected. r=philipp
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 63.0
Component: General → Add-Ons: Extensions API
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: