Closed
Bug 1213477
(webext-tabs)
Opened 9 years ago
Closed 8 years ago
Complete the implementation of chrome.tabs
Categories
(WebExtensions :: Untriaged, defect, P2)
WebExtensions
Untriaged
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()
Reporter | ||
Comment 1•9 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 | ||
Comment 2•9 years ago
|
||
chrome.tabs.onActiveChanged.addListener used by Ghostery
Blocks: e10s-ghostery
Reporter | ||
Updated•9 years ago
|
Flags: blocking-webextensions+
Comment 3•9 years ago
|
||
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])
Updated•9 years ago
|
Assignee: nobody → kmaglione+bmo
Updated•9 years ago
|
Alias: webext-tabs
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•9 years ago
|
Whiteboard: [tabs] → [tabs]triaged
Reporter | ||
Comment 5•9 years ago
|
||
(In reply to sblask from comment #4)
Please file bugs for any new methods you'd like to suggest.
Reporter | ||
Updated•9 years ago
|
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
Reporter | ||
Updated•9 years ago
|
Flags: blocking-webextensions+ → blocking-webextensions-
Updated•8 years ago
|
Assignee: kmaglione+bmo → nobody
Reporter | ||
Comment 7•8 years 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
Closed: 8 years ago
Priority: P1 → P2
Resolution: --- → FIXED
Comment 8•8 years 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 years 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 years 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.
Updated•6 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•