此页面列表
windowFeatures
参数对于
window.open
function that requires chrome-privilege in Firefox.
This is not for web content.
The following features require the chrome-privilege.
centerscreen
Centers the window in relation to its parent's size and position.
minimizable
minimizable
requires
dialog=yes
。若
minimizable
is on, the new dialog window will have a minimize system command icon in the titlebar and it will be minimizable. Any non-dialog window is always minimizable and
minimizable=no
将被忽略。
dependent
If on, the new window is said to be dependent of its parent window. A dependent window closes when its parent window closes. A dependent window is minimized on the Windows task bar only when its parent window is minimized. On Windows platforms, a dependent window does not show on the task bar. A dependent window also stays in front of the parent window.
Dependent windows are not implemented on MacOS X, this option will be ignored.
showModelessDialog()
方法。
chrome
If on, the page is loaded as window's only content, without any of the browser's interface elements. There will be no context menu defined by default and none of the standard keyboard shortcuts will work. The page is supposed to provide a user interface of its own, usually this feature is used to open XUL documents (standard dialogs like the JavaScript Console are opened this way).
dialog
dialog
feature removes all icons (restore, minimize, maximize) from the window's titlebar, leaving only the close button. Mozilla 1.2+ and Netscape 7.1 will render the other menu system commands (in FF 1.0 and in NS 7.0x, the command system menu is not identified with the Firefox/NS 7.0x icon on the left end of the titlebar: that's probably a bug. You can access the command system menu with a right-click on the titlebar). Dialog windows are windows which have no minimize system command icon and no maximize/restore down system command icon on the titlebar nor in correspondent menu item in the command system menu. They are said to be dialog because their normal, usual purpose is to only notify info and to be dismissed, closed. On Mac systems, dialog windows have a different window border and they may get turned into a sheet.
modal
注意:
As of
Gecko 1.9
, the Internet Explorer equivalent to this feature is the
window.showModalDialog()
method. For compatibility reasons, it's now supported in Firefox. Note also that starting in
Gecko 2.0
, you can use
window.showModalDialog()
without UniversalBrowserWrite privileges.
titlebar
dom.disable_window_open_feature.titlebar
alwaysRaised
If on, the new window will always be displayed on top of other browser windows, regardless of whether it is active or not.
alwaysLowered
If on, the new created window floats below, under its own parent when the parent window is not minimized. alwaysLowered windows are often referred as pop-under windows. The alwaysLowered window can not be on top of the parent but the parent window can be minimized. In NS 6.x, the alwaysLowered window has no minimize system command icon and no restore/maximize system command.
alwaysOnTop
z-lock
alwaysLowered
.
close
dialog
feature set).
close=no
will override
minimizable=yes
.
dom.disable_window_open_feature.close