Skip to content
On this page

Home > @taiyuuki/utils > EventsController > add_evt

EventsController.add_evt() method

This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

绑定事件

Signature:

typescript
add_evt<T extends EventTarget>(type: Parameters<T['addEventListener']>[0], callback: FnNoArgs): this;
add_evt<T extends EventTarget>(type: Parameters<T['addEventListener']>[0], callback: FnNoArgs): this;

Parameters

ParameterTypeDescription
typeParameters<T['addEventListener']>[0]事件类型
callbackFnNoArgs回调

Returns:

this

Released under the MIT License.