chrome.windows.create doesn't accept both "url" and "tabId" options

RESOLVED INVALID

Status

WebExtensions
General
RESOLVED INVALID
2 years ago
3 days ago

People

(Reporter: wbamberg, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

2 years ago
Created attachment 8774591 [details]
window-create.zip

I've attached a WebExtension that does this:

chrome.browserAction.onClicked.addListener((tab) => {
  chrome.windows.create({
    url: "https://example.com",
    tabId: tab.id
  });
});

In Firefox this fails with:

"Unchecked lastError value: Error: `tabId` may not be used in conjunction with `url`"

In Chrome it works as expected.
This is intentional.

I do wonder what you mean by "as expected", though.
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → INVALID
(Reporter)

Comment 2

2 years ago
> I do wonder what you mean by "as expected", though.

In Chrome, if I call this, it opens a new window containing 2 tabs:

* https://example.com
* the tab identified by tab.id, moved from its old window

I didn't see any indication in the Chrome docs that these options are supposed to be mutually exclusive.

Updated

3 days ago
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.