|
| __construct (Document $doc, string $lname, ?string $prefix=null) |
| Create a new HTMLTemplateElement.
|
|
DocumentFragment | getContent () |
|
| _htmlSerialize (array &$result, array $options) |
| Convert the children of a node to an HTML string.This is effectively 'innerHTML' for nodes in HTML documents. This is overridden in specific children, in particular HTMLTemplateElement.- See also
- https://html.spec.whatwg.org/#html-fragment-serialisation-algorithm
- Parameters
-
string[] | &$result | The result is accumulated here |
array | $options | Format options passed to WhatWG::htmlSerialize |
|
|
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.- See also
- https://dom.spec.whatwg.org/#dom-node-nodetype
- Returns
- int
|
|
string | getNodeName () |
| Return the nodeName for this node.- See also
- https://dom.spec.whatwg.org/#dom-node-nodename
- Returns
- string
|
|
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 .- See also
- https://w3c.github.io/DOM-Parsing/#dfn-xml-serialization
- Parameters
-
?string | $namespace | |
NamespacePrefixMap | $prefixMap | |
int | &$prefixIndex | |
array | $options | |
string[] | &$markup | accumulator for the result |
|
|
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) |
|
| __construct (Document $nodeDocument) |
|
bool | hasChildNodes () |
| Return true iff there are children of this node.
|
|
int | _length () |
| - See also
- https://dom.spec.whatwg.org/#concept-node-length
- Returns
- int The length of this node.
|
|
bool | _empty () |
| - See also
- https://dom.spec.whatwg.org/#concept-node-empty
- Returns
- bool Whether this node is considered 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!).
|
|
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.
|
|
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.
|
|
void | addEventListener (string $type, $callback, $options=null) |
|
void | removeEventListener (string $type, $callback, $options=null) |
|
bool | dispatchEvent ( $event) |
|
string | getBaseURI () |
|
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) |
|
void | before (... $nodes) |
|
void | after (... $nodes) |
|
void | replaceWith (... $nodes) |
|
void | remove () |
|
| setInnerHTML (?string $val) |
|
Element null | getPreviousElementSibling () |
|
Element null | getNextElementSibling () |
|
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) |
|
HTMLSlotElement null | getAssignedSlot () |
|
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 () |
|
CSSStyleDeclaration | getStyle () |
|
| setStyle (string $val) |
|
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) |
|
DOMStringMap | getDataset () |
|
string | getNonce () |
|
| setNonce (string $val) |
|
int | getTabIndex () |
|
| setTabIndex (int $val) |
|
void | blur () |
|