From 66ce9930199897794247e037a6046dd5f357cffe Mon Sep 17 00:00:00 2001 From: Ivan Hetman Date: Mon, 11 Jan 2021 11:12:20 +0200 Subject: [PATCH] JS: add getter for Element.classList (#553) --- .../src/main/java/org/teavm/jso/dom/html/HTMLElement.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/jso/apis/src/main/java/org/teavm/jso/dom/html/HTMLElement.java b/jso/apis/src/main/java/org/teavm/jso/dom/html/HTMLElement.java index 27f33e069..e49359196 100644 --- a/jso/apis/src/main/java/org/teavm/jso/dom/html/HTMLElement.java +++ b/jso/apis/src/main/java/org/teavm/jso/dom/html/HTMLElement.java @@ -24,6 +24,7 @@ import org.teavm.jso.dom.events.KeyboardEventTarget; import org.teavm.jso.dom.events.LoadEventTarget; import org.teavm.jso.dom.events.MouseEventTarget; import org.teavm.jso.dom.events.WheelEventTarget; +import org.teavm.jso.dom.types.DOMTokenList; import org.teavm.jso.dom.xml.Element; import org.teavm.jso.dom.xml.Node; import org.teavm.jso.dom.xml.NodeList; @@ -150,6 +151,9 @@ public interface HTMLElement extends Element, ElementCSSInlineStyle, EventTarget @JSProperty void setClassName(String className); + @JSProperty + DOMTokenList getClassList(); + default HTMLElement withAttr(String name, String value) { setAttribute(name, value); return this;