From 980a633468b56577313021e0c38e74df44affe84 Mon Sep 17 00:00:00 2001
From: Jonathan Kingston
Removes element's attribute whose namespace is namespace and local name is localName. +
element . toggleAttribute(qualifiedName [, force])
+ If force is not given, "toggles" qualifiedName, removing it if it is + present and adding it if it is not present. If force is true, adds + qualifiedName. If force is false, removes qualifiedName. + +
Returns true if qualifiedName is now present, and false otherwise. +
element . hasAttribute(qualifiedName)
Returns true if element has an attribute whose qualified name is qualifiedName, and false otherwise. @@ -6577,6 +6586,42 @@ when invoked, must run these steps: otherwise. +
The toggleAttribute(qualifiedName, force)
+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. + + +
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. + +
Return false. +
Otherwise, if force is not given or is false, + remove an attribute given qualifiedName and the + context object, and then return false. + +
Return true. +
The
hasAttributeNS(namespace, localName)
method, when invoked, must run these steps:
@@ -9629,7 +9674,7 @@ method, when invoked, must run these steps:
token from context object's token set, run the update steps and
return false.
-
Otherwise, return true. +
Return true.
Otherwise, if force not given or is true, append token @@ -9915,6 +9960,7 @@ Joe Kesselman, John Atkins, John Dai, Jonas Sicking, +Jonathan Kingston, Jonathan Robie, Joris van der Wel, Joshua Bell,