diff --git a/source b/source index 9d1cc3e1a4e..d910c825ed7 100644 --- a/source +++ b/source @@ -19182,32 +19182,11 @@ interface HTMLAnchorElement : HTMLElement {
The activation behavior of a
elements that create hyperlinks is to run the following steps:
If the a
element's node document is not fully active, then abort these steps.
If the user has not indicated a specific browsing context for following the
- link, and the element's target
attribute is present,
- and applying the rules for choosing a browsing context given a browsing context
- name, using the value of the target
attribute
- as the browsing context name, would result in there not being a chosen browsing context,
- then:
If there is an entry settings object, throw an
- "InvalidAccessError
" DOMException
.
Abort these steps without following the hyperlink.
If the target of the click
event is an img
element with an ismap
attribute specified, then server-side
image map processing must be performed, as follows:
Finally, the user agent must follow the
- hyperlink or download the hyperlink created
- by the a
element, as determined by the download
attribute and any expressed user preference,
- passing hyperlink suffix, if the steps above defined it.
Follow the hyperlink or download the hyperlink created by the a
+ element, as determined by the download
attribute
+ and any expressed user preference, passing hyperlink suffix, if the steps above
+ defined it.
Let source be subject's node document's browsing context.
If the user indicated a specific browsing context when following the hyperlink, - or if the user agent is configured to follow hyperlinks by navigating a particular browsing - context, then let target be that browsing context. If this is a new - top-level browsing context (e.g. when the user followed the hyperlink using "Open - in New Tab"), then source must be set as the new browsing context's - one permitted sandboxed navigator.
+Let targetAttributeValue be null.
Otherwise, if subject is an a
or area
element
- that has a target
attribute, then let target be the browsing context that is chosen by applying the
- rules for choosing a browsing context given a browsing context name, using the value of
- the target
attribute as the browsing context name. If
- these rules result in the creation of a new browsing context, set replace to true.
If subject is an a
or area
element that has a target
attribute, then set targetAttributeValue
+ to that attribute's value.
Otherwise, if target is an a
or area
element
- with no target
attribute, but the
- Document
contains a base
element with a target
attribute, then let target be the
- browsing context that is chosen by applying the rules for choosing a browsing
- context given a browsing context name, using the value of the target
attribute of the first such base
element as
- the browsing context name. If these rules result in the creation of a new browsing
- context, set replace to true.
Otherwise, if subject is an a
or area
element with no
+ target
attribute, but subject's node
+ document contains a base
element with a target
attribute, then set targetAttributeValue to
+ the value of target
attribute of the first such
+ base
element.
Otherwise, let target be source.
+Let target and replace be the result of applying the rules for + choosing a browsing context given targetAttributeValue and + source.
If target is null, then return.
If subject's link types include the noreferrer
or noopener
keyword,
@@ -38254,37 +38223,14 @@ interface HTMLAreaElement : HTMLElement {
The activation behavior of area
elements is to run the following
steps:
If the area
element's node document is not fully active,
- then abort these steps.
If the user has not indicated a specific browsing context for following the
- link, and the element's target
attribute is present,
- and applying the rules for choosing a browsing context given a browsing context
- name, using the value of the target
attribute
- as the browsing context name, would result in there not being a chosen browsing context,
- then:
If there is an entry settings object, throw an
- "InvalidAccessError
" DOMException
.
Abort these steps without following the hyperlink.
Otherwise, the user agent must follow the
- hyperlink or download the hyperlink created
- by the area
element, if any, and as determined by the download
attribute and any expressed user
- preference.
If the area
element's node document is not fully
+ active, then abort these steps.
Follow the hyperlink or download the hyperlink created by the area
+ element, if any, and as determined by the download
+ attribute and any expressed user preference.
The IDL attributes alt
, HTMLLegendElement
: HTMLElement {
The target of an element is the value of the element's
formtarget
attribute, if the element is a submit button and has such an attribute; or the value of its
- form owner's target
attribute, if it has
- such an attribute; or, if the Document
contains a base
element with a
- target
attribute, then the value of the target
attribute of the first such base
element; or,
- if there is no such element, the empty string.
target
attribute, if it
+ has such an attribute; or, if the element's node document contains a
+ base
element with a target
attribute, then the
+ value of the target
attribute of the first such
+ base
element; or, if there is no such element, null.
+
Let target be the submitter element's target.
If the user indicated a specific browsing context to use when submitting the - form, then let target browsing context be that browsing context. - Otherwise, apply the rules for choosing a browsing context given a browsing context - name using target as the name and form browsing - context as the context in which the algorithm is executed, and let target - browsing context be the resulting browsing context.
If target browsing context was created in the previous step, or,
- alternatively, if the form document has not yet completely
- loaded and the submitted from submit()
- method flag is set, then let replace be true. Otherwise, let it be
- false.
Let target browsing context and replace be the result of applying + the rules for choosing a browsing context using target and form + browsing context.
If target browsing context is null, then return.
If form document has not yet completely loaded and the
+ submitted from submit()
method flag is set, then
+ set replace to true.
Most of the restrictions on sandboxed browsing contexts are applied by - other algorithms, e.g. the navigation algorithm, not the rules - for choosing a browsing context given a browsing context name given below.
+ other algorithms, e.g. the navigation algorithm, not the + rules for choosing a browsing context given below.The rules for choosing a browsing context given a browsing context name are as - follows. The rules assume that they are being applied in the context of a browsing - context, as part of the execution of a task.
+The rules for + choosing a browsing context, given null or a browsing context name + name and a browsing context current, are as follows:
Let chosen be null.
If the given browsing context name is the empty string or _self
, then
- the chosen browsing context must be the current one.
Let new be false.
If name is the empty string or an ASCII case-insensitive match for
+ "_self
", then set chosen to current.
If the given browsing context name is _parent
, then the chosen
- browsing context must be the parent browsing context of the current one,
- unless there isn't one, in which case the chosen browsing context must be the current browsing
- context.
If name is an ASCII case-insensitive match for "_parent
", then set chosen to current's parent
+ browsing context, if any, and current otherwise.
If the given browsing context name is _top
, then the chosen browsing
- context must be the top-level browsing context of the current one, if there is one,
- or else the current browsing context.
If name is an ASCII case-insensitive match for "_top
", then set chosen to current's top-level
+ browsing context, if any, and current otherwise.
If name is not an ASCII case-insensitive match for "_blank
" and there exists a browsing context whose name is the same as name, and current is
+ familiar with that browsing context, and the user agent determines that the two
+ browsing contexts are related enough that it is ok if they reach each other, then set
+ chosen to that browsing context. If there are multiple matching browsing contexts,
+ the user agent should set chosen to one in some arbitrary consistent manner, such as
+ the most recently opened, most recently focused, or more closely related.
If the given browsing context name is not _blank
and there exists a
- browsing context whose name is the same as the given
- browsing context name, and the current browsing context is familiar with that
- browsing context, and the user agent determines that the two browsing contexts are related
- enough that it is ok if they reach each other, then that browsing context must be the chosen
- one. If there are multiple matching browsing contexts, the user agent should select one in some
- arbitrary consistent manner, such as the most recently opened, most recently focused, or more
- closely related.
This will be made more precise in issue #2126.
Otherwise, a new browsing context is being requested, and what happens depends on the user agent's configuration and abilities — it is determined by the rules given for the first applicable option from the following list:
There is no chosen browsing context. The user agent may inform the user that a popup has - been blocked.
- -The user agent may inform the user that a popup has been blocked.
The user agent may offer the user one of: -
Typically, there is no chosen browsing context.
+Set chosen to a new + top-level browsing context and new to true.
The user agent may offer to create a new top-level browsing context or reuse - an existing top-level browsing context. If the user picks one of those options, - then the designated browsing context must be the chosen one (the browsing context's name isn't - set to the given browsing context name). The default behavior (if the user agent doesn't - offer the option to the user, or if the user declines to allow a browsing context to be used) - must be that there must not be a chosen browsing context.
+Set chosen to an existing top-level browsing context.
+If this case occurs, it means that an author has explicitly sandboxed the document that is trying to open a link.
+If the user declines or the user agent doesn't offer the above, the variables + remain unchanged.
A new auxiliary browsing context must be created, with the opener
- browsing context being the current one. If the given browsing context name is not
- _blank
, then the new auxiliary browsing context's name must be the
- given browsing context name (otherwise, it has no name). The chosen browsing context must be
- this new browsing context.
Set chosen to a new
+ auxiliary browsing context, with the opener browsing context being
+ current, and set new to true. If name is not an ASCII
+ case-insensitive match for "_blank
", then chosen's
+ name must be set to name (otherwise, it
+ has no name).
If the newly created browsing context is immediately navigated, then the navigation will be done with replacement enabled.
The chosen browsing context is the current browsing context.
Set chosen to current.
There must not be a chosen browsing context.
Do nothing.
User agent implementors are encouraged to provide a way for users to configure the user agent - to always reuse the current browsing context.
+User agents are encouraged to provide a way for users to configure the user + agent to always reuse current.
-If the chosen browsing context picked above, if any, is a new browsing context, then:
+If new is true, then:
Let flagSet be the current browsing context's active document's +
Let flagSet be current's active document's active sandboxing flag set.
If flagSet's sandboxed navigation browsing context flag is set, - then the current browsing context must be set as the new browsing context's one permitted - sandboxed navigator.
If flagSet's sandbox propagates to auxiliary browsing contexts - flag is set, then all the flags that are set in flagSet must be set in the - new browsing context's popup sandboxing flag set.
Return chosen and new.
Let target browsing context and new be the result of applying + the rules for choosing a browsing context given target and + source browsing context. -
If the user has indicated a preference for which browsing context to navigate, - follow these substeps:
- -Let target browsing context be the browsing context indicated by - the user.
If target browsing context is a new top-level browsing context, - let the source browsing context be set as target browsing context's - one permitted sandboxed navigator.
For example, suppose there is a user agent that supports control-clicking a
- link to open it in a new tab. If a user clicks in that user agent on an element whose If there is a user agent that supports control-clicking a link to open it in
+ a new tab, and the user control-clicks on an element whose
onclick
handler uses the window.open()
API to open a page in an iframe, but, while doing so,
- holds the control key down, the user agent could override the selection of the target browsing
- context to instead target a new tab.
Otherwise, apply the rules for choosing a browsing context given a browsing context - name using target as the name and source browsing context as the - context in which the algorithm is executed. If this results in there not being a chosen browsing - context, then return null. Otherwise, let target browsing context be the - browsing context so obtained.
- + data-x="dom-open">window.open() API to open a page in aniframe
, the user
+ agent could override the selection of the target browsing context to instead target a new
+ tab.
If target browsing context was just created, either as part of the rules - for choosing a browsing context given a browsing context name or due to the user - indicating a preference for navigating a new top-level browsing context, then let - new be true. Otherwise, let it be false.
If target browsing context is null, then return null.
Let tokenizedFeatures be the result of tokenizing features.
If target browsing context is a new auxiliary browsing context, - then set up browsing context features for target browsing context given - tokenizedFeatures.
If new is true, then set up browsing context features for + target browsing context given tokenizedFeatures.
Every browsing context that is a nested browsing context has an
iframe
sandboxing flag set, which is a sandboxing flag set.