From 02db8c7eb2a4b5cd33012f0f84bc92175267f0bf Mon Sep 17 00:00:00 2001
From: Luke Warlow Let copyAttribute be a clone of attribute.
- Append copyAttribute to copy,
- with false.
+ Append copyAttribute to copy.
Let oldValue be attribute's value. Verify and set attribute value value for attribute, with
- attribute's element.
+ Set attribute's value to value.
- If attribute's element
- has an attribute, then handle attribute changes for
- attribute with attribute's element, oldValue, and
- value.
-
- Otherwise, throw an "{{InvalidStateError!!exception}}" {{DOMException}}.
+ Handle attribute changes for attribute with attribute's
+ element, oldValue, and value.
To append an
-attribute attribute to an element element, with an
-optional boolean validate (default true):
+attribute attribute to an element element, run these
+steps:
If validate is true:
-
- Verify and set attribute value
- attribute's value for attribute, with element.
-
- If element has an attribute
- attribute, then throw an "{{InvalidStateError!!exception}}" {{DOMException}}.
- Append attribute to element's
attribute list.
@@ -6461,9 +6444,6 @@ optional boolean validate (default true):
attribute oldAttr with an attribute newAttr, run these steps:
Verify and set attribute value newAttr's value for
- newAttr, with oldAttr's element.
-
Replace oldAttr by newAttr in oldAttr's
element's attribute list.
@@ -6477,16 +6457,14 @@ optional boolean validate (default true):
value.
To verify and set attribute value
+ To verify attribute value
{{TrustedType}} or string value for an attribute attribute, given an
Element element:
Let verifiedValue be the result of calling
+ Return the result of calling
get Trusted Types-compliant attribute value for attribute, with
element, value. [[!TRUSTED-TYPES]]
-
- Set attribute's value to verifiedValue.
@@ -6406,33 +6405,17 @@ given a document, localName, namespace, and opt
-
-
-
-
-
-
@@ -6551,6 +6529,11 @@ string namespace (default null):
If oldAttr is attr, return attr. +
Let verifiedValue be the result of calling verify attribute value + attr's value for attr, with element. + +
Set attr's value to verifiedValue. +
If oldAttr is non-null, then replace oldAttr with attr. @@ -6571,14 +6554,30 @@ or string namespace (default null): getting an attribute given namespace, localName, and element. -
Let attributeExists be false if attribute is null, and true otherwise. + +
If attributeExists is false, set attribute to an attribute + whose namespace is namespace, namespace prefix is + prefix, local name is localName, value is + value, and node document is element's node + document. -
Change attribute to value. +
Let verifiedValue be the result of calling verify attribute value + value for attribute, with element. + +
Set attributeExists to true if element has + an attribute attribute; otherwise false. + +
If attributeExists is true, change + attribute to verifiedValue. + +
Otherwise: +
@@ -6839,12 +6838,25 @@ method steps are: and null otherwise. -If attribute is null, create an attribute whose - local name is qualifiedName, value is - value, and node document is this's node document, - then append this attribute to this, and then return. +
Let attributeExists be false if attribute is null, and true otherwise. + +
If attributeExists is false, set attribute to an attribute + whose local name is qualifiedName, value is + value, and node document is this's node + document. + +
Let verifiedValue be the result of calling verify attribute value + value for attribute, with this. -
Change attribute to value. +
Set attribute's value to verifiedValue. + +
Set attributeExists to true if this has an + attribute attribute; otherwise false. + +
If attributeExists is true, change + attribute to value. + +
Otherwise append this attribute to this.
The @@ -7414,7 +7426,13 @@ string value, run these steps:
If attribute's element is null, then set attribute's value to value. -
Otherwise, change attribute to value. +
Otherwise: +
Let verifiedValue be the result of calling verify attribute value + value for attribute, with this. + +
Change attribute to verifiedValue. +
The {{Attr/value}} setter steps are to set an existing attribute value with this