Handbook
Glossary
foreign-tree-insert ( document obj -- document )
Vocabulary
html5
Inputs
document
an
object
obj
an
object
Outputs
document
an
object
Definition
USING:
accessors
combinators
kernel
math
sequences
;
IN:
html5
::
foreign-tree-insert
( document obj -- document )
obj
foreign-breakout?
[
"unexpected-html-token-in-foreign-content"
report-parse-error
document
leave-foreign-content
document obj
html-tree-insert
]
[
obj
{
{
[
dup
tag?
]
[
document
swap
document
open-elements>>
last
namespace>>
insert-foreign-element
document
]
}
{
[
dup
end-tag?
]
[
document
swap
foreign-end-tag
]
}
{
[
dup
doctype?
]
[
drop
document
]
}
[
dup
integer?
[
document
over
update-frameset-for-character
]
when
document
swap
append-node
document
]
}
cond
]
if
;