@mathjax/src
    Preparing search index...

    Interface SafeMathDocument<N, T, D>

    The properties needed in the MathDocument for sanitizing the internal MathML

    interface SafeMathDocument<N, T, D> {
        _actionPromises: Promise<void>[];
        _readyPromise: Promise<any>;
        adaptor: DOMAdaptor<N, T, D>;
        document: D;
        inputJax: InputJax<N, T, D>[];
        math: MathList<N, T, D>;
        mmlFactory: MmlFactory;
        options: DOCUMENT_OPTIONS<DOM<N, T, D>>;
        outputJax: OutputJax<N, T, D>;
        processed: BitField;
        renderActions: RenderList<N, T, D>;
        safe: Safe<N, T, D>;
        get kind(): string;
        actionPromises(): Promise<void[]>;
        addRenderAction(id: string, ...action: any[]): void;
        clear(): this;
        clearMathItemsWithin(containers: ContainerList<N>): MathItem<N, T, D>[];
        clearPromises(): void;
        compile(): Promise<void> | SafeMathDocument<N, T, D>;
        compileAction(
            action?: boolean,
            item?: MathListItem<N, T, D>,
            recompile?: MathItem<N, T, D>[],
        ): Promise<void> | SafeMathDocument<N, T, D>;
        compileError(math: MathItem<N, T, D>, err: Error): void;
        compileMath(math: MathItem<N, T, D>): void;
        concat(list: MathList<N, T, D>): this;
        convert(math: string, options?: OptionList): MmlNode | N;
        convertPromise(math: string, options?: OptionList): Promise<MmlNode | N>;
        done(): Promise<void>;
        findMath(_options?: OptionList): this;
        getMathItemsWithin(elements: ContainerList<N>): MathItem<N, T, D>[];
        getMetrics(): this;
        recompileAction(
            action: boolean,
            recompile: MathItem<N, T, D>[],
            i?: number,
        ): void | Promise<void>;
        removeFromDocument(_restore?: boolean): this;
        removeRenderAction(id: string): void;
        render(): SafeMathDocument<N, T, D>;
        renderPromise(): Promise<SafeMathDocument<N, T, D>>;
        rerender(start?: number): this;
        rerenderPromise(start?: number): Promise<SafeMathDocument<N, T, D>>;
        reset(options?: ResetList): this;
        savePromise(promise: Promise<any>): void;
        state(state: number, restore?: boolean): this;
        typeset(): Promise<void> | SafeMathDocument<N, T, D>;
        typesetAction(
            action?: boolean,
            item?: MathListItem<N, T, D>,
        ): Promise<void> | SafeMathDocument<N, T, D>;
        typesetError(math: MathItem<N, T, D>, err: Error): void;
        updateDocument(): this;
        whenReady(action: () => any): Promise<any>;
    }

    Type Parameters

    • N
    • T
    • D

    Hierarchy (View Summary)

    Index
    _actionPromises: Promise<void>[]

    The render action promise list

    _readyPromise: Promise<any>

    Promise for the current typeset or conversion action (used to chain the promise-based calls so they don't overlap).

    adaptor: DOMAdaptor<N, T, D>

    The DOM adaptor for the document

    document: D

    The document managed by this MathDocument

    inputJax: InputJax<N, T, D>[]

    The list of input jax for the document

    math: MathList<N, T, D>

    The list of MathItems for this document

    mmlFactory: MmlFactory

    The MathML node factory for the internal MathML representation

    options: DOCUMENT_OPTIONS<DOM<N, T, D>>

    The actual options for this document (with user-supplied ones merged in)

    outputJax: OutputJax<N, T, D>

    The output jax for the document

    processed: BitField

    The bit-field used to tell what steps have been taken on the document (for retries)

    renderActions: RenderList<N, T, D>

    The list of render actions

    safe: Safe<N, T, D>

    The Safe object for this document

    • If any were added to the recompile list, compile them again

      Parameters

      • action: boolean

        True when called as a renderAction

      • recompile: MathItem<N, T, D>[]

        Array of MathItems to be rerendered (e.g., with forward references)

      • i: number = 0

        The entry in the recompile list to start at

      Returns void | Promise<void>

      A promise for restarting, otherwise void