diff --git a/dom.bs b/dom.bs index 73422187..5ffe342c 100644 --- a/dom.bs +++ b/dom.bs @@ -6366,10 +6366,14 @@ given a document, localName, namespace, and opt

To append an -attribute attribute to an element element, run these -steps: +attribute attribute to an element element, with optional +string sink (default ""), run these steps:

    +
  1. If sink is not an empty string Validate and set attribute value + attribute's value for attribute with element, + and sink. +

  2. Append attribute to element's attribute list. @@ -6486,13 +6490,18 @@ and a string sink:

  3. If oldAttr is attr, return attr. -

  4. Validate and set attribute value newAttr's value for - newAttr with element, and sink. +

  5. +

    If oldAttr is non-null, then:

    -
  6. If oldAttr is non-null, then replace - oldAttr with attr. +

    + +
  7. Otherwise, append attr to element + with sink.

  8. Return oldAttr.

@@ -6509,21 +6518,12 @@ or string namespace (default null), and an optional string sink< getting an attribute given namespace, localName, and element. -
  • -

    If attribute is null, then: -

      -
    1. Set attribute to a new attribute whose namespace is - namespace, namespace prefix is prefix, - local name is localName and node document is - element's node document. - -

    2. Validate and set attribute value value for attribute with - element, and sink. - -

    3. Append attribute to element. - -

    4. Return. -

    +
  • If attribute is null, create 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, then + append this attribute to element with + sink, and then return.
  • Change attribute to value, with sink. @@ -6786,21 +6786,11 @@ method steps are: and null otherwise. -

  • -

    If attribute is null, then: - -

      -
    1. Set attribute to a new attribute whose local name is - qualifiedName and node document is this's - node document. - -

    2. Validate and set attribute value value for attribute, - with this and "Element setAttribute". - -

    3. Append attribute to this. - -

    4. 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 with + "Element setAttribute", and then return.

  • Change attribute to value, with "Element setAttribute". @@ -6863,8 +6853,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, and then return - true. + append this attribute to this with + "Element toggleAttribute", and then return true.

  • Return false.