From 5d4835a7c2cd081b9b2ebe5b817ae459e9f363b8 Mon Sep 17 00:00:00 2001
From: Joey Arhar
If element's multiple attribute is
- absent, and element's display size is 1,
- and no option elements in the element's list of options have their selectedness set to true, then set the selectedness of the first option
- element in the list of options in
- tree order that is not disabled,
- if any, to true, and return.
If element's multiple attribute is
- absent, and two or more option elements in element's list of options have their selectedness set to true, then set the selectedness of all but the last option
- element with its selectedness set to true in
- the list of options in tree order
- to false.
Let updateSelectedcontent be false.
If element's multiple attribute is
+ absent, and element's display size is 1,
+ and no option elements in the element's list of options have their selectedness set to true, then:
Set the selectedness of the first option
+ element in the list of options in
+ tree order that is not disabled,
+ if any, to true.
Set updateSelectedcontent to true.
Otherwise, if element's multiple
+ attribute is absent, and two or more option elements in element's list of options have their selectedness set to true, then:
Set the selectedness of all but the
+ last option element with its selectedness set to true in the list of options in tree order to
+ false.
Set updateSelectedcontent to true.
If updateSelectedcontent is true, then run update a select's
+ selectedcontent given element.