diff --git a/dom.bs b/dom.bs index 182f246d0..f0343ae5d 100644 --- a/dom.bs +++ b/dom.bs @@ -52,9 +52,10 @@ spec:html; type:element
This specification depends on the Infra Standard. [[!INFRA]]
Some of the terms used in this specification are defined in Encoding, -Selectors, Web IDL, XML, and Namespaces in XML. +Selectors, Trusted Types, Web IDL, XML, and Namespaces in XML. [[!ENCODING]] [[!SELECTORS4]] +[[!TRUSTED-TYPES]] [[!WEBIDL]] [[!XML]] [[!XML-NAMES]] @@ -6032,8 +6033,8 @@ interface Element : Node { sequence<DOMString> getAttributeNames(); DOMString? getAttribute(DOMString qualifiedName); DOMString? getAttributeNS(DOMString? namespace, DOMString localName); - [CEReactions] undefined setAttribute(DOMString qualifiedName, DOMString value); - [CEReactions] undefined setAttributeNS(DOMString? namespace, DOMString qualifiedName, DOMString value); + [CEReactions] undefined setAttribute(DOMString qualifiedName, (TrustedType or DOMString) value); + [CEReactions] undefined setAttributeNS(DOMString? namespace, DOMString qualifiedName, (TrustedType or DOMString) value); [CEReactions] undefined removeAttribute(DOMString qualifiedName); [CEReactions] undefined removeAttributeNS(DOMString? namespace, DOMString localName); [CEReactions] boolean toggleAttribute(DOMString qualifiedName, optional boolean force); @@ -6354,6 +6355,10 @@ given a document, localName, namespace, and opt attribute attribute to value, run these steps:
Set value to the result of calling Get Trusted Types-compliant attribute + value for attribute, with attribute's element and + value. [[!TRUSTED-TYPES]] +
Let oldValue be attribute's value.
Set attribute's value to value. @@ -6367,6 +6372,11 @@ given a document, localName, namespace, and opt steps:
Set attribute's + value to the result of calling Get Trusted Types-compliant attribute value + for attribute, with element and attribute's value. + [[!TRUSTED-TYPES]] +
Append attribute to element's attribute list. @@ -6395,6 +6405,11 @@ steps: attribute oldAttr with an attribute newAttr, run these steps:
Set newAttr's + value to the result of calling Get Trusted Types-compliant attribute value + for newAttr, with oldAttr's element and newAttr's + value.[[!TRUSTED-TYPES]] +
Replace oldAttr by newAttr in oldAttr's element's attribute list. @@ -6481,7 +6496,7 @@ string namespace (default null):
To set an attribute value given an -element element, a string localName, a string value, +element element, a string localName, a string or TrustedType value, an optional null or string prefix (default null), and an optional null or string namespace (default null): @@ -6492,7 +6507,7 @@ an optional null or string prefix (default null), and an optional nul
If attribute is null, create an attribute whose local name is qualifiedName, value is - value, and node document is this's node document, + stringified value, and node document is this's node document, then append this attribute to this, and then return.
Change attribute to value.