This document proposes how the window.open
interacts with where the newly created
browsing context
is opened, and how it interacts with BarProps.
popup
feature instead of type
featuretype
feature (type=popup
or type=window
)Insert the following steps before "step 11.1. Set up browsing context features...", with:
Let isPopup be the result of checking if popup window is requested, given tokenizedFeatures.
Set the target browsing context's is popup to isPopup.
After "A top-level browsing context has an associated", insert:
A top-level browsing context has an is popup boolean. It is initially false.
User agents can use is popup value to decide what kind of web browser interface to provide for the browsing context, or provide an option to users to do or not do so.
For example, user agents can provide a minimal UI if is popup is true. In the minimal UI, it's encouraged not to hide the browser interface element that displays the URL or the domain of the active document.
User agents can use is popup to decide whether to perform the optional steps in set up browsing context features steps or not, or provide an option to users to do or not do so.
To check if window feature is set, given tokenizedFeatures, featureName, and defaultValue:
If tokenizedFeatures[featureName] exists, then:
Return the result of parsing tokenizedFeatures[featureName] as a boolean feature.
Return defaultValue.
To check if popup window is requested, given tokenizedFeatures:
If tokenizedFeatures is empty, then return false.
If tokenizedFeatures["popup
"] exists, then return the result of
parsing tokenizedFeatures["popup
"] as a boolean feature.
Let location be the result of checking if window feature is set, given tokenizedFeatures, "location
", and false.
Let toolbar be the result of checking if window feature is set, given tokenizedFeatures, "toolbar
", and false.
If location and toolbar are both false, then return true.
Let menubar be the result of checking if window feature is set, given tokenizedFeatures, "menubar
", and false.
If menubar is false, then return true.
Let resizable be the result of checking if window feature is set, given tokenizedFeatures, "resizable
", and true.
If resizable is false, then return true.
Let scrollbars be the result of checking if window feature is set, given tokenizedFeatures, "scrollbars
", and false.
If scrollbars is false, then return true.
Let status be the result of checking if window feature is set, given tokenizedFeatures, "status
", and false.
If status is false, then return true.
Return false.
For historical reasons, Window
object has some attributes
that represented the visibility of certain web browser interface elements.
For privacy and interoperability reasons, those attributes return values
that now represent whether the Window
's is popup
property is true or false.
Each interface element is represented by a BarProp
object:
[Exposed =Window ]
interface BarProp {
readonly attribute boolean visible ;
};
locationbar
. visible
menubar
. visible
personalbar
. visible
scrollbars
. visible
statusbar
. visible
toolbar
. visible
Returns true if the top-level browsing context is not a popup; otherwise, returns false.
The visible attribute's getter must run these steps:
BarProp
object's relevant global object's browsing context.
The following BarProp
objects must exist for each Window
object:
Technically, those attributes can share single object.
If there's no web-compat issue, we can eliminate per-attribute BarProp
object.
BarProp
objectHistorically represented the user interface element that contains a control that displays the URL of the active document, or some similar interface concept.
BarProp
object
Historically represented the user interface element that contains a list of commands in menu form, or some similar interface concept.
BarProp
object
Historically represented the user interface element that contains links to the user's favorite pages, or some similar interface concept.
BarProp
object
Historically represented the user interface element that contains a scrolling mechanism, or some similar interface concept.
BarProp
object
Historically represented a user interface element found immediately below or after the document, as appropriate for the user's media, which typically provides information about ongoing network activity or information about elements that the user's pointing device is currently indicating.
BarProp
object
Historically represented the user interface element found immediately above or before the document, as appropriate for the user's media, which typically provides session history traversal controls (back and forward buttons, reload buttons, etc).
The locationbar
attribute must return the location bar BarProp
object.
The menubar
attribute must return the menu bar BarProp
object.
The personalbar
attribute must return the personal bar BarProp
object.
The scrollbars
attribute must return the scrollbar BarProp
object.
The statusbar
attribute must return the status bar BarProp
object.
The toolbar
attribute must return the toolbar BarProp
object.