Create a new toggle.
Optionallabel: string = ''The label text.
Optionalchecked: boolean = falseWhether the toggle is initially checked.
Optionalcallback: ((value: boolean) => void) | null = nullThe callback function to call when the toggle is changed.
Do the necessary initialization.
Add one or more classes to an element.
Bind a property to the toggle.
The object to bind the property to.
The property to bind.
Destroy the element
Get whether the toggle is checked.
Get whether the toggle is checked.
Set the callback function to call when the toggle is changed.
The callback function to call when the toggle is changed.
Add a click event listener to the widget.
The function to call when the widget is clicked.
Remove one or more classes from an element.
Set the content of the widget.
The value to set the content to.
Set the label of the toggle.
Set the text of the widget.
The value to set the text to.
Set whether the toggle is checked.
A class that represents a toggle that can be turned on and off.
@ extends Widget implements ValueWidget