public interface Element extends Node, NodeSelector
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAttribute(java.lang.String name)
Returns the value of a specified attribute on the element.
|
DomTokenList |
getClassList()
Getter for classList attribute
|
java.lang.String |
getInnerHTML()
Getter for innerHTML attribute
|
CssStyleDeclaration |
getStyle() |
boolean |
hasAttribute(java.lang.String name)
Method returns whether the current element has the specified attribute
|
void |
removeAttribute(java.lang.String name)
Removes an attribute from the specified element.
|
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Adds a new attribute or changes the value of an existing attribute on the specified element.
|
void |
setInnerHTML(java.lang.String s)
Setter for innerHTML attribute
|
appendChild, getChildNodes, getFirstChild, getInnerText, getLastChild, getParentElement, getParentNode, getTextContent, hasChildNodes, insertBefore, removeChild, replaceChild, setInnerText, setTextContent
addEventListener, dispatchEvent, removeEventListener
querySelector, querySelectorAll
java.lang.String getInnerHTML()
void setInnerHTML(java.lang.String s)
s
- The markup of the element's content.DomTokenList getClassList()
CssStyleDeclaration getStyle()
void setAttribute(java.lang.String name, java.lang.Object value)
name
- The name of the attribute as a string.value
- The desired new value of the attribute.java.lang.String getAttribute(java.lang.String name)
name
- The name of the attribute whose value you want to get.boolean hasAttribute(java.lang.String name)
name
- A string representing the name of the attribute.void removeAttribute(java.lang.String name)
name
- The name of the attribute to be removed from element.