
eventPhase attribute’s value switches from CAPTURING_PHASE to BUBBLING_PHASE. The first time currentTarget attribute’s value will be the document, the second time the body element. Each time the event’s target attribute value will be the span element. The debug function will be invoked twice. getElementById ( "x" ).dispatchEvent (ev ) addEventListener ( "load", imgFetched ) function imgFetched (ev ) )ĭocument. These objects implement the EventTarget interface and can therefore add event listeners to observe events by calling addEventListener(): obj. Occurrence, such as network activity or user interaction. Throughout the web platform events are dispatched to objects to signal an Return namespace, prefix, and localName.Ģ.If namespace is the XMLNS namespace and neither qualifiedName nor prefix is " xmlns", then throw a " NamespaceError" DOMException." xmlns" and namespace is not the XMLNS namespace, then throw a If prefix is " xml" and namespace is not the XML namespace, then throw a " NamespaceError" DOMException.If prefix is non-null and namespace is null, then throw a.String on it and set prefix to the part before and localName to If qualifiedName contains a " :" (U+003E), then split the.If namespace is the empty string, set it to null.To validate and extract a namespace and qualifiedName, " InvalidCharacterError" DOMException if qualifiedName does not match Support for namespaces within selectors is not planned and will not be Return the result of match a selector against a tree with s and node’s root using scoping root node. If s is failure, then throw a " Synta圎rror" DOMException. Let s be the result of parse a selector selectors. To scope-match a selectors string selectors against a node, run these steps: The ordered set serializer takes a set and returns the concatenation of set using U+0020 SPACE. įor each token in inputTokens, append token to tokens.Let inputTokens be the result of splitting input on ASCII whitespace. The ordered set parser takes a string input and then runs these steps: The index of an object is its number of preceding siblings, or 0 if it has none. Object is its first following sibling or null if it has no following sibling. Object is its first preceding sibling or null if it has no preceding sibling. The last child of an object is its last child or null if it has no children. The first child of an object is its first child or null if it has no children. The root of a tree is any object participating in that tree whose parent is null.Īn object A is called a descendant of an object B, if either A is a child of B or A is a child of anĪn object A is called an ancestor of an object B if and only if B is a descendant of A.Īn object A is called a sibling of an object B, if and only if B and A share the same non-null parent.Īn object A is preceding an object B if A and B are in theĪn object A is following an object B if A and B are in the The root of an object is itself, if its parent is null, or else it is the root of its parent. An object A whose parent is object B is a child of B. Null or an object, and has children, which is an ordered set of objects. In tree order is preorder, depth-first traversal of a tree.Īn object that participates in a tree has a parent, which is either TreesĪ tree is a finite hierarchical tree structure. When extensions are needed, the DOM Standard can be updated accordingly, or a new standardĬan be written that hooks into the provided extensibility hooks for applicable specifications. Some of the terms used in this specification are defined in Encoding, Selectors, Web IDL, XML, and Namespaces in XML. This specification depends on the Infra Standard. 4.2.10 Old-style collections: NodeList and HTMLCollection.3.3 Using AbortController and AbortSignal objects in.2.3 Legacy extensions to the Window interface.DOM defines a platform-neutral model for events, aborting activities, and node trees.
