-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathHTMLInputElement.java
More file actions
39 lines (33 loc) · 1.11 KB
/
HTMLInputElement.java
File metadata and controls
39 lines (33 loc) · 1.11 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
package snap.webapi;
/**
* This class is a wrapper for Web API HTMLInputElement (https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement).
*/
public class HTMLInputElement extends HTMLElement implements CanvasImageSource {
/**
* Constructor.
*/
public HTMLInputElement(Object jsObj)
{
super(jsObj);
}
/**
* Returns the input type.
*/
public String getType() { return getMemberString("type"); }
/**
* Sets the input type.
*/
public void setType(String aType) { setMemberString("type", aType); }
/**
* Sets a string that represents the element's accept attribute, containing comma-separated list of file types that can be selected.
*/
public void setAccept(String fileTypes) { setMemberString("accept", fileTypes); }
/**
* Sets a string that represents the element's accept attribute, containing comma-separated list of file types that can be selected.
*/
public void setAcceptTypes(String[] fileTypes)
{
String acceptTypesStr = String.join(",", fileTypes);
setAccept(acceptTypesStr);
}
}