Handbook
Glossary
before-head-mode
Vocabulary
html5
Definition
IN:
html5
SINGLETON:
before-head-mode
Methods
USING:
accessors
combinators
combinators.short-circuit
html5
kernel
sequences
;
M:
before-head-mode
tree-insert*
drop
{
{
[
dup
"\t\n\f\r "
member?
]
[
drop
]
}
{
[
dup
comment?
]
[
over
tree>>
push
]
}
{
[
dup
doctype?
]
[
drop
]
}
{
[
dup
{
[
tag?
]
[
name>>
"html"
=
]
}
1&&
]
[
"handle html in-body-mode here"
throw
]
}
{
[
dup
{
[
tag?
]
[
name>>
"head"
=
]
}
1&&
]
[
[
swap
tree>>
push
]
[
>>head-element-pointer
drop
]
[
drop
in-head-mode
>>insertion-mode
]
2tri
]
}
{
[
dup
{
[
end-tag?
]
[
name>>
~array~
member?
not
]
}
1&&
]
[
drop
]
}
{
[
dup
tag?
]
[
drop
]
}
[
<tag>
[
"head"
>>name
pick
tree>>
push
]
[
>>head-element-pointer
]
bi
in-head-mode
>>insertion-mode
tree-insert
]
}
cond
;