Handbook
Glossary
table-context ( document -- name/f )
Vocabulary
html5
Inputs
document
an
object
Outputs
name/f
an
object
Definition
USING:
accessors
combinators
kernel
sequences
;
IN:
html5
:
table-context
( document -- name/f )
dup
open-elements>>
[
html-element?
]
filter
[
name>>
]
map
reverse
[
dup
table-context-elements
member?
swap
"template"
=
or
]
find
nip
dup
"template"
=
[
drop
insertion-mode>>
{
{
in-table-mode
[
"table"
]
}
{
in-table-body-mode
[
"tbody"
]
}
{
in-row-mode
[
"tr"
]
}
{
in-column-group-mode
[
"colgroup"
]
}
[
drop
f
]
}
case
]
[
nip
]
if
;