Dodo
DOm DOcument implementation
|
Additional Inherited Members | ||||||||||||||||
Public Member Functions inherited from Wikimedia\Dodo\HTMLElement | ||||||||||||||||
void | __construct (Document $doc, string $lname, ?string $prefix=null) | |||||||||||||||
HTML Element constructor. | ||||||||||||||||
Public Member Functions inherited from Wikimedia\Dodo\Element | ||||||||||||||||
static callable(Element,?string,?string)(string $localName) void | __construct (Document $nodeDocument, string $lname, ?string $ns, ?string $prefix=null) | |||||||||||||||
Fetch the appropriate attribute change handler for a change to the attribute named $localName . | ||||||||||||||||
int | getNodeType () | |||||||||||||||
Return the node type enumeration for this node.
| ||||||||||||||||
string | getNodeName () | |||||||||||||||
Return the nodeName for this node.
| ||||||||||||||||
NamedNodeMap | getAttributes () | |||||||||||||||
string | getPrefix () | |||||||||||||||
string | getLocalName () | |||||||||||||||
string | getNamespaceURI () | |||||||||||||||
string | getTagName () | |||||||||||||||
string | getInnerHTML () | |||||||||||||||
string | getOuterHTML () | |||||||||||||||
setIdAttribute (string $qualifiedName, bool $isId) | ||||||||||||||||
_xmlSerialize (?string $namespace, NamespacePrefixMap $prefixMap, int &$prefixIndex, array $options, array &$markup) | ||||||||||||||||
XML serialize the given node.This is overridden in subclasses. Note that this is effectively "outerHTML", due to a spec inconsistency: https://github.com/w3c/DOM-Parsing/issues/28 .
| ||||||||||||||||
string | getAttribute (string $qname) | |||||||||||||||
Fetch the value of an attribute with the given qualified name. | ||||||||||||||||
setAttribute (string $qname, string $value) | ||||||||||||||||
Set the value of first attribute with a particular qualifiedName. | ||||||||||||||||
_setAttribute (string $qname, string $value) | ||||||||||||||||
Internal version of ::setAttribute() which bypasses checks and lowercasing; used by Remex when tree building. | ||||||||||||||||
removeAttribute (string $qname) | ||||||||||||||||
Remove the first attribute given a particular qualifiedName. | ||||||||||||||||
bool | hasAttribute (string $qname) | |||||||||||||||
Test Element for attribute with the given qualified name. | ||||||||||||||||
bool | toggleAttribute (string $qname, ?bool $force=null) | |||||||||||||||
Toggle the first attribute with the given qualified name. | ||||||||||||||||
string | getAttributeNS (?string $ns, string $lname) | |||||||||||||||
Fetch value of attribute with the given namespace and localName. | ||||||||||||||||
setAttributeNS (?string $ns, string $qname, string $value) | ||||||||||||||||
Set value of attribute with a particular namespace and localName. | ||||||||||||||||
_setAttributeNS (?string $ns, ?string $prefix, string $lname, string $value) | ||||||||||||||||
Internal version of ::setAttributeNS which bypasses checks and prefix parsing; used by Remex when tree building. | ||||||||||||||||
removeAttributeNS (?string $ns, string $lname) | ||||||||||||||||
Remove attribute given a particular namespace and localName. | ||||||||||||||||
bool | hasAttributeNS (?string $ns, string $lname) | |||||||||||||||
Test Element for attribute with the given namespace and localName. | ||||||||||||||||
Attr | getAttributeNode (string $qname) | |||||||||||||||
Fetch the Attr node with the given qualifiedName. | ||||||||||||||||
Attr | setAttributeNode ( $attr) | |||||||||||||||
Add an Attr node to an Element node. | ||||||||||||||||
Attr | removeAttributeNode ( $attr) | |||||||||||||||
Remove the given attribute node from this Element. | ||||||||||||||||
Attr | getAttributeNodeNS (?string $ns, string $lname) | |||||||||||||||
Fetch the Attr node with the given namespace and localName. | ||||||||||||||||
Attr | setAttributeNodeNS ( $attr) | |||||||||||||||
Add a namespace-aware Attr node to an Element node. | ||||||||||||||||
bool | hasAttributes () | |||||||||||||||
Test whether this Element has any attributes. | ||||||||||||||||
array | getAttributeNames () | |||||||||||||||
Fetch the qualified names of all attributes on this Element. | ||||||||||||||||
mixed null | getClassList () | |||||||||||||||
bool | matches (string $selectors) | |||||||||||||||
bool | webkitMatchesSelector (string $selectors) | |||||||||||||||
Element | closest (string $selectors) | |||||||||||||||
bool | _isHTMLElement () | |||||||||||||||
Calls isHTMLDocument() on ownerDocument. | ||||||||||||||||
Element | _nextElement (?Element $root) | |||||||||||||||
Return the next element, in source order, after this one or null if there are no more. | ||||||||||||||||
HTMLCollection | getElementsByTagName (string $lname) | |||||||||||||||
HTMLCollection | getElementsByClassName (string $names) | |||||||||||||||
array< Element > | _getElementsById (string $id) | |||||||||||||||
This is a non-standard Dodo extension that interfaces with the Zest CSS selector library to allow quick lookup by ID even if there are multiple nodes in the document with the same ID. | ||||||||||||||||
static callable(Element)(string $lname) static callable(Element)(string $lname) HTMLCollection | getElementsByTagNameNS (?string $ns, string $lname) | |||||||||||||||
Public Member Functions inherited from Wikimedia\Dodo\ContainerNode | ||||||||||||||||
__construct (Document $nodeDocument) | ||||||||||||||||
bool | hasChildNodes () | |||||||||||||||
Return true iff there are children of this node. | ||||||||||||||||
int | _length () | |||||||||||||||
| ||||||||||||||||
bool | _empty () | |||||||||||||||
| ||||||||||||||||
NodeList | getChildNodes () | |||||||||||||||
Keeping child nodes as an array makes insertion/removal of nodes quite expensive. | ||||||||||||||||
Node | getFirstChild () | |||||||||||||||
Be careful to use this method in most cases rather than directly accessing _firstChildOrChildren . | ||||||||||||||||
Node | getLastChild () | |||||||||||||||
This should be overridden in ContainerNode and Leaf. | ||||||||||||||||
string | getTextContent () | |||||||||||||||
Generic implementation of ::getTextContent to be used by Element and DocumentFragment (but not Document!). | ||||||||||||||||
setTextContent (?string $value) | ||||||||||||||||
Generic implementation of ::setTextContent to be used by Element and DocumentFragment (but not Document!). | ||||||||||||||||
Public Member Functions inherited from Wikimedia\Dodo\Node | ||||||||||||||||
string | getNodeValue () | |||||||||||||||
Return the value for this node. | ||||||||||||||||
setNodeValue (?string $val) | ||||||||||||||||
Document | getOwnerDocument () | |||||||||||||||
The ownerDocument getter steps are to return null, if this is a document; otherwise this’s node document. | ||||||||||||||||
Node | getParentNode () | |||||||||||||||
Nodes might not have a parentNode. | ||||||||||||||||
Element | getParentElement () | |||||||||||||||
This value is the same as parentNode, except it puts an extra condition, that the parentNode must be an Element. | ||||||||||||||||
Wikimedia IDLeDOM Node | getRootNode ($options=null) | |||||||||||||||
Return this' shadow-including root if options['composed'] is true; otherwise return this' root. | ||||||||||||||||
Node | getPreviousSibling () | |||||||||||||||
Node | getNextSibling () | |||||||||||||||
_roothook () | ||||||||||||||||
<script> elements need to know when they're inserted into the document. | ||||||||||||||||
Node | insertBefore ($node, $refNode=null) | |||||||||||||||
Insert $node as a child of $this, and insert it before $refChild in the document order. | ||||||||||||||||
appendChild ( $node) | ||||||||||||||||
Node | _unsafeAppendChild (Node $node) | |||||||||||||||
Does not check for insertion validity. | ||||||||||||||||
Node | replaceChild ( $new, $old) | |||||||||||||||
Node | removeChild ( $node) | |||||||||||||||
normalize () | ||||||||||||||||
Puts $this and the entire subtree rooted at $this into "normalized" form. | ||||||||||||||||
int | compareDocumentPosition ( $that) | |||||||||||||||
bool | contains ( $node) | |||||||||||||||
bool | isSameNode ( $node) | |||||||||||||||
bool | isEqualNode ( $node) | |||||||||||||||
Determine whether this node and $other are equal. | ||||||||||||||||
Node | cloneNode (bool $deep=false) | |||||||||||||||
Clone this Node. | ||||||||||||||||
string | lookupPrefix (?string $ns) | |||||||||||||||
Return DOMString containing prefix for given namespace URI. | ||||||||||||||||
string | lookupNamespaceURI (?string $prefix) | |||||||||||||||
Return DOMString containing namespace URI for a given prefix. | ||||||||||||||||
bool | isDefaultNamespace (?string $ns) | |||||||||||||||
Determine whether this is the default namespace. | ||||||||||||||||
string | getNodePath () | |||||||||||||||
Get an XPath for a node. | ||||||||||||||||
_resetNodeDocument (Document $doc) | ||||||||||||||||
Set the ownerDocument reference on a subtree rooted at $this. | ||||||||||||||||
bool | getIsConnected () | |||||||||||||||
Determine whether this Node is rooted (belongs to the tree rooted at the node document). | ||||||||||||||||
int | _getSiblingIndex () | |||||||||||||||
The index of this Node in its parent's childNodes list. | ||||||||||||||||
int | _lastModTime () | |||||||||||||||
Return the lastModTime value for this node. | ||||||||||||||||
_modify () | ||||||||||||||||
Increment the owner document's modclock [and use the new value to update the lastModTime value for this node and all of its ancestors. | ||||||||||||||||
_htmlSerialize (array &$result, array $options) | ||||||||||||||||
Convert the children of a node to an HTML string. | ||||||||||||||||
mixed | getExtensionData (string $key, $defaultValue=null) | |||||||||||||||
Get "extension data" associate with this node, using the given $key. | ||||||||||||||||
setExtensionData (string $key, $value) | ||||||||||||||||
Set "extension data" associate with this node, using the given $key. | ||||||||||||||||
Public Member Functions inherited from Wikimedia::IDLeDOM::EventTarget | ||||||||||||||||
void | addEventListener (string $type, $callback, $options=null) | |||||||||||||||
void | removeEventListener (string $type, $callback, $options=null) | |||||||||||||||
bool | dispatchEvent ( $event) | |||||||||||||||
Public Member Functions inherited from Wikimedia::IDLeDOM::Node | ||||||||||||||||
string | getBaseURI () | |||||||||||||||
Public Member Functions inherited from Wikimedia::IDLeDOM::Element | ||||||||||||||||
string | getId () | |||||||||||||||
setId (string $val) | ||||||||||||||||
string | getClassName () | |||||||||||||||
setClassName (string $val) | ||||||||||||||||
setClassList (string $val) | ||||||||||||||||
string | getSlot () | |||||||||||||||
setSlot (string $val) | ||||||||||||||||
ShadowRoot | attachShadow ( $init) | |||||||||||||||
ShadowRoot null | getShadowRoot () | |||||||||||||||
Wikimedia IDLeDOM Element null | insertAdjacentElement (string $where, $element) | |||||||||||||||
void | insertAdjacentText (string $where, string $data) | |||||||||||||||
setOuterHTML (?string $val) | ||||||||||||||||
void | insertAdjacentHTML (string $position, string $text) | |||||||||||||||
void | setIdAttributeNode ( $attr, bool $isId) | |||||||||||||||
void | setIdAttributeNS (string $namespace, string $qualifiedName, bool $isId) | |||||||||||||||
Public Member Functions inherited from Wikimedia::IDLeDOM::ChildNode | ||||||||||||||||
void | before (... $nodes) | |||||||||||||||
void | after (... $nodes) | |||||||||||||||
void | replaceWith (... $nodes) | |||||||||||||||
void | remove () | |||||||||||||||
Public Member Functions inherited from Wikimedia::IDLeDOM::InnerHTML | ||||||||||||||||
setInnerHTML (?string $val) | ||||||||||||||||
Public Member Functions inherited from Wikimedia::IDLeDOM::NonDocumentTypeChildNode | ||||||||||||||||
Element null | getPreviousElementSibling () | |||||||||||||||
Element null | getNextElementSibling () | |||||||||||||||
Public Member Functions inherited from Wikimedia::IDLeDOM::ParentNode | ||||||||||||||||
HTMLCollection | getChildren () | |||||||||||||||
Element null | getFirstElementChild () | |||||||||||||||
Element null | getLastElementChild () | |||||||||||||||
int | getChildElementCount () | |||||||||||||||
void | prepend (... $nodes) | |||||||||||||||
void | append (... $nodes) | |||||||||||||||
void | replaceChildren (... $nodes) | |||||||||||||||
Element null | querySelector (string $selectors) | |||||||||||||||
NodeList | querySelectorAll (string $selectors) | |||||||||||||||
Public Member Functions inherited from Wikimedia::IDLeDOM::Slottable | ||||||||||||||||
HTMLSlotElement null | getAssignedSlot () | |||||||||||||||
Public Member Functions inherited from Wikimedia::IDLeDOM::HTMLElement | ||||||||||||||||
string | getTitle () | |||||||||||||||
setTitle (string $val) | ||||||||||||||||
string | getLang () | |||||||||||||||
setLang (string $val) | ||||||||||||||||
bool | getTranslate () | |||||||||||||||
setTranslate (bool $val) | ||||||||||||||||
string | getDir () | |||||||||||||||
setDir (string $val) | ||||||||||||||||
bool | getHidden () | |||||||||||||||
setHidden (bool $val) | ||||||||||||||||
void | click () | |||||||||||||||
string | getAccessKey () | |||||||||||||||
setAccessKey (string $val) | ||||||||||||||||
string | getAccessKeyLabel () | |||||||||||||||
bool | getDraggable () | |||||||||||||||
setDraggable (bool $val) | ||||||||||||||||
bool | getSpellcheck () | |||||||||||||||
setSpellcheck (bool $val) | ||||||||||||||||
string | getAutocapitalize () | |||||||||||||||
setAutocapitalize (string $val) | ||||||||||||||||
string | getInnerText () | |||||||||||||||
setInnerText (?string $val) | ||||||||||||||||
Element null | getOffsetParent () | |||||||||||||||
int | getOffsetTop () | |||||||||||||||
int | getOffsetLeft () | |||||||||||||||
int | getOffsetWidth () | |||||||||||||||
int | getOffsetHeight () | |||||||||||||||
Public Member Functions inherited from Wikimedia::IDLeDOM::ElementCSSInlineStyle | ||||||||||||||||
CSSStyleDeclaration | getStyle () | |||||||||||||||
setStyle (string $val) | ||||||||||||||||
Public Member Functions inherited from Wikimedia::IDLeDOM::ElementContentEditable | ||||||||||||||||
string | getContentEditable () | |||||||||||||||
setContentEditable (string $val) | ||||||||||||||||
string | getEnterKeyHint () | |||||||||||||||
setEnterKeyHint (string $val) | ||||||||||||||||
bool | getIsContentEditable () | |||||||||||||||
string | getInputMode () | |||||||||||||||
setInputMode (string $val) | ||||||||||||||||
Public Member Functions inherited from Wikimedia::IDLeDOM::GlobalEventHandlers | ||||||||||||||||
EventHandlerNonNull callable null | getOnload () | |||||||||||||||
setOnload ( $val) | ||||||||||||||||
Public Member Functions inherited from Wikimedia::IDLeDOM::HTMLOrSVGElement | ||||||||||||||||
DOMStringMap | getDataset () | |||||||||||||||
string | getNonce () | |||||||||||||||
setNonce (string $val) | ||||||||||||||||
int | getTabIndex () | |||||||||||||||
setTabIndex (int $val) | ||||||||||||||||
void | blur () | |||||||||||||||
Public Member Functions inherited from Wikimedia::IDLeDOM::HTMLMapElement | ||||||||||||||||
string | getName () | |||||||||||||||
setName (string $val) | ||||||||||||||||
HTMLCollection | getAreas () | |||||||||||||||
Static Public Member Functions inherited from Wikimedia\Dodo\HTMLElement | ||||||||||||||||
static HTMLElement | _createElement (Document $doc, string $lname, ?string $prefix=null) | |||||||||||||||
Create the appropriate "element interface" for an HTML element. | ||||||||||||||||
Public Attributes inherited from Wikimedia\Dodo\Element | ||||||||||||||||
NamedNodeMap | $_attributes = null | |||||||||||||||
Attribute storage; null if no attributes. | ||||||||||||||||
Public Attributes inherited from Wikimedia\Dodo\ContainerNode | ||||||||||||||||
Node NodeList null | $_firstChildOrChildren | |||||||||||||||
The first child (if we're using the linked list representation), or a NodeList (if we're using the array of children), or null (if there are no children). | ||||||||||||||||
Public Attributes inherited from Wikimedia\Dodo\Node | ||||||||||||||||
Document | $_nodeDocument | |||||||||||||||
The document this node is associated to. | ||||||||||||||||
Node null | $_parentNode | |||||||||||||||
should be considered read-only | ||||||||||||||||
Node | $_nextSibling | |||||||||||||||
The sibling list is stored as a circular linked list: the node "before" the first sibling is the last sibling, and the node "after" the last sibling is the first sibling. | ||||||||||||||||
Node | $_previousSibling | |||||||||||||||
int | $_documentIndex = null | |||||||||||||||
DEVELOPERS NOTE: An index is assigned when a node is added to a Document (becomes rooted). | ||||||||||||||||
int | $_cachedSiblingIndex = null | |||||||||||||||
DEVELOPERS NOTE: An index is assigned on INSERTION. | ||||||||||||||||
Static Public Attributes inherited from Wikimedia\Dodo\Element | ||||||||||||||||
static array< string, callable > null | $_attributeChangeHandlers = null | |||||||||||||||
A registry of handlers for changes to specific attributes. | ||||||||||||||||
Protected Member Functions inherited from Wikimedia\Dodo\Element | ||||||||||||||||
_setMissingProp (string $prop, $value) | ||||||||||||||||
Implement _setMissingProp to allow $_classList to be a dynamic property. | ||||||||||||||||
Element | _subclassCloneNodeShallow () | |||||||||||||||
bool | _subclassIsEqualNode (Node $node) | |||||||||||||||
Delegated subclass method called by Node::isEqualNode()
| ||||||||||||||||
Protected Member Functions inherited from Wikimedia\Dodo\Node | ||||||||||||||||
_getMissingProp (string $name) | ||||||||||||||||