Bug 1213477 (webext-tabs)

Complete the implementation of chrome.tabs

RESOLVED FIXED

Status

()

Toolkit
WebExtensions: Untriaged
P2
normal
RESOLVED FIXED
2 years ago
8 months ago

People

(Reporter: andym, Unassigned)

Tracking

(Depends on: 1 bug, Blocks: 1 bug)

unspecified
Points:
---
Dependency tree / graph
Bug Flags:
blocking-webextensions -

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [tabs]triaged)

(Reporter)

Description

2 years ago
The methods on the API are:

https://developer.chrome.com/extensions/storage

To be implemented (maybe). Because Firefox cannot select multiple tabs, we can probably reject some of these.

    getCurrent()
    sendRequest()
    getSelected()
    duplicate()
    highlight()
    move()
    detectLanguage()
    captureVisibleTab()
    getZoom()
    setZoom()
    getZoomSettings()
    setZoomSettings()
(Reporter)

Comment 1

2 years ago
(In reply to Andy McKay [:andym] from comment #0)
> The methods on the API are:
> 
> https://developer.chrome.com/extensions/storage

Should be https://developer.chrome.com/extensions/tabs
Summary: Complete the implementation of chrome.storage → Complete the implementation of chrome.tabs
(Reporter)

Updated

2 years ago
Depends on: 1214007
(Reporter)

Comment 2

2 years ago
chrome.tabs.onActiveChanged.addListener used by Ghostery
Blocks: 1101189
(Reporter)

Updated

2 years ago
Blocks: 1214433
(Reporter)

Updated

2 years ago
Flags: blocking-webextensions+
Depends on: 1220124
getSelected is deprecated, so we probably shouldn't bother with it. (https://developer.chrome.com/extensions/tabs#method-getSelected)

OR we can make a simple method that just delegates to tabs.query {active: true}, for compatibility's sake. (which would be a [good first bug])
Depends on: 1231819
Assignee: nobody → kmaglione+bmo
Depends on: 1234086
Alias: webext-tabs
Depends on: 1238310
Depends on: 1238311
Depends on: 1238312
Depends on: 1238313
Depends on: 1238314
Depends on: 1238685
Depends on: 1240326

Comment 4

a year ago
Maybe not the right place to ask for it, but there are a few things that I use in my addons (https://addons.mozilla.org/en-US/firefox/addon/tab-deque/ and https://addons.mozilla.org/en-US/firefox/addon/bookmark-dial/) that are missing from webextensions and would be great to have:

 - Currently it's possible to hide a tab (https://github.com/sblask/firefox-tab-deque/blob/1b216da838e586e2653306410b4fcffb74887372/content/tabdeque.jsm#L361 or https://github.com/sblask/firefox-bookmark-dial/blob/master/lib/thumbnail.js#L30 (collapsed + disabled))
 - in order to minimize a tab I listen for mouse events on them (https://github.com/sblask/firefox-tab-deque/blob/1b216da838e586e2653306410b4fcffb74887372/content/tabdeque.jsm#L178) (not the same as https://developer.chrome.com/extensions/tabs#event-onActivated I would want to listen on an already activated tab)
 - Capture any tab, not just the visible one(I do that here https://github.com/sblask/firefox-bookmark-dial/blob/master/lib/thumbnail.js#L186 to generate thumbnails in the background)
(Reporter)

Updated

a year ago
Whiteboard: [tabs] → [tabs]triaged
(Reporter)

Comment 5

a year ago
(In reply to sblask from comment #4)
Please file bugs for any new methods you'd like to suggest.
(Reporter)

Updated

a year ago
Priority: -- → P1

Comment 6

a year ago
(In reply to Andy McKay [:andym] from comment #5)
> (In reply to sblask from comment #4)
> Please file bugs for any new methods you'd like to suggest.

I created https://bugzilla.mozilla.org/show_bug.cgi?id=1246693 (this describes more what I want) and https://bugzilla.mozilla.org/show_bug.cgi?id=1246706
Depends on: 1248499
(Reporter)

Updated

a year ago
Flags: blocking-webextensions+ → blocking-webextensions-
Assignee: kmaglione+bmo → nobody
(Reporter)

Comment 7

8 months ago
There's only one remaining blocker and kmag is on that one, so don't feel like this bugs serves much of a purpose - also ghostery the other blocker is now a webextension.
Status: NEW → RESOLVED
Last Resolved: 8 months ago
Priority: P1 → P2
Resolution: --- → FIXED

Comment 8

8 months ago
Is chrome.tabs.onReplaced.addListener implemented? I get the following message in the Console if I attempt to use chrome.tabs.onReplaced.addListener or browser.tabs.onReplaced.addListener:

In add-on a478fc5d00fa473c6d32e67ca6104e0c78d5e613@temporary-addon, attempting to use listener "tabs.onReplaced", which is unimplemented.

Here is the code:

chrome.tabs.onReplaced.addListener(function(addedTabId, removedTabId) 
{
	console.log('onReplaced: addedTabid='+addedTabId+' removedTabId='+removedTabId);
});

The related documentation is here:
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/tabs/onReplaced
(Reporter)

Comment 9

8 months ago
It has and I tried it quickly and it seemed to work for me. If you can't get it working could you make a new bug and a attach the smallest possible example use case?

Comment 10

8 months ago
(In reply to Andy McKay [:andym] from comment #9)
> It has and I tried it quickly and it seemed to work for me. If you can't get
> it working could you make a new bug and a attach the smallest possible
> example use case?

I added a new bug as you suggested: https://bugzilla.mozilla.org/show_bug.cgi?id=1305528

I attached an unsigned .xpi to it containing a minimal extension that contains the code I gave above.
You need to log in before you can comment on or make changes to this bug.