-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathElement.java
More file actions
69 lines (57 loc) · 1.6 KB
/
Element.java
File metadata and controls
69 lines (57 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
package snap.webapi;
/**
* This class is a wrapper for Web API Element (https://developer.mozilla.org/en-US/docs/Web/API/Element).
*/
public class Element extends Node {
/**
* Constructor.
*/
public Element(Object jsObj)
{
super(jsObj);
}
/**
* Returns the id.
*/
public String getId() { return getMemberString("id"); }
/**
* Sets the id.
*/
public void setId(String idStr) { setMemberString("id", idStr); }
/**
* Returns the class name.
*/
public String getClassName() { return getMemberString("className"); }
/**
* Sets the class name.
*/
public void setClassName(String idStr) { setMemberString("className", idStr); }
/**
* Returns the class list.
*/
public DOMTokenList getClassList()
{
Object jsObj = getMember("classList");
return new DOMTokenList(jsObj);
}
/**
* Returns element attribute for attribute name.
*/
public String getAttribute(String aName) { return getMemberString(aName); }
/**
* Sets element attribute for attribute name.
*/
public void setAttribute(String aName, String aValue) { setMemberString(aName, aValue); }
/**
* Returns the InnerHTML string.
*/
public String getInnerHTML() { return getMemberString("innerHTML"); }
/**
* Sets the InnerHTML string.
*/
public void setInnerHTML(String htmlStr) { setMemberString("innerHTML", htmlStr); }
/**
* Set pointer capture.
*/
public void setPointerCapture(int anId) { call("setPointerCapture", anId); }
}