
com.viaoa.web.html.input.InputElement Maven / Gradle / Ivy
package com.viaoa.web.html.input;
import com.viaoa.web.html.HtmlFormElement;
import static com.viaoa.web.html.OAHtmlComponent.InputType;
import java.util.HashSet;
import java.util.Set;
/*
all attributes, by type:
https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement
*/
/**
* Base support for HTML Input Elements.
*/
public class InputElement extends HtmlFormElement {
public InputElement(String id, InputType type) {
super(id, type == null ? null : type.getFormElementType());
htmlComponent.setType(type);
}
public String getType() {
return htmlComponent.getType();
}
private static Set hsSupported = new HashSet<>(); // lowercase
static {
hsSupported.add("type");
}
public boolean isSupported(String name) {
if (name == null) return false;
return super.isSupported(name) || hsSupported.contains(name.toLowerCase());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy