Open Bug 1378568 Opened 7 years ago Updated 2 years ago

Add a tabs.captureActiveTab or equivalent

Categories

(WebExtensions :: General, enhancement, P5)

enhancement

Tracking

(Not tracked)

People

(Reporter: andy+bugzilla, Unassigned)

Details

(Whiteboard: [design-decision-approved])

Attachments

(1 file)

Currently tabs.captureVisibleTab requires the <all_urls> permission. That's triggers a rather more scary warning to the user. That's probably because it can be passed a window parameter and capture the tab thumbnail for any tab in a window. It would be cool if we could have a thumbnail generator that is scoped just to the activeTab permission. We could make a new API for that, or limit the existing API to reject the API call if window is specified and <all_urls> is not requested. As an example, sidebar-tabs-redux asks for all_urls to use this API and if this API existed it wouldn't have to. Example add-on: https://addons.mozilla.org/en-US/firefox/addon/tab-center-redux/ Capture visible tab API: https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/Tabs/captureVisibleTab
s/warning/permission/ Generally, the less extensions asking for <all_urls>, the better.
Priority: -- → P5
Whiteboard: [design-decision-needed]
This has been added to the agenda for the September 5, 2017 WebExtensions APIs triage meeting. Anyone interested in this bug is welcome to attend! Wiki: https://wiki.mozilla.org/Add-ons/Contribute/Triage#Next_Meeting Agenda: https://docs.google.com/document/d/13gmYyN0qCjzV7YAsqGpbeeHr3al0yiWP7ayqKJPLS2w/edit#
Whiteboard: [design-decision-needed] → [design-decision-approved]
Comment on attachment 8905187 [details] bug 1378568 allow activeTab for captureVisibleTab https://reviewboard.mozilla.org/r/176966/#review182042 This changes the definition of activeTab per mdn docs which defines it as being triggered by a user action.
Attachment #8905187 - Flags: review?(mixedpuppy)
Thanks Shane, that's a good point. I don't really want to change the meaning of activeTab. The thumbnail exposes the content of the page, so it is actually accessing the data of the page. We could put in a "Access the screenshot" of the page permission, but I'm not sure its worth it.
Product: Toolkit → WebExtensions
Component: Untriaged → General
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: