Browser.link.open newwindow.restriction: Difference between revisions

From MozillaZine Knowledge Base
Jump to navigationJump to search
Line 27: Line 27:


==Related bugs==
==Related bugs==
*[https://bugzilla.mozilla.org/show_bug.cgi?id=55696 Bug 55696 - Open a JavaScript link in a new window]
*[https://bugzilla.mozilla.org/show_bug.cgi?id=55696 Bug 55696 - Open a JavaScript link in a new window (or new tab)]
*[https://bugzilla.mozilla.org/show_bug.cgi?id=172962 Bug 172962 - Options for where to open URLs from other applications (reuse tab, new tab, new window)]
*[https://bugzilla.mozilla.org/show_bug.cgi?id=172962 Bug 172962 - Options for where to open URLs from other applications (reuse tab, new tab, new window)]
*[https://bugzilla.mozilla.org/show_bug.cgi?id=266299 Bug 266299 - browser.link.open_newwindow.restriction should have a default value of 2l]
*[https://bugzilla.mozilla.org/show_bug.cgi?id=266299 Bug 266299 - browser.link.open_newwindow.restriction should have a default value of 2l]

Revision as of 11:41, 27 April 2007

Background

Using JavaScript, web page authors can open new windows using window.open(). However, many users prefer using tabs to multiple browser windows. If the user has set new windows to open in tabs, this preference allows for fine-tuning of just which JavaScript-opened links will be opened in tabs.

Oftentimes when a new window is opened from JavaScript, it’s a small popup without all of a usual browser window’s features—e.g., the back/forward/reload buttons are hidden, the status bar is hidden, the size is purposely smaller, etc. Usually in this situation, the window is designed specifically as a popup, and opening it in a tab actually makes it less useful. This preference can let these types of links open as new windows while opening all other types as new tabs.

Possible values and their effects

0

Divert all window.open calls according to how browser.link.opennewwindow is set (i.e., into new tabs if it's 3, new windows if it's 2, or the current tab/window if it's 1). (Default in Firefox 1.0.x and SeaMonkey)

1

Do not divert any window.open calls (allow JavaScript to open new windows).

2

Divert all window.open calls according to browser.link.opennewwindow unless the new window specifies how it should be displayed. (Default in Firefox 1.5)

Caveats

  • browser.link.open_newwindow determines where diverted window.open calls go. If it's set to 2, this preference will have no visible effect.
  • Until recently, the default of this preference in Firefox was 0.

First checked in

Has an effect in

  • Mozilla Firefox (all versions since 1.0RC1)
  • SeaMonkey (all versions)

Related bugs

Related preferences