ConFoo 2025

The Dom\HTMLElement class

(PHP 8 >= 8.4.0)

Introduction

Represents an element in the HTML namespace.

Class synopsis

class Dom\HTMLElement extends Dom\Element {
/* Inherited constants */
/* Inherited properties */
public readonly ?string $namespaceURI;
public readonly ?string $prefix;
public readonly string $localName;
public readonly string $tagName;
public string $id;
public readonly Dom\TokenList $classList;
public readonly Dom\NamedNodeMap $attributes;
public readonly ?Dom\Element $lastElementChild;
public readonly int $childElementCount;
public readonly int $nodeType;
public readonly string $nodeName;
public readonly string $baseURI;
public readonly bool $isConnected;
public readonly ?Dom\Document $ownerDocument;
public readonly ?Dom\Node $parentNode;
public readonly ?Dom\Element $parentElement;
public readonly Dom\NodeList $childNodes;
public readonly ?Dom\Node $firstChild;
public readonly ?Dom\Node $lastChild;
public readonly ?Dom\Node $previousSibling;
public readonly ?Dom\Node $nextSibling;
/* Inherited methods */
/* Not documented yet */
}

Notes

Note: The DOM extension uses UTF-8 encoding when working with methods or properties. The parser methods auto-detect the encoding or allow the caller to specify an encoding.

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top