Interface Callbacks<T>

Type parameters

  • T: Function

Hierarchy

Index

Methods

add

  • Add a callback or a collection of callbacks to a callback list.

    see

    https://api.jquery.com/callbacks.add/

    since

    1.7

    Parameters

    • callback: TypeOrArray<T>

      A function, or array of functions, that are to be added to the callback list.

    • Rest ...callbacks: Array<TypeOrArray<T>>

      A function, or array of functions, that are to be added to the callback list.

    Returns this

disable

  • disable(): this

disabled

  • disabled(): boolean

empty

  • empty(): this

fire

  • fire(...args: any[]): this
  • Call all of the callbacks with the given arguments.

    see

    https://api.jquery.com/callbacks.fire/

    since

    1.7

    Parameters

    • Rest ...args: any[]

      The argument or list of arguments to pass back to the callback list.

    Returns this

fireWith

  • fireWith(context: object, args?: ArrayLike<any>): this
  • Call all callbacks in a list with the given context and arguments.

    see

    https://api.jquery.com/callbacks.fireWith/

    since

    1.7

    Parameters

    • context: object

      A reference to the context in which the callbacks in the list should be fired.

    • Optional args: ArrayLike<any>

      An argument, or array of arguments, to pass to the callbacks in the list.

    Returns this

fired

  • fired(): boolean

has

  • has(callback?: T): boolean
  • Determine whether or not the list has any callbacks attached. If a callback is provided as an argument, determine whether it is in a list.

    see

    https://api.jquery.com/callbacks.has/

    since

    1.7

    Parameters

    • Optional callback: T

      The callback to search for.

    Returns boolean

lock

  • lock(): this

locked

  • locked(): boolean

remove

  • remove(...callbacks: T[]): this
  • Remove a callback or a collection of callbacks from a callback list.

    see

    https://api.jquery.com/callbacks.remove/

    since

    1.7

    Parameters

    • Rest ...callbacks: T[]

      A function, or array of functions, that are to be removed from the callback list.

    Returns this