From 1998394054f4ed6cace01330afce565f58f92d2b Mon Sep 17 00:00:00 2001
From: Joey Arhar
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.
If element's multiple attribute is
+ absent:
Let lastSelectedOption be null.
For each option in element's list of options in reverse order:
+ +If option's selectedness + is true:
+ +If option's cached nearest ancestor select
+ element is null, then continue.
If lastSelectedOption is null, then set lastSelectedOption to + option and continue.
Set option's selectedness to false.
If element's multiple attribute is
- absent:
If element has the multiple attribute,
+ then return.
Let lastSelectedOption be null.
Let lastSeen be false.
For each option in element's list of options in reverse order:
+For each option in element's list of options in reverse order:
+If option's selectedness + is true:
If option's selectedness - is true:
+If option's cached nearest ancestor select
+ element is null, then continue.
If option's cached nearest ancestor select
- element is null, then continue.
If lastSelectedOption is null, then set lastSelectedOption to - option and continue.
If lastSeen is false, then set lastSeen to true and + continue.
Set option's selectedness to false.
Set option's selectedness to false.