@mathjax/src
    Preparing search index...

    Interface Node<N, C>

    The generic Node interface

    interface Node<N extends Node<N, C>, C extends NodeClass<N, C>> {
        factory: NodeFactory<N, C>;
        appendChild(child: N): N;
        childIndex(child: N): number;
        copy(): N;
        findNodes(kind: string): N[];
        getAllProperties(): PropertyList;
        getProperty(name: string): Property;
        getPropertyNames(): string[];
        isKind(kind: string): boolean;
        removeChild(child: N): N;
        removeProperty(...names: string[]): void;
        replaceChild(newChild: N, oldChild: N): N;
        setChildren(children: N[]): void;
        setProperty(name: string, value: Property): void;
        walkTree(func: (node: N, data?: any) => void, data?: any): void;
    }

    Type Parameters

    • N extends Node<N, C>

      The actual type of node being created (so parent, children, and factory know what they are). This avoids the need for casting node types later.

    • C extends NodeClass<N, C>

      The node class for N (the constructor rather than instance of the class)

    Hierarchy (View Summary)

    Implemented by

    Index

    Properties

    factory: NodeFactory<N, C>

    The NodeFactory to use to create additional nodes, as needed

    Methods

    • Parameters

      • child: N

        A node to add to this node's children

      Returns N

      The child node that was added

    • Parameters

      • child: N

        A child node whose index in childNodes is desired

      Returns number

      The index of the child in childNodes, or null if not found

    • Parameters

      • kind: string

        The kind of nodes to be located in the tree

      Returns N[]

      An array of nodes that are children (at any depth) of the given kind

    • Returns PropertyList

      The propery list containing all the properties of the node

    • Returns string[]

      An array of the names of every property currently defined

    • Parameters

      • kind: string

        The type of node to test for

      Returns boolean

      True when the node is of the given type

    • Parameters

      • child: N

        Child node to be removed

      Returns N

      The old child node that was removed

    • Parameters

      • ...names: string[]

        The names of the properties to be removed

      Returns void

    • Parameters

      • newChild: N

        A child node to be inserted

      • oldChild: N

        A child node to be replaced

      Returns N

      The old child node that was removed

    • Parameters

      • children: N[]

        The child nodes to add to this node

      Returns void

    • Parameters

      • name: string

        The name of the property to set

      • value: Property

        The value to which the property will be set

      Returns void

    • Parameters

      • func: (node: N, data?: any) => void

        A function to apply to each node in the tree rooted at this node

      • Optionaldata: any

        Data to pass to the function (as state information)

      Returns void