Handbook
Glossary
selected-option ( select elements -- option/f )
Vocabulary
html5
Inputs
select
an
object
elements
an
object
Outputs
option/f
an
object
Definition
USING:
accessors
assocs
combinators.short-circuit
kernel
sequences
;
IN:
html5
::
selected-option
( select elements -- option/f )
elements
[
{
[
"option"
html-element-named?
]
[
option-select
select
eq?
]
}
1&&
]
filter
:>
options options
[
attributes>>
"selected"
swap
key?
]
find-last
nip
[
]
[
select
select-display-size
1
=
[
options
[
option-disabled?
not
]
find
nip
]
[
f
]
if
]
if*
;