-
Notifications
You must be signed in to change notification settings - Fork 71
Description
Introduction
This was briefly discussed during the 2024 San Diego meetup.
Some extensions have the use case of opening private tabs. Currently this can only be achieved by using the windows API.
However the windows API is unreliable and unspecified on mobile, see #632
To both make it simpler to open private tabs and make it work on mobile, I suggest we add the incognito property to specify if a new tab should be opened in a private window or a non-private window.
Design
browser.tabs.create({
incognito: true
});Tab will be opened in the (last) active private window
browser.tabs.create({
incognito: false
});Tab will be opened in the (last) active non-private window
browser.tabs.create({
incognito: null | undefined
});Behaviour as if incognito was not set. Tab will be opened in the current window
Discussion
Alternatively we could name the property private to be browser neutral. However it would nolonger align with properties returned by tabs.Tab (https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs/Tab#incognito). However, in a similar fashion, the private property could be added to tabs.Tab as well. While keeping the incognito as alias.