Closed Bug 1213477 (webext-tabs) Opened 9 years ago Closed 8 years ago

Complete the implementation of chrome.tabs

Categories

(WebExtensions :: Untriaged, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: andy+bugzilla, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [tabs]triaged)

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()
(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
Depends on: 1214007
chrome.tabs.onActiveChanged.addListener used by Ghostery
Blocks: webext
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
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)
Whiteboard: [tabs] → [tabs]triaged
(In reply to sblask from comment #4) Please file bugs for any new methods you'd like to suggest.
Priority: -- → P1
(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
Flags: blocking-webextensions+ → blocking-webextensions-
Assignee: kmaglione+bmo → nobody
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
Closed: 8 years ago
Priority: P1 → P2
Resolution: --- → FIXED
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
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?
(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.
Depends on: 1376088
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.