CheckboxControl


Use this control to create and manipulate checkboxes. This control uses the EventControl to notify subscribers when the checkbox is clicked.

Inherits properties from its parent, InputControl.

Initialize

Initialize the control.

const checkboxElement = ElementResolver.resolveOne('#someCheckbox');

const exampleCheckbox = new CheckboxControl(checkboxElement);

exampleCheckbox.initialize();

.check()

Check the checkbox.

.uncheck()

Uncheck the checkbox.

.isChecked()

Check whether the checkbox is checked.

.value

Get the value of the checkbox.

.checkedEvent.subscribe()

Subscribe to the checkox' checked. See Event Control.

.uncheckedEvent.subscribe()

Subscribe to the checkox' unchecked. See Event Control.