Skip to main content
Version: v2

@friendlycaptcha/sdk > FRCWidgetStateChangeEventData

FRCWidgetStateChangeEventData interface

Payload of the "frc:widget.statechange" event.

Signature:

export interface FRCWidgetStateChangeEventData 

Properties

Property

Modifiers

Type

Description

error?

WidgetErrorData

(Optional) The error that caused the state change, if any. Undefined if state is not equal to "error".

id

string

The widget ID that the event originated from.

mode?

WidgetMode

(Optional) The WidgetMode returned from the API. Smart Mode intelligently chooses between One-click Mode ("interactive") and Zero-click Mode ("noninteractive"). The mode is configured in the Friendly Captcha dashboard.

name

typeof FRCWidgetStateChangeEventName

"frc:widget.statechange"

response

string

The current frc-captcha-response value.

state

WidgetState

The new state of the widget.