AwaitedDOM/ RadioNodeList

The RadioNodeList interface represents a collection of radio elements in a <form> or a <fieldset> element.

Properties

.value
W3C

If the underlying element collection contains radio buttons, the value property represents the checked radio button. On retrieving the value property, the value of the currently checked radio button is returned as a string. If the collection does not contain any radio buttons or none of the radio buttons in the collection is in checked state, the empty string is returned. On setting the value property, the first radio button input element whose value property is equal to the new value will be set to checked.

Type: Promise<string>

.length
W3C

The number of nodes in the NodeList.

Type: Promise<number>

Methods

.entries()
W3C

Returns an iterator, allowing code to go through all key/value pairs contained in the collection. (In this case, the keys are numbers starting from 0 and the values are nodes.)

Returns: Promise<>

.forEach()
W3C

Executes a provided function once per NodeList element, passing the element as an argument to the function.

Returns: Promise<>

.item(index)
W3C

Returns an item in the list by its index, or null if the index is out-of-bounds.

Arguments:

  • index number. index is the index of the node to be fetched. The index is zero-based.

Returns: SuperNode

.keys()
W3C

Returns an iterator, allowing code to go through all the keys of the key/value pairs contained in the collection. (In this case, the keys are numbers starting from 0.)

Returns: Promise<>

.values()
W3C

Returns an iterator allowing code to go through all values (nodes) of the key/value pairs contained in the collection.

Returns: Promise<>

Edit this page on GitHub