Handbook
Glossary
in-head-token ( document obj -- document )
Vocabulary
html5
Inputs
document
an
object
obj
an
object
Outputs
document
an
object
Definition
USING:
accessors
combinators
kernel
sequences
;
IN:
html5
::
in-head-token
( document obj -- document )
obj
{
{
[
dup
html-space?
]
[
document
swap
append-node
document
]
}
{
[
dup
misc-node?
]
[
document
swap
append-node
document
]
}
{
[
dup
doctype?
]
[
drop
document
]
}
{
[
dup
head-start-tag?
over
"noscript"
start-tag-named?
or
]
[
document
swap
start-head-element
]
}
{
[
dup
end-tag?
[
dup
name>>
{
"head"
"body"
"html"
"br"
}
member?
not
]
[
f
]
if
]
[
document
swap
close-element
document
]
}
{
[
dup
end-tag?
[
dup
name>>
"head"
=
]
[
f
]
if
]
[
document
swap
close-element
document
after-head-mode
>>insertion-mode
]
}
[
document
<end-tag>
"head"
>>name
close-element
document
after-head-mode
>>insertion-mode
swap
tree-insert
]
}
cond
;