diff --git a/dom.bs b/dom.bs index ad8b27a3c..97898fb10 100644 --- a/dom.bs +++ b/dom.bs @@ -6189,6 +6189,40 @@ in an element element, run these steps:
Create an attribute whose + local name is qualifiedName, value is + value, and node document is context object's + node document. + +
If qualifiedName does not match the Name
production in
+ XML, then throw an "{{InvalidCharacterError!!exception}}" {{DOMException}}.
+
+
If element is in the HTML namespace and its node document + is an HTML document, then set qualifiedName to qualifiedName in + ASCII lowercase. + + +
Let attribute be the first attribute in element's attribute list + whose qualified name is qualifiedName, and null otherwise. + +
If qualifiedName does not match the Name
production in
- XML, then throw an "{{InvalidCharacterError!!exception}}" {{DOMException}}.
-
-
If the context object is in the HTML namespace and its - node document is an HTML document, then set qualifiedName to - qualifiedName in ASCII lowercase. +
Let qualifiedName and attribute be the result of running get a valid attribute by name given the qualifiedName and context object -
Let attribute be the first attribute in context object's - attribute list whose qualified name is qualifiedName, - and null otherwise. - -
If attribute is null, create an attribute whose - local name is qualifiedName, value is - value, and node document is context object's - node document, then append this attribute to - context object, and then return. +
If attribute is null, run create an attribute by value given the qualifiedName, value and context object, and then return.
Change attribute from context object to value. @@ -6590,36 +6611,25 @@ when invoked, must run these steps: method, when invoked, must run these steps:
If qualifiedName does not match the Name
production in
- XML, then throw an "{{InvalidCharacterError!!exception}}" {{DOMException}}.
-
-
If the context object is in the HTML namespace and its - node document is an HTML document, then set qualifiedName to - qualifiedName in ASCII lowercase. - -
Let attribute be the first attribute in the context object's - attribute list whose qualified name is qualifiedName, - and null otherwise. - +
Let qualifiedName and attribute be the result of running get a valid attribute by name given the qualifiedName and context object
If attribute is null, then:
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 the context object's - node document, then append this attribute - to the context object, and then return true. +
If force is given and is false, return false. -
Return false. +
Run create an attribute by value given the qualifiedName, the empty string and context object. + +
Otherwise, if force is not given or is false, - remove an attribute given qualifiedName and the - context object, and then return false. +
Otherwise, if force is given and is true, return true. -
Return true. +
Remove an attribute given qualifiedName and the + context object. + +
The