Package org.loboevolution.html.node
Interface Element
- All Superinterfaces:
EventTarget
,InnerHTML
,Node
,NonDocumentTypeChildNode
,ParentNode
- All Known Subinterfaces:
HTMLAnchorElement
,HTMLAppletElement
,HTMLAreaElement
,HTMLBaseElement
,HTMLBaseFontElement
,HTMLBodyElement
,HTMLBRElement
,HTMLButtonElement
,HTMLCanvasElement
,HTMLDataElement
,HTMLDataListElement
,HTMLDetailsElement
,HTMLDialogElement
,HTMLDirectoryElement
,HTMLDivElement
,HTMLDListElement
,HTMLElement
,HTMLEmbedElement
,HTMLFieldSetElement
,HTMLFontElement
,HTMLFormElement
,HTMLHeadElement
,HTMLHeadingElement
,HTMLHRElement
,HTMLHtmlElement
,HTMLIFrameElement
,HTMLImageElement
,HTMLInputElement
,HTMLLabelElement
,HTMLLegendElement
,HTMLLIElement
,HTMLLinkElement
,HTMLMapElement
,HTMLMarqueeElement
,HTMLMenuElement
,HTMLMetaElement
,HTMLMeterElement
,HTMLModElement
,HTMLObjectElement
,HTMLOListElement
,HTMLOptGroupElement
,HTMLOptionElement
,HTMLOutputElement
,HTMLParagraphElement
,HTMLParamElement
,HTMLPictureElement
,HTMLPreElement
,HTMLProgressElement
,HTMLQuoteElement
,HTMLScriptElement
,HTMLSelectElement
,HTMLSlotElement
,HTMLSourceElement
,HTMLSpanElement
,HTMLStyleElement
,HTMLTableCaptionElement
,HTMLTableCellElement
,HTMLTableColElement
,HTMLTableDataCellElement
,HTMLTableElement
,HTMLTableHeaderCellElement
,HTMLTableRowElement
,HTMLTableSectionElement
,HTMLTextAreaElement
,HTMLTimeElement
,HTMLTitleElement
,HTMLUListElement
,HTMLUnknownElement
,HTMLVideoElement
,SMILAnimateColorElement
,SMILAnimateElement
,SMILAnimateMotionElement
,SMILAnimation
,SMILElement
,SMILLayoutElement
,SMILMediaElement
,SMILRefElement
,SMILRegionElement
,SMILRootLayoutElement
,SMILSetElement
,SMILSwitchElement
,SMILTopLayoutElement
,SVGAElement
,SVGAltGlyphDefElement
,SVGAltGlyphElement
,SVGAltGlyphItemElement
,SVGAnimateElement
,SVGAnimateMotionElement
,SVGAnimateTransformElement
,SVGAnimationElement
,SVGCircleElement
,SVGClipPathElement
,SVGColorProfileElement
,SVGComponentTransferFunctionElement
,SVGCursorElement
,SVGDefinitionSrcElement
,SVGDefsElement
,SVGDescElement
,SVGElement
,SVGEllipseElement
,SVGFEBlendElement
,SVGFEColorMatrixElement
,SVGFEComponentTransferElement
,SVGFECompositeElement
,SVGFEConvolveMatrixElement
,SVGFEDiffuseLightingElement
,SVGFEDisplacementMapElement
,SVGFEDistantLightElement
,SVGFEFloodElement
,SVGFEFuncAElement
,SVGFEFuncBElement
,SVGFEFuncGElement
,SVGFEFuncRElement
,SVGFEGaussianBlurElement
,SVGFEImageElement
,SVGFEMergeElement
,SVGFEMergeNodeElement
,SVGFEMorphologyElement
,SVGFEOffsetElement
,SVGFEPointLightElement
,SVGFESpecularLightingElement
,SVGFESpotLightElement
,SVGFETileElement
,SVGFETurbulenceElement
,SVGFilterElement
,SVGFontElement
,SVGFontFaceElement
,SVGFontFaceFormatElement
,SVGFontFaceNameElement
,SVGFontFaceSrcElement
,SVGFontFaceUriElement
,SVGForeignObjectElement
,SVGGElement
,SVGGlyphElement
,SVGGlyphRefElement
,SVGGradientElement
,SVGHKernElement
,SVGImageElement
,SVGLinearGradientElement
,SVGLineElement
,SVGMarkerElement
,SVGMaskElement
,SVGMetadataElement
,SVGMissingGlyphElement
,SVGMPathElement
,SVGPathElement
,SVGPatternElement
,SVGPolygonElement
,SVGPolylineElement
,SVGRadialGradientElement
,SVGRectElement
,SVGScriptElement
,SVGSetElement
,SVGStopElement
,SVGSVGElement
,SVGSwitchElement
,SVGSymbolElement
,SVGTextContentElement
,SVGTextElement
,SVGTextPathElement
,SVGTextPositioningElement
,SVGTitleElement
,SVGTRefElement
,SVGTSpanElement
,SVGUseElement
,SVGViewElement
,SVGVKernElement
- All Known Implementing Classes:
DTMNodeProxy
,ElementImpl
,HTMLAnchorElementImpl
,HTMLBaseElementImpl
,HTMLBasicInputElement
,HTMLBodyElementImpl
,HTMLBRElementImpl
,HTMLButtonElementImpl
,HTMLCanvasElementImpl
,HTMLCenterElementImpl
,HTMLDDElementImpl
,HTMLDetailsElementImpl
,HTMLDialogElementImpl
,HTMLDirectoryElementImpl
,HTMLDivElementImpl
,HTMLDListElementImpl
,HTMLElementImpl
,HTMLEmElementImpl
,HTMLFieldsetElementImpl
,HTMLFigureElementImpl
,HTMLFormElementImpl
,HTMLGenericMarkupElement
,HTMLHeadElementImpl
,HTMLHeadingElementImpl
,HTMLHRElementImpl
,HTMLHtmlElementImpl
,HTMLIFrameElementImpl
,HTMLImageElementImpl
,HTMLInputElementImpl
,HTMLLabelElementImpl
,HTMLLegendElementImpl
,HTMLLIElementImpl
,HTMLLinkElementImpl
,HTMLMarqueeElementImpl
,HTMLMeterElementImpl
,HTMLMonospacedElementImpl
,HTMLNonStandardElement
,HTMLNoScriptElementImpl
,HTMLObjectElementImpl
,HTMLOListElementImpl
,HTMLOptGroupElementImpl
,HTMLOptionElementImpl
,HTMLPElementImpl
,HTMLPreElementImpl
,HTMLProcessingInstruction
,HTMLProgressElementImpl
,HTMLQuoteElementImpl
,HTMLScriptElementImpl
,HTMLSelectElementImpl
,HTMLSmallElementImpl
,HTMLSpanElementImpl
,HTMLStrikeElementImpl
,HTMLStrongElementImpl
,HTMLStyleElementImpl
,HTMLSuperscriptElementImpl
,HTMLTableCaptionElementImpl
,HTMLTableCellElementImpl
,HTMLTableColElementImpl
,HTMLTableColGroupElementImpl
,HTMLTableElementImpl
,HTMLTableRowElementImpl
,HTMLTableSectionElementImpl
,HTMLTextAreaElementImpl
,HTMLTitleElementImpl
,HTMLUListElementImpl
,HTMLUnderlineElementImpl
,HTMLVideoElementImpl
,RSSChanelElementImpl
,RSSDescriptionElementImpl
,RSSElement
,RSSElementImpl
,RSSItemElementImpl
,RSSTitleElementImpl
,SVGAElementImpl
,SVGAnimateElementImpl
,SVGAnimateTransformElementImpl
,SVGAnimationElementImpl
,SVGAnimationImpl
,SVGCircleElementImpl
,SVGClipPathElementImpl
,SVGDefsElementImpl
,SVGElementImpl
,SVGEllipseElementImpl
,SVGFontElementImpl
,SVGFontFaceElementImpl
,SVGGElementImpl
,SVGGradientElementImpl
,SVGGraphic
,SVGImageElementImpl
,SVGLinearGradientElementImpl
,SVGLineElementImpl
,SVGLocatableImpl
,SVGPathElementImpl
,SVGPolygonElementImpl
,SVGPolylineElementImpl
,SVGRadialGradientElementImpl
,SVGRectElementImpl
,SVGStopElementImpl
,SVGStylableImpl
,SVGSVGElementImpl
,SVGSymbolElementImpl
,SVGTextElementImpl
,SVGTransformableImpl
,SVGUseElementImpl
Element is the most general base class from which all objects in a Document inherit.
It only has methods and properties common to all kinds of elements.
More specific classes inherit from Element.
-
Field Summary
Fields inherited from interface org.loboevolution.html.node.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NONE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
-
Method Summary
Modifier and TypeMethodDescription<E extends Element>
EReturns the first (starting at element) inclusive ancestor that matches selectors, and null otherwise.getAttribute
(String qualifiedName) Returns element's first attribute whose qualified name is qualifiedName, and null if there is no such attribute otherwise.String[]
Returns the qualified names of all element's attributes.getAttributeNode
(String name) getAttributeNode.getAttributeNodeNS
(String namespaceURI, String localName) getAttributeNodeNS.getAttributeNS
(String namespace, String localName) Returns element's attribute whose namespace is namespace and local name is localName, and null if there is no such attribute otherwise.getBoundingClientRect.Allows for manipulation of element's class content attribute as a set of whitespace-separated tokens through a DOMTokenList object.Returns the value of element's class content attribute.int
getClientHeight.int
getClientLeft.getClientRects.int
getClientTop.getClientWidth.getElementsByClassName
(String classNames) Returns a HTMLCollection of the elements in the object on which the method was invoked (a document or an element) that have all the classes given by classNames.getElementsByTagName
(String qualifiedName) getElementsByTagName.getElementsByTagNameNS
(String namespaceURI, String localName) getElementsByTagNameNS.getId()
Returns the value of element's id content attribute.getInnerHTML.getInnerText.Returns the local name.Returns the namespace.getOuterHTML.Returns the namespace prefix.getSchemaTypeInfo.double
getScrollHeight.double
getScrollLeft.double
getScrollTop.double
getScrollWidth.getSlot()
Returns the value of element's slot content attribute.Returns the HTML-uppercased qualified name.boolean
hasAttribute
(String qualifiedName) Returns true if element has an attribute whose qualified name is qualifiedName, and false otherwise.boolean
hasAttributeNS
(String namespace, String localName) Returns true if element has an attribute whose namespace is namespace and local name is localName.boolean
hasPointerCapture
(int pointerId) hasPointerCapture.insertAdjacentElement
(String where, Node insertedElement) insertAdjacentElement.void
insertAdjacentHTML
(String position, String text) insertAdjacentHTML.boolean
Returns true if matching selectors against element's root yields element, and false otherwise.void
releasePointerCapture
(int pointerId) releasePointerCapture.void
removeAttribute
(String qualifiedName) Removes element's first attribute whose qualified name is qualifiedName.removeAttributeNode
(Attr attr) removeAttributeNode.void
removeAttributeNS
(String namespace, String localName) Removes element's attribute whose namespace is namespace and local name is localName.void
requestPointerLock.void
scroll
(int x, int y) scroll.void
scrollBy
(int x, int y) scrollBy.void
scrollIntoView.void
scrollIntoView
(boolean arg) scrollIntoView.void
scrollTo
(int x, int y) scrollTo.void
setAttribute
(String qualifiedName, String value) Sets the value of element's first attribute whose qualified name is qualifiedName to value.setAttributeNode
(Attr attr) setAttributeNode.setAttributeNodeNS
(Attr attr) setAttributeNodeNS.void
setAttributeNS
(String namespace, String qualifiedName, String value) Sets the value of element's attribute whose namespace is namespace and local name is localName to value.void
setClassName
(String className) setClassName.void
setId.void
setIdAttribute
(String name, boolean isId) setIdAttribute.void
setIdAttributeNode
(Attr idAttr, boolean isId) setIdAttributeNode.void
setIdAttributeNS
(String namespaceURI, String localName, boolean isId) setIdAttributeNode.void
setOuterHTML
(String outerHTML) setOuterHTML.void
setPointerCapture
(int pointerId) setPointerCapture.void
setScrollLeft
(double scrollLeft) setScrollLeft.void
setScrollTop
(double scrollTop) setScrollTop.void
setSlot.boolean
toggleAttribute
(String qualifiedName) toggleAttribute.boolean
toggleAttribute
(String qualifiedName, boolean force) If force is not given, "toggles" qualifiedName, removing it if it is present and adding it if it is not present.Methods inherited from interface org.loboevolution.events.EventTarget
addEventListener, addEventListener, dispatchEvent, dispatchEvent, removeEventListener, removeEventListener
Methods inherited from interface org.loboevolution.html.node.InnerHTML
setInnerHTML
Methods inherited from interface org.loboevolution.html.node.Node
appendChild, cloneNode, cloneNode, compareDocumentPosition, contains, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentElement, getParentNode, getPreviousSibling, getRootNode, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isIsConnected, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, prepend, prependChild, removeChild, replaceChild, setNodeValue, setOwnerDocument, setPrefix, setTextContent, setUserData
Methods inherited from interface org.loboevolution.html.node.NonDocumentTypeChildNode
getNextElementSibling, getPreviousElementSibling
Methods inherited from interface org.loboevolution.html.node.ParentNode
getChildElementCount, getChildren, getFirstElementChild, getLastElementChild, querySelector, querySelectorAll
-
Method Details
-
getClassList
DOMTokenList getClassList()Allows for manipulation of element's class content attribute as a set of whitespace-separated tokens through a DOMTokenList object.- Returns:
- a
DOMTokenList
object.
-
getClassName
String getClassName()Returns the value of element's class content attribute. Can be set to change it.- Returns:
- a
String
object.
-
setClassName
setClassName.
- Parameters:
className
- aString
object.
-
getClientHeight
int getClientHeight()getClientHeight.
- Returns:
- a
Integer
object.
-
getClientLeft
int getClientLeft()getClientLeft.
- Returns:
- a
Integer
object.
-
getClientTop
int getClientTop()getClientTop.
- Returns:
- a
Integer
object.
-
getClientWidth
Integer getClientWidth()getClientWidth.
- Returns:
- a
Integer
object.
-
getId
String getId()Returns the value of element's id content attribute. Can be set to change it.- Returns:
- a
String
object.
-
setId
setId.
- Parameters:
id
- aString
object.
-
getLocalName
String getLocalName()Returns the local name.- Specified by:
getLocalName
in interfaceNode
- Returns:
- a
String
object.
-
getNamespaceURI
String getNamespaceURI()Returns the namespace.- Specified by:
getNamespaceURI
in interfaceNode
- Returns:
- a
String
object.
-
getOuterHTML
String getOuterHTML()getOuterHTML.
- Returns:
- a
String
object.
-
getInnerHTML
String getInnerHTML()getInnerHTML.
- Specified by:
getInnerHTML
in interfaceInnerHTML
- Returns:
- a
String
object.
-
getInnerText
String getInnerText()getInnerText.
- Returns:
- a
String
object.
-
getBoundingClientRect
DOMRect getBoundingClientRect()getBoundingClientRect.
- Returns:
- a
DOMRect
object.
-
getClientRects
DOMRectList getClientRects()getClientRects.
- Returns:
- a
DOMRectList
object.
-
getSchemaTypeInfo
TypeInfo getSchemaTypeInfo()getSchemaTypeInfo.
- Returns:
- a
TypeInfo
object.
-
setOuterHTML
setOuterHTML.
- Parameters:
outerHTML
- aString
object.
-
getPrefix
String getPrefix()Returns the namespace prefix. -
getScrollHeight
double getScrollHeight()getScrollHeight.
- Returns:
- a double.
-
getScrollLeft
double getScrollLeft()getScrollLeft.
- Returns:
- a double.
-
setScrollLeft
void setScrollLeft(double scrollLeft) setScrollLeft.
- Parameters:
scrollLeft
- aInteger
object.
-
getScrollTop
double getScrollTop()getScrollTop.
- Returns:
- a double.
-
setScrollTop
void setScrollTop(double scrollTop) setScrollTop.
- Parameters:
scrollTop
- aInteger
object.
-
getScrollWidth
double getScrollWidth()getScrollWidth.
- Returns:
- a double.
-
getSlot
String getSlot()Returns the value of element's slot content attribute. Can be set to change it.- Returns:
- a
String
object.
-
setSlot
setSlot.
- Parameters:
slot
- aString
object.
-
getTagName
String getTagName()Returns the HTML-uppercased qualified name.- Returns:
- a
String
object.
-
closest
Returns the first (starting at element) inclusive ancestor that matches selectors, and null otherwise.- Type Parameters:
E
- a E object.- Parameters:
selector
- aString
object.- Returns:
- a E object.
-
getAttribute
Returns element's first attribute whose qualified name is qualifiedName, and null if there is no such attribute otherwise. -
getAttributeNS
Returns element's attribute whose namespace is namespace and local name is localName, and null if there is no such attribute otherwise. -
getAttributeNames
String[] getAttributeNames()Returns the qualified names of all element's attributes. Can contain duplicates.- Returns:
- an array of
String
objects.
-
getAttributeNode
getAttributeNode.
-
getAttributeNodeNS
getAttributeNodeNS.
-
getElementsByClassName
Returns a HTMLCollection of the elements in the object on which the method was invoked (a document or an element) that have all the classes given by classNames. The classNames argument is interpreted as a space-separated list of classes.- Parameters:
classNames
- aString
object.- Returns:
- a
HTMLCollection
object.
-
getElementsByTagName
getElementsByTagName.
- Parameters:
qualifiedName
- aString
object.- Returns:
- a
HTMLCollection
object.
-
getElementsByTagNameNS
getElementsByTagNameNS.
- Parameters:
namespaceURI
- aString
object.localName
- aString
object.- Returns:
- a
HTMLCollection
object.
-
hasAttribute
Returns true if element has an attribute whose qualified name is qualifiedName, and false otherwise.- Parameters:
qualifiedName
- aString
object.- Returns:
- a boolean.
-
hasAttributeNS
Returns true if element has an attribute whose namespace is namespace and local name is localName. -
hasPointerCapture
boolean hasPointerCapture(int pointerId) hasPointerCapture.
- Parameters:
pointerId
- aInteger
object.- Returns:
- a boolean.
-
matches
Returns true if matching selectors against element's root yields element, and false otherwise.- Parameters:
selectors
- aString
object.- Returns:
- a boolean.
-
releasePointerCapture
void releasePointerCapture(int pointerId) releasePointerCapture.
- Parameters:
pointerId
- aInteger
object.
-
removeAttribute
Removes element's first attribute whose qualified name is qualifiedName.- Parameters:
qualifiedName
- aString
object.
-
removeAttributeNS
Removes element's attribute whose namespace is namespace and local name is localName. -
removeAttributeNode
removeAttributeNode.
-
requestPointerLock
void requestPointerLock()requestPointerLock.
-
scroll
void scroll(int x, int y) scroll.
- Parameters:
x
- a double.y
- a double.
-
scrollBy
void scrollBy(int x, int y) scrollBy.
- Parameters:
x
- a double.y
- a double.
-
scrollIntoView
void scrollIntoView(boolean arg) scrollIntoView.
- Parameters:
arg
- a boolean.
-
scrollIntoView
void scrollIntoView()scrollIntoView.
-
scrollTo
void scrollTo(int x, int y) scrollTo.
- Parameters:
x
- a double.y
- a double.
-
setAttribute
Sets the value of element's first attribute whose qualified name is qualifiedName to value. -
setAttributeNS
Sets the value of element's attribute whose namespace is namespace and local name is localName to value. -
setAttributeNode
setAttributeNode.
-
setAttributeNodeNS
setAttributeNodeNS.
-
setIdAttribute
setIdAttribute.
- Parameters:
name
- aString
object.isId
- a boolean.
-
setIdAttributeNode
setIdAttributeNode.
- Parameters:
idAttr
- aAttr
object.isId
- a boolean.
-
setIdAttributeNS
setIdAttributeNode.
-
setPointerCapture
void setPointerCapture(int pointerId) setPointerCapture.
- Parameters:
pointerId
- aInteger
object.
-
toggleAttribute
If force is not given, "toggles" qualifiedName, removing it if it is present and adding it if it is not present. If force is true, adds qualifiedName. If force is false, removes qualifiedName.Returns true if qualifiedName is now present, and false otherwise.
- Parameters:
qualifiedName
- aString
object.force
- a boolean.- Returns:
- a boolean.
-
toggleAttribute
toggleAttribute.
- Parameters:
qualifiedName
- aString
object.- Returns:
- a boolean.
-
insertAdjacentElement
insertAdjacentElement.
-
insertAdjacentHTML
insertAdjacentHTML.
-