Dart API Referencedart:htmlOptionElement

OptionElement Interface

DOM option elements elements share all of the properties and methods of other HTML elements described in the element section. They also have the specialized interface HTMLOptionElement (or HTML 4 HTMLOptionElement).

No methods are defined on this interface.

Extends

Element

Constructors

Code new OptionElement([String data, String value, bool defaultSelected, bool selected]) #

OptionElement([String data, String value, bool defaultSelected, bool selected]);

Fields

Code bool defaultSelected #

Reflects the value of the selected HTML attribute. which indicates whether the option is selected by default.
bool defaultSelected;

Code bool disabled #

Reflects the value of the disabled HTML attribute, which indicates that the option is unavailable to be selected. An option can also be disabled if it is a child of an <optgroup> element that is disabled.
bool disabled;

Code final FormElement form #

If the option is a descendent of a <select> element, then this property has the same value as the form property of the corresponding {{DomXref("HTMLSelectElement") object; otherwise, it is null.
final FormElement form;

Code final int index #

The position of the option within the list of options it belongs to, in tree-order. If the option is not part of a list of options, the value is 0.
final int index;

Code String label #

Reflects the value of the label HTML attribute, which provides a label for the option. If this attribute isn't specifically set, reading it returns the element's text content.
String label;

Code bool selected #

Indicates whether the option is selected.
bool selected;

Code String value #

Reflects the value of the value HTML attribute, if it exists; otherwise reflects value of the textContent  IDL attribute.
String value;

This page includes content from the Mozilla Foundation that is graciously licensed under a Creative Commons: Attribution-Sharealike license. Mozilla has no other association with Dart or dartlang.org. We encourage you to improve the web by contributing to The Mozilla Developer Network.