Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 83ea074

Browse files
committed
Add more properties and methods for native Element and window object
1 parent 1457a73 commit 83ea074

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

sources/net.sf.j2s.html/src/net/sf/j2s/html/Element.java

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
package net.sf.j2s.html;
22

33

4-
5-
6-
74
public class Element {
85
public ContentWindow contentWindow;
96

107
public Element parentNode;
118
public Element[] childNodes;
129
public Element nextSibling;
10+
public Element previousSibling;
1311
public int offsetLeft;
1412
public int offsetTop;
1513
public Element offsetParent;
@@ -62,17 +60,22 @@ public class Element {
6260

6361
public boolean multiple;
6462

63+
public String action;
64+
public String method;
65+
public String enctype;
66+
public String accept;
67+
6568
public Object onchange;
6669

6770
public Object onselectchange;
6871

69-
public String rows;
72+
public int rows;
7073

71-
public String cols;
74+
public int cols;
7275

73-
public String width;
76+
public int width;
7477

75-
public String height;
78+
public int height;
7679

7780
public int offsetWidth, clientWidth, scrollWidth, scrollLeft;
7881

@@ -135,5 +138,9 @@ public class Element {
135138
public native Element getElementById(String id);
136139

137140
public native void setAttribute(String prop, String value);
141+
142+
public native void submit();
143+
144+
public native void reset();
138145

139146
}

sources/net.sf.j2s.html/src/net/sf/j2s/html/window.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ public class window {
1010

1111
public static location location;
1212

13+
public static int innerWidth;
14+
public static int innerHeight;
15+
1316
public native static int setInterval(Object runnable, int milliseconds);
1417

1518
public native static void clearInterval(int timerId);

0 commit comments

Comments
 (0)