Skip to content

Commit

Permalink
Extracted not added items from PR konsoletyper#313
Browse files Browse the repository at this point in the history
  • Loading branch information
Ihromant committed Nov 23, 2023
1 parent e877cc8 commit 2285d12
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ public interface MouseEvent extends Event {
@JSProperty
int getClientY();

@JSProperty
int getX();

@JSProperty
int getY();

@JSProperty
int getOffsetX();

Expand Down
41 changes: 1 addition & 40 deletions jso/apis/src/main/java/org/teavm/jso/dom/html/HTMLElement.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,35 +85,14 @@ public interface HTMLElement extends Element, ElementCSSInlineStyle, EventTarget
@JSProperty
String getAccessKeyLabel();

@JSProperty
int getClientWidth();

@JSProperty
int getClientHeight();

@JSProperty
int getAbsoluteLeft();

@JSProperty
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();
Expand All @@ -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();

Expand All @@ -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;
Expand Down
10 changes: 10 additions & 0 deletions jso/apis/src/main/java/org/teavm/jso/dom/types/DOMTokenList.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
50 changes: 50 additions & 0 deletions jso/apis/src/main/java/org/teavm/jso/dom/xml/Element.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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();
}

0 comments on commit 2285d12

Please sign in to comment.