Open
Bug 1394373
Opened 7 years ago
Updated 2 years ago
Add option to duplicate tabs into different window for browser.tabs.duplicate()
Categories
(WebExtensions :: General, enhancement, P5)
WebExtensions
General
Tracking
(Not tracked)
NEW
People
(Reporter: yuki, Unassigned)
Details
(Whiteboard: [design-decision-approved])
To duplicate tabs into different (new) window, we need to do these steps:
1. Open new blank window.
2. Duplicate tabs in the old window.
3. Move duplicated tabs to new window.
because browser.tabs.duplicate() doesn't provide ability to do them at a time.
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/tabs/duplicate
https://developer.chrome.com/extensions/tabs#method-duplicate
However, the promise returned by browser.tabs.duplicate() is resolved after all duplicated tabs are completely loaded, thus we have to wait for minutes between the step 2 and 3. It is painful and dangerous, because the user can close the blank window before all duplicated tabs are ready.
So I propose a new option to duplicate given tabs into different window, like:
var duplicatedTabs = await browser.tabs.duplicate([1, 2, 3], { windowId: 5 })
How about this?
Reporter | ||
Comment 1•7 years ago
|
||
This is reequired by Tree Style Tab to implement its feature: duplicate a tree as a separate window.
https://github.com/piroor/treestyletab/tree/master/webextensions
Updated•7 years ago
|
Whiteboard: [design-decision-needed]
Updated•7 years ago
|
Comment 2•7 years ago
|
||
Hi Piro, this has been added to the agenda for the September 26 WebExtensions APIs triage meeting. Would you be able to join us on IRC?
Wiki: https://docs.google.com/document/d/1pw5y-GHwDLPV9bYK4HWCiZtslqFtAeL3G9bC4ZDbdjs/edit#
Agenda: https://docs.google.com/document/d/1pw5y-GHwDLPV9bYK4HWCiZtslqFtAeL3G9bC4ZDbdjs/edit#
Reporter | ||
Comment 3•7 years ago
|
||
OK, I'll join to IRC.
By the way, another similar bug 1394376 ls already triaged as wontfix on Fx57. I need one of them on Fx57, for painless migration...
Comment 4•7 years ago
|
||
Just to be clear on timelines, neither of those bugs will be happening in time for 57.
Updated•7 years ago
|
Whiteboard: [design-decision-needed] → [design-decision-approved]
Updated•6 years ago
|
Product: Toolkit → WebExtensions
Updated•6 years ago
|
status-firefox57:
wontfix → ---
Comment 5•6 years ago
|
||
Bulk move of bugs per https://bugzilla.mozilla.org/show_bug.cgi?id=1483958
Component: Untriaged → General
Updated•2 years ago
|
Severity: normal → S3
I’m interested in fixing this but I’m not quite sure where to fiddle in browser/components/extensions/parent/ext-tabs.js
and browser/components/sessionstore/SessionStore.sys.mjs
. Where and what should I do to duplicate (“restore”) the tab in a new window?
You need to log in
before you can comment on or make changes to this bug.
Description
•