Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface WillCreateWidgetEvent

Representation of a willCreateWidgetEvent.

Hierarchy

Index

Properties

Methods

Properties

Readonly factoryId

factoryId: string

The widget factory id.

Readonly widget

widget: Widget

The widget which will be created.

Methods

fire

  • fire<T>(emitter: Emitter<T>, event: Omit<T, "waitUntil">, timeout?: number | undefined): Promise<void>
  • Fire all listeners in the same tick.

    Use AsyncEmitter.fire to fire listeners async one after another.

    Type parameters

    Parameters

    • emitter: Emitter<T>
    • event: Omit<T, "waitUntil">
    • Default value timeout: number | undefined = undefined

    Returns Promise<void>

waitUntil

  • waitUntil(thenable: Promise<any>): void
  • Allows to pause the event loop until the provided thenable resolved.

    Note: It can only be called during event dispatch and not in an asynchronous manner

    Parameters

    • thenable: Promise<any>

      A thenable that delays execution.

    Returns void