pseudo-dom
    Preparing search index...

    Interface PseudoDocument

    Simulate the behaviour of the Node Class when there is no DOM available.

    interface PseudoDocument {
        get baseURI(): string | Location;
        get childNodes(): PseudoNodeList | LinkedTreeList;
        get firstChild(): PseudoNode;
        get isConnected(): boolean;
        get lastChild(): PseudoNode;
        get nextSibling(): PseudoNode;
        get nodeName(): string;
        get nodeType(): number;
        get nodeValue(): string;
        set nodeValue(value: string): void;
        get ownerDocument(): PseudoDocument;
        get parentElement(): PseudoElement;
        get parentNode(): PseudoNode;
        get previousSibling(): PseudoNode;
        get textContent(): string;
        set textContent(text: string): void;
        addEventListener(
            type: string,
            callback: any,
            useCapture: boolean | listenerOptions,
        ): void;
        appendChild(childNode: PseudoNode): PseudoNode;
        cloneNode(deep: boolean): PseudoNode;
        compareDocumentPosition(otherNode: PseudoNode): number;
        contains(otherNode: PseudoNode): boolean;
        createComment(data: string): PseudoNode;
        createDocumentFragment(): PseudoDocumentFragment;
        createElement(tagName: string): PseudoElement;
        createTextNode(data: string): PseudoNode;
        dispatchEvent(event: PseudoEvent): boolean;
        getElementById(id: string): PseudoElement;
        getRootNode(options: { composed: boolean }): PseudoNode;
        hasChildNodes(): boolean;
        insertBefore(
            newNode: PseudoNode,
            referenceNode: PseudoNode,
        ): PseudoNode | PseudoDocumentFragment;
        isDefaultNamespace(namespaceURI: string): boolean;
        isEqualNode(otherNode: PseudoNode): boolean;
        isSameNode(otherNode: PseudoNode): boolean;
        lookupNamespaceURI(prefix: string): string;
        lookupPrefix(namespace: string): string;
        normalize(): void;
        removeChild(child: PseudoNode): PseudoNode;
        removeEventListener(
            type: string,
            callback: Function,
            options?: boolean | listenerOptions,
        ): void;
        replaceChild(newChild: PseudoNode, oldChild: PseudoNode): PseudoNode;
    }

    Hierarchy (View Summary)

    Implemented by

    Index
    • get baseURI(): string | Location

      Returns a string representing the base URL of the document containing the Node.

      Returns string | Location

    • get childNodes(): PseudoNodeList | LinkedTreeList

      Returns a live NodeList containing all the children of this node (including elements, text and comments). NodeList being live means that if the children of the Node change, the NodeList object is automatically updated.

      Returns PseudoNodeList | LinkedTreeList

    • get isConnected(): boolean

      A boolean indicating whether or not the Node is connected (directly or indirectly) to the context object, e.g. the Document object in the case of the normal DOM, or the ShadowRoot in the case of a shadow DOM.

      Returns boolean

    • get nodeName(): string

      Returns a string containing the name of the Node. The structure of the name will differ with the node type. E.g. An HTMLElement will contain the name of the corresponding tag, like 'audio' for an HTMLAudioElement, a Text node will have the '#text' string, or a Document node will have the '#document' string.

      Returns string

    • get nodeType(): number

      Returns an unsigned short representing the type of the node. Possible values are:


      | Name | Value | |---------------------------------------- | ELEMENT_NODE | 1 | | ATTRIBUTE_NODE | 2 | | TEXT_NODE | 3 | | CDATA_SECTION_NODE | 4 | | PROCESSING_INSTRUCTION_NODE | 7 | | COMMENT_NODE | 8 | | DOCUMENT_NODE | 9 | | DOCUMENT_TYPE_NODE | 10 | | DOCUMENT_FRAGMENT_NODE | 11 |

      Returns number

    • get nodeValue(): string

      Returns the value of the current node.

      Returns string

    • set nodeValue(value: string): void

      Sets the value of the current node.

      Parameters

      • value: string

      Returns void

    • get parentNode(): PseudoNode

      Returns a Node that is the parent of this node. If there is no such node, like if this node is the top of the tree or if doesn't participate in a tree, this property returns null.

      Returns PseudoNode

    • get textContent(): string

      Returns the textual content of an element and all its descendants.

      Returns string

    • set textContent(text: string): void

      Sets the textual content of an element and all its descendants.

      Parameters

      • text: string

      Returns void

    • Accepts a namespace URI as an argument and returns a boolean value with a value of true if the namespace is the default namespace on the given node or false if not.

      Parameters

      • namespaceURI: string

      Returns boolean

    • Accepts a prefix and returns the namespace URI associated with it on the given node if found (and null if not). Supplying null for the prefix will return the default namespace.

      Parameters

      • prefix: string

      Returns string

    • Returns a string containing the prefix for a given namespace URI, if present, and null if not. When multiple prefixes are possible, the result is implementation-dependent.

      Parameters

      • namespace: string

      Returns string