window.open
featurestoolbar
location
personalbar
menubar
resizable
left
, screenX
top
, screenY
width
, innerWidth
outerWidth
height
, innerHeight
outerHeight
browser.link.open_newwindow
pref and browser.link.open_newwindow.restriction
pref.To align with Chrome, Safari, and new Edge, make each boolean feature just a condition for where to open the link, from:
browser.link.open_newwindow
pref)
This change affects web content only.
Any window.open
call from chrome code still has ability to separately control visibility of each UI part.
browser.link.open_newwindow
(int
)Control where to open a link.
Used in nsWindowWatcher::GetWindowOpenLocation
Value | Meaning |
---|---|
1 |
Open the link in the current tab. |
2 |
Open the link in a new tab in a new window. |
3 |
(default) Open the link in a new tab in the current window. |
If the target browsing context isn't opened in popup (IsPopup returns false), open it in the specified place.
browser.link.open_newwindow.restriction
(int
)Restrict where the new window can be opened
Used in nsWindowWatcher::GetWindowOpenLocation
Value | Meaning |
---|---|
0 |
Always use `browser.link.open_newwindow` value. |
1 |
Always open the link in a new window. |
2 |
(default) If some feature is specified, open the link in a new window. Otherwise use `browser.link.open_newwindow` value. |
Keep the same behavior.
browser.link.open_newwindow.disabled_in_fullscreen
(bool
)Used in nsWindowWatcher::GetWindowOpenLocation
browser.link.open_newwindow
is 2 (new window), then:
browser.link.open_newwindow.restriction
value with 0 (No restrictions)Keep the same behavior.
dom.disable_window_open_feature.*
(bool
)Allow/disallow each feature.
Used in nsWindowWatcher::CalculateChromeFlagsHelper
Introduced by Bug 107949
Pref | Default | Has effect? |
---|---|---|
dom.disable_window_open_feature.toolbar |
Allowed by default | Has effect |
dom.disable_window_open_feature.menubar |
Allowed by default | Has effect (not on macOS, menu is always available) |
dom.disable_window_open_feature.personalbar |
Allowed by default | Has effect |
dom.disable_window_open_feature.minimizable |
Allowed by default | Has no effect, minimize button is always available |
dom.disable_window_open_feature.location |
Disallowed by default | Has effect |
dom.disable_window_open_feature.resizable |
Disallowed by default | Has effect |
dom.disable_window_open_feature.status |
Disallowed by default | Has no effect, status panel is always available. |
dom.disable_window_open_feature.titlebar |
Disallowed for content | Has no effect, disallowed for content |
dom.disable_window_open_feature.close |
Disallowed for content | Has no effect, disallowed for content |
They are ignored.