diff --git a/dom.bs b/dom.bs index 00212ae6b..466df2bdd 100644 --- a/dom.bs +++ b/dom.bs @@ -33,7 +33,7 @@ urlPrefix: https://tc39.github.io/ecma262/#; spec: ECMASCRIPT type: dfn text: Realm; url: realm text: surrounding agent; url: surrounding-agent -urlPrefix: https://w3c.github.io/hr-time/#; spec: HR-TIME-2 +urlPrefix: https://w3c.github.io/hr-time/#; spec: HR-TIME type:typedef; urlPrefix: dom-; text: DOMHighResTimeStamp type:dfn; text: time origin; url: dfn-time-origin type:dfn; text: clock resolution @@ -967,7 +967,7 @@ correct defaults.

User agents should set a minimum resolution of event's {{Event/timeStamp}} attribute to 5 microseconds following the existing clock resolution - recommendation. [[!HR-TIME-2]] + recommendation. [[!HR-TIME]]

  • For each membervalue in dictionary, if event has an attribute whose identifier is member, then @@ -3592,11 +3592,6 @@ run these steps: target with null, null, null, addedNodes, removedNodes, previousSibling, and nextSibling. -

    To queue an attribute mutation record for target with -name, namespace, and oldValue, queue a mutation record of -"attributes" for target with name, namespace, -oldValue, « », « », null, and null. -

    Interface {{MutationRecord}}

    @@ -6100,118 +6095,87 @@ its attribute list is empty. has an attribute A if its attribute list contains A. -This and other specifications may define +

    This and other specifications may define attribute change steps for elements. The algorithm is passed element, localName, oldValue, value, and namespace. -To change an -attribute attribute -from an element element -to value, run these steps: +

    To handle attribute changes for an attribute attribute with +element, oldValue, and newValue, run these steps:

      -
    1. Queue an attribute mutation record for element with attribute's - local name, attribute's namespace, and - attribute's value. +

    2. Queue a mutation record of "attributes" for element with + attribute's local name, attribute's + namespace, oldValue, « », « », null, and null. -

    3. If element is custom, then +
    4. If element is custom, then enqueue a custom element callback reaction with element, callback name "attributeChangedCallback", and an argument list containing attribute's - local name, attribute's value, value, and - attribute's namespace. + local name, oldValue, newValue, and attribute's + namespace.

    5. Run the attribute change steps with element, attribute's - local name, attribute's value, value, and - attribute's namespace. - -

    6. Set attribute's - value to value. + local name, oldValue, newValue, and attribute's + namespace.
    -To append an -attribute attribute to -an element element, -run these steps: +

    To change an +attribute attribute to value, run these steps:

      -
    1. Queue an attribute mutation record for element with attribute's - local name, attribute's namespace, and null. +

    2. Handle attribute changes for attribute with attribute's + element, attribute's value, and value. -

    3. If element is custom, then - enqueue a custom element callback reaction with element, callback name - "attributeChangedCallback", and an argument list containing attribute's - local name, null, attribute's value, and - attribute's namespace. +
    4. Set attribute's value to value. +

    -
  • Run the attribute change steps with element, attribute's - local name, null, attribute's value, and - attribute's namespace. +

    To append an +attribute attribute to an element element, run these +steps: + +

      +
    1. Handle attribute changes for attribute with element, null, and + attribute's value. -

    2. Append attribute to element's +
    3. Append attribute to element's attribute list. -

    4. Set attribute's - element to element. +
    5. Set attribute's element to element.

    -To remove an -attribute attribute -from an element element, -run these steps: +

    To remove an +attribute attribute, run these steps:

      -
    1. Queue an attribute mutation record for element with attribute's - local name, attribute's namespace, and - attribute's value. - -

    2. If element is custom, then - enqueue a custom element callback reaction with element, callback name - "attributeChangedCallback", and an argument list containing attribute's - local name, attribute's value, null, and - attribute's namespace. +
    3. Handle attribute changes for attribute with attribute's + element, attribute's value, and null. -

    4. Run the attribute change steps with element, attribute's - local name, attribute's value, null, and - attribute's namespace. +

    5. Remove attribute from attribute's + element's attribute list. -
    6. Remove attribute from element's - attribute list. - -
    7. Set attribute's - element to null. +
    8. Set attribute's element to null.

    -To replace an -attribute oldAttr by an attribute newAttr -in an element element, run these steps: +

    To replace an +attribute oldAttr with an attribute newAttr, run these steps:

      -
    1. Queue an attribute mutation record for element with oldAttr's - local name, oldAttr's namespace, and - oldAttr's value. +

    2. Handle attribute changes for oldAttr with oldAttr's + element, oldAttr's value, and newAttr's + value. -

    3. If element is custom, then - enqueue a custom element callback reaction with element, callback name - "attributeChangedCallback", and an argument list containing oldAttr's - local name, oldAttr's value, newAttr's - value, and oldAttr's namespace. +
    4. Replace oldAttr by newAttr in oldAttr's + element's attribute list. -

    5. Run the attribute change steps with element, oldAttr's - local name, oldAttr's value, newAttr's - value, and oldAttr's namespace. - -

    6. Replace oldAttr by newAttr in element's - attribute list. +

    7. Set newAttr's element to oldAttr's + element.

    8. Set oldAttr's element to null. - -

    9. Set newAttr's element to element.


    -To get an attribute by name given a +

    To get an attribute by name given a qualifiedName and element element, run these steps:

      @@ -6223,7 +6187,7 @@ To get an attribute by nam whose qualified name is qualifiedName, and null otherwise.
    -To +

    To get an attribute by namespace and local name given a namespace, localName, and element element, run these steps: @@ -6253,7 +6217,7 @@ run these steps:

  • Return attr's value.

  • -To set an attribute given an +

    To set an attribute given an attr and element, run these steps:

      @@ -6267,18 +6231,17 @@ To set an attribute given an
    1. If oldAttr is attr, return attr. -

    2. If oldAttr is non-null, replace it - by attr in element. +

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

    4. Otherwise, append attr to element.

    5. Return oldAttr.

    -To set an attribute value for -an element element -using a localName and value, and an optional prefix, and -namespace, run these steps: +

    To set an attribute value for an +element element, using a localName and value, and an +optional prefix, and namespace, run these steps:

    1. If prefix is not given, set it to null. @@ -6296,46 +6259,40 @@ using a localName and value, and an optional prefixappend this attribute to element, and then return. -
    2. Change - attribute from element to - value. +
    3. Change attribute to value.

    -To -remove an attribute by name +

    To remove an attribute by name given a qualifiedName and element element, run these steps:

    1. Let attr be the result of - getting an attribute given - qualifiedName and element. - -

    2. If attr is non-null, remove it from + getting an attribute given qualifiedName and element. +

    3. If attr is non-null, then remove attr. +

    4. Return attr.

    -To +

    To remove an attribute by namespace and local name -given a namespace, localName, and -element element, run these steps: +given a namespace, localName, and element element, +run these steps:

      -
    1. Let attr be the result of +
    2. Let attr be the result of getting an attribute given namespace, localName, and element. -

    3. If attr is non-null, - remove it from - element. +
    4. If attr is non-null, then remove attr. -

    5. Return attr. +
    6. Return attr.


    -An element can have an associated +

    An element can have an associated unique identifier (ID)

    Historically elements could have multiple identifiers e.g., by using @@ -6568,8 +6525,7 @@ method, when invoked, must run these steps: node document, then append this attribute to context object, and then return. -

  • Change attribute from context object to - value. +

  • Change attribute to value.

    The @@ -6685,7 +6641,7 @@ when invoked, must run these steps: contain attr, then throw a "{{NotFoundError!!exception}}" {{DOMException}}. -

  • Remove attr from context object. +

  • Remove attr.

  • Return attr. @@ -7097,11 +7053,10 @@ null. string value, run these steps:

      -
    1. If attribute's element is null, then set attribute's +
    2. If attribute's element is null, then set attribute's value to value. -

    3. Otherwise, change attribute from - attribute's element to value. +
    4. Otherwise, change attribute to value.

    The {{Attr/value}} attribute's setter must set an existing attribute value with