Standard radio button implementation. Can be applied to any group of elements having the same name to achieve one-of-group checked functionality.
that have this behavior applied by default:
<input type="radio">- standard HTML inline radio button;
<button type="radio">- inline radio button, use it as
that this behavior knows about:
checked- if provided will initialize value of runtime state of the flag checked.
name="groupname"- standard attribute name has special meaning for the radio: radio buttons with the same name constitute single group.
value="..."- standard value attribute (used by
as="string | integer | float | numeric | auto"- defines how value attribute is reported to script. By default value of element with
value="42"will be just as a string
value="42" as="integer"will yield integer
Aside of standard set of events (mouse, keyboard, focus) behavior:radio generates:
BUTTON_STATE_CHANGEDevent - the button just changed its state to checked. Asynchronous event.
BUTTON_PRESSevent - mouse down or
spacebarkey down when button is in focus. Synchronous event.
true/false, reflects current status of
:checked state flag.
Note: behavior:form treats all radio elements of the group as a single value.