diff --git a/jso/apis/src/main/java/org/teavm/jso/dom/events/MouseEvent.java b/jso/apis/src/main/java/org/teavm/jso/dom/events/MouseEvent.java index 7b8efa2ef8..637ca7631c 100644 --- a/jso/apis/src/main/java/org/teavm/jso/dom/events/MouseEvent.java +++ b/jso/apis/src/main/java/org/teavm/jso/dom/events/MouseEvent.java @@ -41,6 +41,12 @@ public interface MouseEvent extends Event { @JSProperty int getClientY(); + @JSProperty + int getX(); + + @JSProperty + int getY(); + @JSProperty int getOffsetX(); 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 3e627f76cc..b13b4cb6b5 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 @@ -85,12 +85,6 @@ public interface HTMLElement extends Element, ElementCSSInlineStyle, EventTarget @JSProperty String getAccessKeyLabel(); - @JSProperty - int getClientWidth(); - - @JSProperty - int getClientHeight(); - @JSProperty int getAbsoluteLeft(); @@ -98,22 +92,7 @@ public interface HTMLElement extends Element, ElementCSSInlineStyle, EventTarget int getAbsoluteTop(); @JSProperty - int getScrollLeft(); - - @JSProperty - void setScrollLeft(int scrollLeft); - - @JSProperty - int getScrollTop(); - - @JSProperty - void setScrollTop(int scrollTop); - - @JSProperty - int getScrollWidth(); - - @JSProperty - int getScrollHeight(); + HTMLElement getOffsetParent(); @JSProperty int getOffsetWidth(); @@ -131,15 +110,6 @@ public interface HTMLElement extends Element, ElementCSSInlineStyle, EventTarget @Override HTMLDocument getOwnerDocument(); - @JSProperty - HTMLCollection getChildren(); - - @JSProperty - String getInnerHTML(); - - @JSProperty - void setInnerHTML(String content); - @JSProperty String getInnerText(); @@ -148,15 +118,6 @@ public interface HTMLElement extends Element, ElementCSSInlineStyle, EventTarget TextRectangle getBoundingClientRect(); - @JSProperty - String getClassName(); - - @JSProperty - void setClassName(String className); - - @JSProperty - DOMTokenList getClassList(); - default HTMLElement withAttr(String name, String value) { setAttribute(name, value); return this; diff --git a/jso/apis/src/main/java/org/teavm/jso/dom/types/DOMTokenList.java b/jso/apis/src/main/java/org/teavm/jso/dom/types/DOMTokenList.java index 6f69e6d83b..6868ff2d83 100644 --- a/jso/apis/src/main/java/org/teavm/jso/dom/types/DOMTokenList.java +++ b/jso/apis/src/main/java/org/teavm/jso/dom/types/DOMTokenList.java @@ -30,7 +30,17 @@ public interface DOMTokenList extends JSObject { void add(String token); + void add(String token1, String token2); + + void add(String... tokens); + void remove(String token); + void remove(String token1, String token2); + + void remove(String... tokens); + boolean toggle(String token); + + boolean toggle(String token, boolean force); } diff --git a/jso/apis/src/main/java/org/teavm/jso/dom/xml/Element.java b/jso/apis/src/main/java/org/teavm/jso/dom/xml/Element.java index a718a495c1..80512413bd 100644 --- a/jso/apis/src/main/java/org/teavm/jso/dom/xml/Element.java +++ b/jso/apis/src/main/java/org/teavm/jso/dom/xml/Element.java @@ -16,6 +16,8 @@ package org.teavm.jso.dom.xml; import org.teavm.jso.JSProperty; +import org.teavm.jso.dom.html.HTMLCollection; +import org.teavm.jso.dom.types.DOMTokenList; public interface Element extends Node { String getAttribute(String name); @@ -62,4 +64,52 @@ public interface Element extends Node { String getTagName(); void scrollIntoView(); + + @JSProperty + HTMLCollection getChildren(); + + @JSProperty + int getClientWidth(); + + @JSProperty + int getClientHeight(); + + @JSProperty + int getClientTop(); + + @JSProperty + int getClientLeft(); + + @JSProperty + String getClassName(); + + @JSProperty + void setClassName(String className); + + @JSProperty + DOMTokenList getClassList(); + + @JSProperty + String getInnerHTML(); + + @JSProperty + void setInnerHTML(String content); + + @JSProperty + int getScrollLeft(); + + @JSProperty + void setScrollLeft(int scrollLeft); + + @JSProperty + int getScrollTop(); + + @JSProperty + void setScrollTop(int scrollTop); + + @JSProperty + int getScrollWidth(); + + @JSProperty + int getScrollHeight(); }