@friendlycaptcha/sdk > WidgetHandle > addEventListener
WidgetHandle.addEventListener() method
Shorthand for this.getElement().addEventListener (that is strictly typed in Typescript)
Signature:
addEventListener<K extends keyof FRCEventMap>(type: K, listener: (this: HTMLElement, ev: FRCEventMap[K]) => any | {
handleEvent: (ev: FRCEventMap[K]) => any;
}, options?: AddEventListenerOptions): void;
Parameters
| Parameter | Type | Description |
|---|---|---|
| type | K | |
| listener | ||
| options | AddEventListenerOptions | (Optional) |
Returns:
void