diff --git a/source b/source index df3f20d06df..e2988e40161 100644 --- a/source +++ b/source @@ -2225,6 +2225,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
To get an element's target, given an a
, area
, or
- form
element element, run these steps:
+ form
element element, and an optional string-or-null target
+ (default null), run these steps:
If element has a target
attribute, then return that
- attribute's value.
If target is null, then:
-If element's node document contains a base
element
- with a target
attribute, then return the value of the
- target
attribute of the first such base
- element.
If element has a target
attribute, then set
+ target to that attribute's value.
Return the empty string.
Otherwise, if element's node document contains a
+ base
element with a target
attribute, set
+ target to the value of the target
attribute
+ of the first such base
element.
If target is not null, and contains an ASCII tab or newline and a
+ U+003C (<), then set target to "_blank
".
Return target.
Let enctype be the submitter element's enctype.
Let target be the submitter element's formtarget
attribute value, if the element is a submit button and has such an attribute. Otherwise, let it
- be the result of getting an element's target given
- submitter's form owner.
Let formTarget be null.
If the submitter element is a submit
+ button and it has a formtarget
attribute, then
+ set formTarget to the formtarget
attribute
+ value.
Let target be the result of getting an + element's target given submitter's form owner and + formTarget.
Let noopener be the result of getting an element's noopener with form and target.
A valid navigable target name is any string with - at least one character that does not start with a U+005F LOW LINE character. (Names starting with - an underscore are reserved for special keywords.)
+A valid navigable target name is any string with at + least one character that does not contain both an ASCII tab or newline and a U+003C + (<), and it does not start with a U+005F (_). (Names starting with a U+005F (_) are reserved + for special keywords.)
A valid navigable target name or keyword is any string that is either a valid navigable target name or that is