Handbook
Glossary
option-select ( option -- select/f )
Vocabulary
html5
Inputs
option
an
object
Outputs
select/f
an
object
Definition
USING:
accessors
combinators.short-circuit
kernel
math
sequences
;
IN:
html5
::
option-select
( option -- select/f )
option
node-ancestors
:>
ancestors ancestors
[
"select"
html-element-named?
]
find
nip
:>
select select
[
ancestors select ancestors
node-index
head
:>
parents parents
[
{
[
html-element?
]
[
name>>
{
"option"
"datalist"
"hr"
}
member?
]
}
1&&
]
any?
parents
[
"optgroup"
html-element-named?
]
count
1
>
or
[
f
]
[
select
]
if
]
[
f
]
if
;