The event interface.

interface Event<T> {
    effects?: ((widget, ...arg) => any)[];
    operation: ((widget, effect, element) => void);
}

Type Parameters

  • T

Properties

Properties

effects?: ((widget, ...arg) => any)[]

The effect function of this event. Only used in the widget-based event.

Type declaration

    • (widget, ...arg): any
    • Parameters

      • widget: Widget
      • Rest ...arg: any[]

      Returns any

Param: widget

The widget's self.

Param: args

The external arguments.

Returns

operation: ((widget, effect, element) => void)

The operation when set event.

Type declaration

    • (widget, effect, element): void
    • Parameters

      • widget: T

        The widget's self.

      • effect: ((widget, ...arg) => any)

        The effect function of this widget.

          • (widget, ...arg): any
          • Parameters

            • widget: Widget
            • Rest ...arg: any[]

            Returns any

      • element: HTMLCanvasElement

        The canvas element of this app.

      Returns void

Returns