The DOMElement class
Guide
Edit on GitHub ✎
The number of child elements.
Class synopsis
class DOMElement extends DOMNode implements DOMParentNode implements DOMChildNode { }
Properties
childElementCountThe number of child elements.
firstElementChildFirst child element or null.
lastElementChildLast child element or null.
nextElementSiblingThe next sibling element or null.
previousElementSiblingThe previous sibling element or null.
schemaTypeInfoNot implemented yet, always return null
tagNameThe element name
classNameA string representing the classes of the element separated by spaces.
idReflects the element ID through the
"id"attribute.
Changelog
| Version | Description |
|---|---|
| 8.3.0 | The className and id properties and the DOMElement::getAttributeNames, DOMElement::insertAdjacentElement, DOMElement::insertAdjacentText, and DOMElement::toggleAttribute methods have been added. |
| 8.0.0 | The firstElementChild, lastElementChild, childElementCount, previousElementSibling, and nextElementSibling properties have been added. |
| 8.0.0 | DOMElement implements DOMParentNode and DOMChildNode now. |
Notes Utf8
Domelement