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
Parameter | Type | Description |
---|---|---|
type | Parameters<T['addEventListener']>[0] | 事件类型 |
callback | FnNoArgs | 回调 |
Returns:
this