HTMLOptionsCollection class
HTMLOptionsCollection is an interface representing a collection of HTML option elements (in document order) and offers methods and properties for traversing the list as well as optionally altering its items. This type is returned solely by the "options" property of select.
- Implemented types
- Available extensions
- Annotations
-
- @JS()
- @staticInterop
Constructors
- HTMLOptionsCollection()
-
factory
Properties
- add ↔ void Function(HTMLElement, [dynamic])
-
Available on HTMLOptionsCollection, provided by the HTMLOptionsCollection$Typings extension
getter/setter pair - hashCode → int
-
The hash code for this object.
no setterinherited
- item ↔ Element? Function(num)
-
Available on HTMLCollectionBase, provided by the HTMLCollectionBase$Typings extension
getter/setter pair - length → num
-
Available on HTMLCollectionBase, provided by the HTMLCollectionBase$Typings extension
Sets or retrieves the number of objects in a collection.no setter - length ↔ num
-
Available on HTMLOptionsCollection, provided by the HTMLOptionsCollection$Typings extension
Returns the number of elements in the collection.getter/setter pair - remove ↔ void Function(num)
-
Available on HTMLOptionsCollection, provided by the HTMLOptionsCollection$Typings extension
getter/setter pair - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedIndex ↔ num
-
Available on HTMLOptionsCollection, provided by the HTMLOptionsCollection$Typings extension
Returns the index of the first selected item, if any, or −1 if there is no selected item.getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
num index) → Element -
Available on HTMLCollectionBase, provided by the HTMLCollectionBase$Typings extension
-
operator []=(
num index, Element value) → void -
Available on HTMLCollectionBase, provided by the HTMLCollectionBase$Typings extension