Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(491)

Unified Diff: sky/engine/core/dom/DOMTokenList.cpp

Issue 788093003: Add clear() to Element.classList. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/engine/core/dom/DOMTokenList.h ('k') | sky/engine/core/dom/DOMTokenList.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/dom/DOMTokenList.cpp
diff --git a/sky/engine/core/dom/DOMTokenList.cpp b/sky/engine/core/dom/DOMTokenList.cpp
index 001af3a2d4fd9ffae4f6af069667a6042037e496..0fea487dd3e04f87a17ce9046dfe1fa56544988c 100644
--- a/sky/engine/core/dom/DOMTokenList.cpp
+++ b/sky/engine/core/dom/DOMTokenList.cpp
@@ -83,6 +83,11 @@ void DOMTokenList::setValue(const AtomicString& value)
m_element->setAttribute(HTMLNames::classAttr, value);
}
+void DOMTokenList::clear()
+{
+ m_element->removeAttribute(HTMLNames::classAttr);
+}
+
bool DOMTokenList::validateToken(const String& token, ExceptionState& exceptionState)
{
if (token.isEmpty()) {
« no previous file with comments | « sky/engine/core/dom/DOMTokenList.h ('k') | sky/engine/core/dom/DOMTokenList.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698