Skip to main content

friendly-captcha-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

ParameterTypeDescription
typeK
listener(this: HTMLElement, ev: FRCEventMap[K]) => any | { handleEvent: (ev: FRCEventMap[K]) => any; }
optionsAddEventListenerOptions(Optional)

Returns:

void