@friendlycaptcha/sdk > WidgetHandle
WidgetHandle class
This provides an API stub that provides the end-user JS API for a widget.
This class is only instantiated by the SDK - do not create a handle yourself.
Signature:
export declare class WidgetHandle
Remarks
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the WidgetHandle class.
Properties
|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
|
string |
A random ID that uniquely identifies this widget in this session. | |
|
boolean |
When this is true the widget has been destroyed and can no longer be used. | ||
|
|
string |
(Optional) The sitekey for this widget. It can not be changed after creation of the widget. | |
Methods
|
Method |
Modifiers |
Description |
|---|---|---|
|
Shorthand for | ||
|
Destroy the widget. This removes the | ||
|
The HTML element that contains the widget. | ||
|
The current response of the widget. This is the value that should be sent to the server and is embedded in HTML forms. | ||
|
The current state of the widget. | ||
|
Shorthand for | ||
|
Reset the widget, removing any progress. Optional argument: an object with the name of the trigger that caused the reset. You would usually keep this empty. This is the | ||
|
Trigger the widget to start a challenge. The widget will start a challenge solving in the background. * In |