@mathjax/src
    Preparing search index...

    Implements the FunctionList class (extends PrioritizedList)

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    items: PrioritizedListItem<AnyFunction>[] = []

    The list of items, sorted by priority (smallest number first)

    DEFAULTPRIORITY: number = 5

    The default priority for items added to the list

    Methods

    • Add an item to the list

      Parameters

      • item: AnyFunction

        The data for the item to be added

      • priority: number = PrioritizedList.DEFAULTPRIORITY

        The priority for the item

      Returns AnyFunction

      The data itself

    • Executes the functions in the list (in prioritized order) asynchronously, passing the given data to the functions, and doing the next function only when the previous one completes. If the function returns a Promise, then use that to control the flow. Otherwise, if the function returns false, the list is terminated. This function returns a Promise. If any function in the list fails, the promise fails. If any function returns false, the promise succeeds, but passes false as its argument. Otherwise it succeeds and passes true.

      Parameters

      • ...data: any[]

        The array of arguments to pass to the functions

      Returns Promise<boolean>

      The promise that is satisfied when the function list completes (with argument true or false depending on whether some function returned false or not).

    • Executes the functions in the list (in prioritized order), passing the given data to the functions. If any return false, the list is terminated.

      Parameters

      • ...data: any[]

        The array of arguments to pass to the functions

      Returns boolean

      False if any function stopped the list by returning false, true otherwise