Since: 8.4

class HTMLElement extends Element (View source)

Constants

DOCUMENT_POSITION_DISCONNECTED

DOCUMENT_POSITION_PRECEDING

DOCUMENT_POSITION_FOLLOWING

DOCUMENT_POSITION_CONTAINS

DOCUMENT_POSITION_CONTAINED_BY

DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC

Properties

int $nodeType from  Node
string $nodeName from  Node
string $baseURI from  Node
bool $isConnected from  Node
Document|null $ownerDocument from  Node
Node|null $parentNode from  Node
Element|null $parentElement from  Node
Node> $childNodes from  Node
Node|null $firstChild from  Node
Node|null $lastChild from  Node
Node|null $previousSibling from  Node
Node|null $nextSibling from  Node
string|null $nodeValue from  Node
string|null $textContent from  Node
string|null $namespaceURI from  Element
string|null $prefix from  Element
string $localName from  Element
string $tagName from  Element
string $id from  Element
string $className from  Element
TokenList read-only $classList from  Element
NamedNodeMap $attributes from  Element
Element|null $firstElementChild from  Element
Element|null $lastElementChild from  Element
int $childElementCount from  Element
Element|null $previousElementSibling from  Element
Element|null $nextElementSibling from  Element
string $innerHTML from  Element
string $outerHTML from  Element
string $substitutedNodeValue from  Element

Methods

getRootNode(array $options = [])

No description

from  Node
bool
hasChildNodes()

No description

from  Node
void
normalize()

No description

from  Node
cloneNode(bool $deep = false)

No description

from  Node
bool
isEqualNode(Node|null $otherNode)

No description

from  Node
bool
isSameNode(Node|null $otherNode)

No description

from  Node
int
compareDocumentPosition(Node $other)

No description

from  Node
bool
contains(Node|null $other)

No description

from  Node
string|null
lookupPrefix(string|null $namespace)

No description

from  Node
string|null
lookupNamespaceURI(string|null $prefix)

No description

from  Node
bool
isDefaultNamespace(string|null $namespace)

No description

from  Node
insertBefore(Node $node, Node|null $child)

No description

from  Node
appendChild(Node $node)

No description

from  Node
replaceChild(Node $node, Node $child)

No description

from  Node
removeChild(Node $child)

No description

from  Node
int
getLineNo()

No description

from  Node
string
getNodePath()

No description

from  Node
string|false
C14N(bool $exclusive = false, bool $withComments = false, array|null $xpath = null, array|null $nsPrefixes = null)

No description

from  Node
int|false
C14NFile(string $uri, bool $exclusive = false, bool $withComments = false, array|null $xpath = null, array|null $nsPrefixes = null)

No description

from  Node
array
__sleep()

No description

from  Node
void
__wakeup()

No description

from  Node
bool
hasAttributes()

No description

from  Element
array
getAttributeNames()

No description

from  Element
string|null
getAttribute(string $qualifiedName)

No description

from  Element
string|null
getAttributeNS(string|null $namespace, string $localName)

No description

from  Element
void
setAttribute(string $qualifiedName, string $value)

No description

from  Element
void
setAttributeNS(string|null $namespace, string $qualifiedName, string $value)

No description

from  Element
void
removeAttribute(string $qualifiedName)

No description

from  Element
void
removeAttributeNS(string|null $namespace, string $localName)

No description

from  Element
bool
toggleAttribute(string $qualifiedName, bool|null $force = null)

No description

from  Element
bool
hasAttribute(string $qualifiedName)

No description

from  Element
bool
hasAttributeNS(string|null $namespace, string $localName)

No description

from  Element
Attr|null
getAttributeNode(string $qualifiedName)

No description

from  Element
Attr|null
getAttributeNodeNS(string|null $namespace, string $localName)

No description

from  Element
Attr|null
setAttributeNode(Attr $attr)

No description

from  Element
Attr|null
setAttributeNodeNS(Attr $attr)

No description

from  Element
removeAttributeNode(Attr $attr)

No description

from  Element
getElementsByTagName(string $qualifiedName)

No description

from  Element
getElementsByTagNameNS(string|null $namespace, string $localName)

No description

from  Element
Element|null
insertAdjacentElement(AdjacentPosition $where, Element $element)

No description

from  Element
void
insertAdjacentText(AdjacentPosition $where, string $data)

No description

from  Element
void
setIdAttribute(string $qualifiedName, bool $isId)

No description

from  Element
void
setIdAttributeNS(string|null $namespace, string $qualifiedName, bool $isId)

No description

from  Element
void
setIdAttributeNode(Attr $attr, bool $isId)

No description

from  Element
void
remove()

No description

from  Element
void
before(Node|string ...$nodes)

No description

from  Element
void
after(Node|string ...$nodes)

No description

from  Element
void
replaceWith(Node|string ...$nodes)

No description

from  Element
void
append(Node|string ...$nodes)

No description

from  Element
void
prepend(Node|string ...$nodes)

No description

from  Element
void
replaceChildren(Node|string ...$nodes)

No description

from  Element
Element|null
querySelector(string $selectors)

No description

from  Element
querySelectorAll(string $selectors)

No description

from  Element
Element|null
closest(string $selectors)

No description

from  Element
bool
matches(string $selectors)

No description

from  Element
array
getInScopeNamespaces()

No description

from  Element
array
getDescendantNamespaces()

No description

from  Element
void
rename(string|null $namespaceURI, string $qualifiedName)

No description

from  Element

Details

Node getRootNode(array $options = [])

No description

Parameters

array $options

Return Value

Node

bool hasChildNodes()

No description

Return Value

bool

void normalize()

No description

Return Value

void

Node cloneNode(bool $deep = false)

No description

Parameters

bool $deep

Return Value

Node

bool isEqualNode(Node|null $otherNode)

No description

Parameters

Node|null $otherNode

Return Value

bool

bool isSameNode(Node|null $otherNode)

No description

Parameters

Node|null $otherNode

Return Value

bool

int compareDocumentPosition(Node $other)

No description

Parameters

Node $other

Return Value

int

bool contains(Node|null $other)

No description

Parameters

Node|null $other

Return Value

bool

string|null lookupPrefix(string|null $namespace)

No description

Parameters

string|null $namespace

Return Value

string|null

string|null lookupNamespaceURI(string|null $prefix)

No description

Parameters

string|null $prefix

Return Value

string|null

bool isDefaultNamespace(string|null $namespace)

No description

Parameters

string|null $namespace

Return Value

bool

Node insertBefore(Node $node, Node|null $child)

No description

Parameters

Node $node
Node|null $child

Return Value

Node

Node appendChild(Node $node)

No description

Parameters

Node $node

Return Value

Node

Node replaceChild(Node $node, Node $child)

No description

Parameters

Node $node
Node $child

Return Value

Node

Node removeChild(Node $child)

No description

Parameters

Node $child

Return Value

Node

int getLineNo()

No description

Return Value

int

string getNodePath()

No description

Return Value

string

string|false C14N(bool $exclusive = false, bool $withComments = false, array|null $xpath = null, array|null $nsPrefixes = null)

No description

Parameters

bool $exclusive
bool $withComments
array|null $xpath
array|null $nsPrefixes

Return Value

string|false

int|false C14NFile(string $uri, bool $exclusive = false, bool $withComments = false, array|null $xpath = null, array|null $nsPrefixes = null)

No description

Parameters

string $uri
bool $exclusive
bool $withComments
array|null $xpath
array|null $nsPrefixes

Return Value

int|false

array __sleep()

No description

Return Value

array

void __wakeup()

No description

Return Value

void

bool hasAttributes()

No description

Return Value

bool

array getAttributeNames()

No description

Return Value

array

string|null getAttribute(string $qualifiedName)

No description

Parameters

string $qualifiedName

Return Value

string|null

string|null getAttributeNS(string|null $namespace, string $localName)

No description

Parameters

string|null $namespace
string $localName

Return Value

string|null

void setAttribute(string $qualifiedName, string $value)

No description

Parameters

string $qualifiedName
string $value

Return Value

void

void setAttributeNS(string|null $namespace, string $qualifiedName, string $value)

No description

Parameters

string|null $namespace
string $qualifiedName
string $value

Return Value

void

void removeAttribute(string $qualifiedName)

No description

Parameters

string $qualifiedName

Return Value

void

void removeAttributeNS(string|null $namespace, string $localName)

No description

Parameters

string|null $namespace
string $localName

Return Value

void

bool toggleAttribute(string $qualifiedName, bool|null $force = null)

No description

Parameters

string $qualifiedName
bool|null $force

Return Value

bool

bool hasAttribute(string $qualifiedName)

No description

Parameters

string $qualifiedName

Return Value

bool

bool hasAttributeNS(string|null $namespace, string $localName)

No description

Parameters

string|null $namespace
string $localName

Return Value

bool

Attr|null getAttributeNode(string $qualifiedName)

No description

Parameters

string $qualifiedName

Return Value

Attr|null

Attr|null getAttributeNodeNS(string|null $namespace, string $localName)

No description

Parameters

string|null $namespace
string $localName

Return Value

Attr|null

Attr|null setAttributeNode(Attr $attr)

No description

Parameters

Attr $attr

Return Value

Attr|null

Attr|null setAttributeNodeNS(Attr $attr)

No description

Parameters

Attr $attr

Return Value

Attr|null

Attr removeAttributeNode(Attr $attr)

No description

Parameters

Attr $attr

Return Value

Attr

HTMLCollection getElementsByTagName(string $qualifiedName)

No description

Parameters

string $qualifiedName

Return Value

HTMLCollection

HTMLCollection getElementsByTagNameNS(string|null $namespace, string $localName)

No description

Parameters

string|null $namespace
string $localName

Return Value

HTMLCollection

Element|null insertAdjacentElement(AdjacentPosition $where, Element $element)

No description

Parameters

AdjacentPosition $where
Element $element

Return Value

Element|null

void insertAdjacentText(AdjacentPosition $where, string $data)

No description

Parameters

AdjacentPosition $where
string $data

Return Value

void

void setIdAttribute(string $qualifiedName, bool $isId)

No description

Parameters

string $qualifiedName
bool $isId

Return Value

void

void setIdAttributeNS(string|null $namespace, string $qualifiedName, bool $isId)

No description

Parameters

string|null $namespace
string $qualifiedName
bool $isId

Return Value

void

void setIdAttributeNode(Attr $attr, bool $isId)

No description

Parameters

Attr $attr
bool $isId

Return Value

void

void remove()

No description

Return Value

void

void before(Node|string ...$nodes)

No description

Parameters

Node|string ...$nodes

Return Value

void

void after(Node|string ...$nodes)

No description

Parameters

Node|string ...$nodes

Return Value

void

void replaceWith(Node|string ...$nodes)

No description

Parameters

Node|string ...$nodes

Return Value

void

void append(Node|string ...$nodes)

No description

Parameters

Node|string ...$nodes

Return Value

void

void prepend(Node|string ...$nodes)

No description

Parameters

Node|string ...$nodes

Return Value

void

void replaceChildren(Node|string ...$nodes)

No description

Parameters

Node|string ...$nodes

Return Value

void

Element|null querySelector(string $selectors)

No description

Parameters

string $selectors

Return Value

Element|null

NodeList querySelectorAll(string $selectors)

No description

Parameters

string $selectors

Return Value

NodeList

Element|null closest(string $selectors)

No description

Parameters

string $selectors

Return Value

Element|null

bool matches(string $selectors)

No description

Parameters

string $selectors

Return Value

bool

array getInScopeNamespaces()

No description

Return Value

array

array getDescendantNamespaces()

No description

Return Value

array

void rename(string|null $namespaceURI, string $qualifiedName)

No description

Parameters

string|null $namespaceURI
string $qualifiedName

Return Value

void