Handbook
Glossary
reset-template-insertion-mode ( document -- )
Vocabulary
html5
Inputs
document
an
object
Outputs
None
Definition
USING:
accessors
combinators
combinators.short-circuit
kernel
sequences
;
IN:
html5
::
reset-template-insertion-mode
( document -- )
document
open-elements>>
[
{
[
html-element?
]
[
name>>
{
"template"
"head"
"body"
"html"
"table"
"td"
"th"
"tr"
"tbody"
"thead"
"tfoot"
"colgroup"
"caption"
}
member?
]
}
1&&
]
find-last
nip
[
name>>
]
[
"html"
]
if*
{
{
"template"
[
document
template-insertion-modes>>
last
]
}
{
"head"
[
in-head-mode
]
}
{
"html"
[
after-head-mode
]
}
[
drop
in-body-mode
]
}
case
document
swap
>>insertion-mode
drop
;