@JsType(isNative=true, name="HTMLElement", namespace="<global>") public class BaseHtmlElement extends BaseElement
BaseEventTarget.EventListenerCallback
Modifier | Constructor and Description |
---|---|
protected |
BaseHtmlElement()
To avoid any instantiation
|
Modifier and Type | Method and Description |
---|---|
double |
getAbsoluteLeft()
Returns an element's absolute left coordinate in the document's coordinate system.
|
double |
getAbsoluteTop()
Returns an element's absolute top coordinate in the document's coordinate system.
|
String |
getInnerText()
Returns the "rendered" text content of a node and its descendants.
As a getter, it approximates the text the user would get if they highlighted the contents of the element with the cursor and then copied it to the clipboard. |
int |
getOffsetHeight()
Returns a number containing the height of an element, relative to the layout.
|
int |
getOffsetLeft()
Returns a number, the distance from this element's left border to its offsetParent's left border.
|
BaseElement |
getOffsetParent()
Returns a element that is the element from which all offset calculations are currently computed.
|
int |
getOffsetTop()
Returns a number, the distance from this element's top border to its offsetParent's top border.
|
int |
getOffsetWidth()
Returns a number containing the width of an element, relative to the layout.
|
BaseHtmlElement |
getParentHtmlElement()
Returns an HTML element that is the parent of this element.
If the element has no parent, or if that parent is not an element, returns null . |
BaseElement |
getScrollingElement()
Returns the scrolling element of the document, if there is, or the document element.
|
BaseStyleProperties |
getStyle()
Returns an object representing the declarations of an element's style attributes.
|
int |
getTabIndex()
Returns a number representing the position of the element in the tabbing order.
|
void |
removeFromParent()
Removes this node from its parent node if it is attached to one.
|
void |
setInnerText(String innerText)
Sets the "rendered" text content of a node and its descendants.
As a getter, it approximates the text the user would get if they highlighted the contents of the element with the cursor and then copied it to the clipboard. |
void |
setTabIndex(int tabIndex)
Sets a number representing the position of the element in the tabbing order.
|
getAttributes, getChildElementCount, getClientHeight, getClientLeft, getClientTop, getClientWidth, getElementsByTagName, getFirstElementChild, getId, getInnerHTML, getLastElementChild, getNextElementSibling, getOuterHTML, getPreviousElementSibling, getScrollHeight, getScrollLeft, getScrollTop, getScrollWidth, getTagName, hasAttributes, remove, setId, setInnerHTML
appendChild, cloneNode, getChildNodes, getFirstChild, getLastChild, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentElement, getParentNode, getPreviousSibling, getTextContent, hasChildNodes, insertBefore, removeAllChildren, removeChild, setNodeValue, setTextContent
addEventListener, removeEventListener
@JsProperty public final String getInnerText()
@JsProperty public final void setInnerText(String innerText)
innerText
- the "rendered" text content of a node and its descendants@JsProperty public final int getOffsetHeight()
@JsProperty public final int getOffsetLeft()
@JsProperty public final BaseElement getOffsetParent()
@JsProperty public final int getOffsetTop()
@JsProperty public final int getOffsetWidth()
@JsProperty public final BaseStyleProperties getStyle()
@JsProperty public final int getTabIndex()
@JsProperty public final void setTabIndex(int tabIndex)
tabIndex
- a number representing the position of the element in the tabbing order@JsOverlay public final BaseHtmlElement getParentHtmlElement()
null
.@JsOverlay public final void removeFromParent()
@JsOverlay public final double getAbsoluteTop()
@JsOverlay public final double getAbsoluteLeft()
@JsOverlay public final BaseElement getScrollingElement()