diff --git a/dom.bs b/dom.bs index 182f246d..f0343ae5 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:

    +
  1. Set value to the result of calling Get Trusted Types-compliant attribute + value for attribute, with attribute's element and + value. [[!TRUSTED-TYPES]] +

  2. Let oldValue be attribute's value.

  3. Set attribute's value to value. @@ -6367,6 +6372,11 @@ given a document, localName, namespace, and opt steps:

      +
    1. 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]] +

    2. Append attribute to element's attribute list. @@ -6395,6 +6405,11 @@ steps: attribute oldAttr with an attribute newAttr, run these steps:

        +
      1. 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]] +

      2. 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

      3. If attribute is null, create an attribute whose namespace is namespace, namespace prefix is prefix, - local name is localName, value is value, and + local name is localName, value is stringified value, and node document is element's node document, then append this attribute to element, and then return. @@ -6760,7 +6775,7 @@ method steps are:
      4. 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.

      5. Change attribute to value.