Add option to duplicate tabs into different window for browser.tabs.duplicate()

NEW
Unassigned

Status

()

Toolkit
WebExtensions: Untriaged
P5
enhancement
9 months ago
8 months ago

People

(Reporter: YUKI "Piro" Hiroshi, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(firefox57 wontfix)

Details

(Whiteboard: [design-decision-approved])

(Reporter)

Description

9 months ago
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

9 months 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

9 months ago
Whiteboard: [design-decision-needed]

Updated

8 months ago
Severity: normal → enhancement
status-firefox57: affected → wontfix
Priority: -- → P5
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

8 months 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

8 months ago
Just to be clear on timelines, neither of those bugs will be happening in time for 57.
Whiteboard: [design-decision-needed] → [design-decision-approved]
You need to log in before you can comment on or make changes to this bug.