From ee9915efa94b8b2b344cf74b9befe1eb85d8c35c Mon Sep 17 00:00:00 2001
From: Luke Warlow Set an existing attribute value with this, the given value, and "Node nodeValue".
+ Set an existing attribute value with this, the given value.
Replace data with node this, offset 0, count this's
@@ -4331,8 +4331,7 @@ do as defined below, switching on the interface node implements String replace all with value within node.
Set an existing attribute value with node, value and
- "Node textContent".
+ Set an existing attribute value with node, value.
Replace data with node node, offset 0, count node's
@@ -4455,7 +4454,8 @@ dom-Range-extractContents, dom-Range-cloneContents -->
Let copyAttribute be a clone of attribute.
- Append copyAttribute to copy.
+ Append copyAttribute to copy,
+ with false.
To change an
-attribute attribute to value, with string sink, run these steps:
+attribute attribute to value, run these steps:
Let oldValue be attribute's value. Validate and set attribute value value for attribute, with
- attribute's element, and sink.
+ attribute's element.
- Handle attribute changes for attribute with attribute's
- element, oldValue, and value.
+ If attribute's element has
+ an attribute attribute, then handle attribute changes for
+ attribute with attribute's element, oldValue, and
+ value.
+
+ Otherwise, throw an "{{InvalidStateError!!exception}}" {{DOMException}}.
To append an
attribute attribute to an element element, with optional
-string sink (default ""), run these steps:
+boolean validate (default true), run these steps:
If sink is not an empty string Validate and set attribute value
- attribute's value for attribute with element,
- and sink.
+ If validate, then:
+ Validate 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.
@@ -6432,12 +6442,12 @@ string sink (default ""), run these steps:
To validate and set attribute value
{{TrustedType}} or a string value for an attribute attribute, with
-element element, and string sink:
+element element:
Let validValue be the result of calling
get Trusted Types-compliant attribute value for attribute, with
- element, value, and sink. [[!TRUSTED-TYPES]]
+ element, value. [[!TRUSTED-TYPES]]
Set attribute's value to validValue.
@@ -6368,26 +6368,36 @@ given a document, localName, namespace, and opt
-
+
@@ -6491,8 +6501,7 @@ string namespace (default null):
To set an attribute given an -attribute attr, an element element, -and a string sink: +attribute attr, an element element.
If attr's element is neither null nor element, @@ -6510,13 +6519,16 @@ and a string sink:
-Otherwise, append attr to element - with sink. +
Otherwise, append attr to element.
Return oldAttr.
To set an attribute value given an element element, a string localName, a string or {{TrustedType}} value, an optional null or string prefix (default null), an optional null -or string namespace (default null), and an optional string sink (default ""): +or string namespace (default null):
Change attribute to value, with sink. +
Change attribute to value.
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 with - "Element setAttribute", and then return. +
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. -
Change attribute to value, with "Element setAttribute". +
Change attribute to value.
The @@ -6819,7 +6829,7 @@ method steps are: passing namespace and qualifiedName to validate and extract.
Set an attribute value for this using localName, value, - and also prefix and namespace, and "Element setAttributeNS". + and also prefix and namespace.
The @@ -6868,8 +6878,8 @@ method steps are:
If force is not given or is true, create an attribute whose local name is qualifiedName, value is the empty string, and node document is this's node document, then - append this attribute to this with - "Element toggleAttribute", and then return true. + append this attribute to this, + and then return true.
Return false. @@ -6907,11 +6917,11 @@ method steps are to return the result of
The setAttributeNode(attr)
methods steps are to
return the result of setting an attribute given attr and
-this, and "Element setAttributeNode".
+this.
The setAttributeNodeNS(attr)
methods steps are to
return the result of setting an attribute given attr,
-this, and "Element setAttributeNodeNS".
+this.
The removeAttributeNode(attr)
method steps
are:
@@ -7268,11 +7278,11 @@ method steps are to return the result of
The setNamedItem(attr)
method steps are
to return the result of setting an attribute given attr,
-element, and "NamedNodeMap setNamedItem".
+element.
The setNamedItemNS(attr)
method steps are
to return the result of setting an attribute given attr,
-element, and "NamedNodeMap setNamedItemNS".
+element.
The removeNamedItem(qualifiedName)
method steps are:
@@ -7377,14 +7387,13 @@ null.
value.
To set an existing attribute value, given an attribute attribute, -string value, and string sink, run these steps: +string value, run these steps:
If attribute's element is null, then set attribute's value to value. -
Otherwise, change attribute to value, - with sink. +
Otherwise, change attribute to value.
The {{Attr/value}} setter steps are to set an existing attribute value with this,