@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> {
        adaptor: DOMAdaptor<N, T, D>;
        document: D;
        inputJax: InputJax<N, T, D>[];
        kind: string;
        math: MathList<N, T, D>;
        mmlFactory: MmlFactory;
        options: OptionList;
        outputJax: OutputJax<N, T, D>;
        processed: BitField;
        renderActions: RenderList<N, T, D>;
        safe: Safe<N, T, D>;
        actionPromises(): Promise<any[]>;
        addRenderAction(id: string, ...action: any[]): void;
        clear(): MathDocument<N, T, D>;
        clearMathItemsWithin(containers: ContainerList<N>): MathItem<N, T, D>[];
        clearPromises(): void;
        compile(): MathDocument<N, T, D>;
        concat(list: MathList<N, T, D>): MathDocument<N, T, D>;
        convert(math: string, options?: OptionList): MmlNode | N;
        convertPromise(math: string, options?: OptionList): Promise<MmlNode | N>;
        done(): Promise<void>;
        findMath(options?: OptionList): MathDocument<N, T, D>;
        getMathItemsWithin(elements: ContainerList<N>): MathItem<N, T, D>[];
        getMetrics(): MathDocument<N, T, D>;
        removeFromDocument(restore?: boolean): MathDocument<N, T, D>;
        removeRenderAction(id: string): void;
        render(): MathDocument<N, T, D>;
        renderPromise(): Promise<MathDocument<N, T, D>>;
        rerender(start?: number): MathDocument<N, T, D>;
        rerenderPromise(start?: number): Promise<MathDocument<N, T, D>>;
        reset(options?: ResetList): MathDocument<N, T, D>;
        savePromise(promise: Promise<any>): void;
        state(state: number, restore?: boolean): MathDocument<N, T, D>;
        typeset(): MathDocument<N, T, D>;
        updateDocument(): MathDocument<N, T, D>;
        whenReady(action: () => any): Promise<any>;
    }

    Type Parameters

    • N
    • T
    • D

    Hierarchy (View Summary)

    Index

    Properties

    adaptor: DOMAdaptor<N, T, D>

    The DOM adaptor to use for input and output

    document: D

    The document being processed (e.g., DOM document, or Markdown string)

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

    An array of input jax to run on the document

    kind: string

    The kind of MathDocument (e.g., "HTML")

    math: MathList<N, T, D>

    The list of MathItems found in this page

    mmlFactory: MmlFactory

    The MmlFactory to be used for input jax and error processing

    options: OptionList

    The options for the document

    outputJax: OutputJax<N, T, D>

    The output jax to use for the document

    processed: BitField

    This object tracks what operations have been performed, so that (when asynchronous operations are used), the ones that have already been completed won't be performed again.

    renderActions: RenderList<N, T, D>

    The list of actions to take during a render() or convert() call

    safe: Safe<N, T, D>

    The Safe object for this document

    Methods

    • Set the state of the document (allowing you to roll back the state to a previous one, if needed).

      Parameters

      • state: number

        The new state of the document

      • Optionalrestore: boolean

        True if the original math should be put back into the document during the rollback

      Returns MathDocument<N, T, D>

      The math document instance

    • Perform an action when previous actions are complete. (Used to chain promise-based typeset and conversion actions.)

      Parameters

      • action: () => any

      Returns Promise<any>