Closed Bug 1843394 Opened 3 years ago Closed 3 years ago

WebExtensions: Set default cookieStoreId for existed window

Categories

(WebExtensions :: General, enhancement, P5)

Firefox 116
enhancement

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1403422

People

(Reporter: mbnuqw, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/116.0

Expected results:

Allow addons to set default cookieStoreId for the selected window using the browser.windows.update(ID, { cookieStoreId: '...' }) API call. This will give tab-management addons (e.g. Sidebery) set default container for a new tab opened with ctrl+T (or externally).

Currently, addons (like Sidebery or Simple Tab Groups) forced to manually reopen a new tab in desired container, which in turn leads to the need to intercept web requests to prevent leakage of the cookies from default container. This is bug-prone, cumbersome workaround that negatively impacts user experience.

The API call example:

browser.windows.update(windowId, {
  cookieStoreId: 'firefox-container-2',
})

Related issue (but suggesting different approach): https://bugzilla.mozilla.org/show_bug.cgi?id=1403422

Is the request here only about new tabs (like bug 1376118)?

Note that even if this feature were to be implemented, it would not look like the suggested API, because the API suggests that it would change the cookieStoreId of a "window", whereas cookieStoreId is a property of a tab, and the only way to change the cookieStoreId of a tab is to close the tab and (re-)open the tab with the new cookieStoreId.

Another reason for not using the cookieStoreId name is that the windows.create API already accepts a cookieStoreId parameter, with the meaning of specifying the default cookieStoreId for all URLs passed to the windows.create API (introduced in bug 1393570). If "cookieStoreId" on the window were to have the meaning of changing the default cookieStoreId for new tabs in the window, then extensions using the windows.create+cookieStoreId API would suddenly start to behave differently.

Severity: -- → N/A
Status: UNCONFIRMED → NEW
Depends on: 1403422
Ever confirmed: true
Priority: -- → P5
Whiteboard: [design-decision-needed]

Thank you for clarifying. I just misunderstood the window.create API (oops), so this feature request doesn't make any sense now and may be closed as a duplicate of #1403422. Pardon me.

Status: NEW → RESOLVED
Closed: 3 years ago
No longer depends on: 1403422
Duplicate of bug: 1403422
Resolution: --- → DUPLICATE
Whiteboard: [design-decision-needed]
You need to log in before you can comment on or make changes to this bug.