Class EventEmitterAbstract

事件监听对象。

Description

用于为对象增加或取消事件监听。

Hierarchy

  • EventEmitter

Constructors

Methods

Constructors

Methods

  • 触发事件

    Parameters

    • type: string

      事件类型

    • Optional arg: any

    Returns EventEmitter

  • 取消监听

    Parameters

    • type: string
    • handler: ((arg?: any) => void)
        • (arg?: any): void
        • Parameters

          • Optional arg: any

          Returns void

    Returns EventEmitter

  • 添加监听

    Parameters

    • type: string

      Event type

    • handler: ((arg?: any) => void)

      A callback function to process the incomming event

        • (arg?: any): void
        • Parameters

          • Optional arg: any

          Returns void

    Returns EventEmitter

  • 添加一次性监听

    Parameters

    • type: string

      Event type

    • handler: ((arg?: any) => void)

      A callback function to process the incomming event

        • (arg?: any): void
        • Parameters

          • Optional arg: any

          Returns void

    Returns EventEmitter