Skip to main content
Version: v2

@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

ParameterTypeDescription
typeK
listener
optionsAddEventListenerOptions(Optional)

Returns:

void