Skip to content

Commit 2285d12

Browse files
committed
Extracted not added items from PR konsoletyper#313
1 parent e877cc8 commit 2285d12

File tree

4 files changed

+67
-40
lines changed

4 files changed

+67
-40
lines changed

jso/apis/src/main/java/org/teavm/jso/dom/events/MouseEvent.java

+6
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ public interface MouseEvent extends Event {
4141
@JSProperty
4242
int getClientY();
4343

44+
@JSProperty
45+
int getX();
46+
47+
@JSProperty
48+
int getY();
49+
4450
@JSProperty
4551
int getOffsetX();
4652

jso/apis/src/main/java/org/teavm/jso/dom/html/HTMLElement.java

+1-40
Original file line numberDiff line numberDiff line change
@@ -85,35 +85,14 @@ public interface HTMLElement extends Element, ElementCSSInlineStyle, EventTarget
8585
@JSProperty
8686
String getAccessKeyLabel();
8787

88-
@JSProperty
89-
int getClientWidth();
90-
91-
@JSProperty
92-
int getClientHeight();
93-
9488
@JSProperty
9589
int getAbsoluteLeft();
9690

9791
@JSProperty
9892
int getAbsoluteTop();
9993

10094
@JSProperty
101-
int getScrollLeft();
102-
103-
@JSProperty
104-
void setScrollLeft(int scrollLeft);
105-
106-
@JSProperty
107-
int getScrollTop();
108-
109-
@JSProperty
110-
void setScrollTop(int scrollTop);
111-
112-
@JSProperty
113-
int getScrollWidth();
114-
115-
@JSProperty
116-
int getScrollHeight();
95+
HTMLElement getOffsetParent();
11796

11897
@JSProperty
11998
int getOffsetWidth();
@@ -131,15 +110,6 @@ public interface HTMLElement extends Element, ElementCSSInlineStyle, EventTarget
131110
@Override
132111
HTMLDocument getOwnerDocument();
133112

134-
@JSProperty
135-
HTMLCollection getChildren();
136-
137-
@JSProperty
138-
String getInnerHTML();
139-
140-
@JSProperty
141-
void setInnerHTML(String content);
142-
143113
@JSProperty
144114
String getInnerText();
145115

@@ -148,15 +118,6 @@ public interface HTMLElement extends Element, ElementCSSInlineStyle, EventTarget
148118

149119
TextRectangle getBoundingClientRect();
150120

151-
@JSProperty
152-
String getClassName();
153-
154-
@JSProperty
155-
void setClassName(String className);
156-
157-
@JSProperty
158-
DOMTokenList getClassList();
159-
160121
default HTMLElement withAttr(String name, String value) {
161122
setAttribute(name, value);
162123
return this;

jso/apis/src/main/java/org/teavm/jso/dom/types/DOMTokenList.java

+10
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,17 @@ public interface DOMTokenList extends JSObject {
3030

3131
void add(String token);
3232

33+
void add(String token1, String token2);
34+
35+
void add(String... tokens);
36+
3337
void remove(String token);
3438

39+
void remove(String token1, String token2);
40+
41+
void remove(String... tokens);
42+
3543
boolean toggle(String token);
44+
45+
boolean toggle(String token, boolean force);
3646
}

jso/apis/src/main/java/org/teavm/jso/dom/xml/Element.java

+50
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
package org.teavm.jso.dom.xml;
1717

1818
import org.teavm.jso.JSProperty;
19+
import org.teavm.jso.dom.html.HTMLCollection;
20+
import org.teavm.jso.dom.types.DOMTokenList;
1921

2022
public interface Element extends Node {
2123
String getAttribute(String name);
@@ -62,4 +64,52 @@ public interface Element extends Node {
6264
String getTagName();
6365

6466
void scrollIntoView();
67+
68+
@JSProperty
69+
HTMLCollection getChildren();
70+
71+
@JSProperty
72+
int getClientWidth();
73+
74+
@JSProperty
75+
int getClientHeight();
76+
77+
@JSProperty
78+
int getClientTop();
79+
80+
@JSProperty
81+
int getClientLeft();
82+
83+
@JSProperty
84+
String getClassName();
85+
86+
@JSProperty
87+
void setClassName(String className);
88+
89+
@JSProperty
90+
DOMTokenList getClassList();
91+
92+
@JSProperty
93+
String getInnerHTML();
94+
95+
@JSProperty
96+
void setInnerHTML(String content);
97+
98+
@JSProperty
99+
int getScrollLeft();
100+
101+
@JSProperty
102+
void setScrollLeft(int scrollLeft);
103+
104+
@JSProperty
105+
int getScrollTop();
106+
107+
@JSProperty
108+
void setScrollTop(int scrollTop);
109+
110+
@JSProperty
111+
int getScrollWidth();
112+
113+
@JSProperty
114+
int getScrollHeight();
65115
}

0 commit comments

Comments
 (0)