Hierarchy

  • Async

Implements

Methods

  • Smart wrapper for cancelAnimationFrame

    Parameters

    • request: number

    Returns void

  • Parameters

    • request: number

    Returns void

  • Returns void

  • Parameters

    • timer: number

    Returns void

  • Parameters

    • label: string

    Returns void

  • Debouncing enforces that a function not be called again until a certain amount of time has passed without it being called. As in "execute this function only if 100 milliseconds have passed without it being called."

    Example

    var jodit = Jodit.make('.editor');
    jodit.e.on('mousemove', jodit.async.debounce(() => {
    // Do expensive things
    }, 100));

    Parameters

    Returns CallbackFunction<any>

  • Returns any

  • Type Parameters

    • T

    Parameters

    • executor: ((resolve: ((value: T | PromiseLike<T>) => void), reject: ((reason?: any) => void)) => void)
        • (resolve: ((value: T | PromiseLike<T>) => void), reject: ((reason?: any) => void)): void
        • Parameters

          • resolve: ((value: T | PromiseLike<T>) => void)
              • (value: T | PromiseLike<T>): void
              • Parameters

                • value: T | PromiseLike<T>

                Returns void

          • reject: ((reason?: any) => void)
              • (reason?: any): void
              • Parameters

                • Optional reason: any

                Returns void

          Returns void

    Returns RejectablePromise<T>

  • Get Promise status

    Parameters

    Returns Promise<"pending" | "fulfilled" | "rejected">

  • Smart wrapper for requestAnimationFrame

    Parameters

    • callback: FrameRequestCallback

    Returns number

  • Parameters

    • callback: IdleRequestCallback
    • Optional options: {
          timeout: number;
      }
      • timeout: number

    Returns number

  • Parameters

    • Optional options: {
          timeout: number;
      }
      • timeout: number

    Returns RejectablePromise<number>

  • Parameters

    • callback: Callback
    • timeout: number | IAsyncParams
    • Rest ...args: any[]

    Returns number

  • Throttling enforces a maximum number of times a function can be called over time. As in "execute this function at most once every 100 milliseconds."

    Example

    var jodit = Jodit.make('.editor');
    jodit.e.on(document.body, 'scroll', jodit.async.throttle(function() {
    // Do expensive things
    }, 100));

    Parameters

    Returns CallbackFunction<any>

  • Parameters

    • label: string
    • timeout: number

    Returns Nullable<number>

Constructors

Properties

isDestructed: boolean = false

Jodit PRO

If you like Jodit - try Jodit PRO