ordinary-body-token ( document obj -- document )


Vocabulary
html5

Inputs
documentan object
objan object


Outputs
documentan object


Definition


:: ordinary-body-token ( document obj -- document )
obj {
{ [ dup doctype? ] [ drop ] }
{
[ dup tag? ]
[
dup name>> {
{ "body" ~quotation~ }
{ "html" ~quotation~ }
{ "head" ~quotation~ }
{ "frame" ~quotation~ }
{ "frameset" ~quotation~ }
{ "form" ~quotation~ }
{ "select" ~quotation~ }
{ "input" ~quotation~ }
{ "caption" ~quotation~ }
{ "col" ~quotation~ }
{ "colgroup" ~quotation~ }
{ "tbody" ~quotation~ }
{ "td" ~quotation~ }
{ "tfoot" ~quotation~ }
{ "th" ~quotation~ }
{ "thead" ~quotation~ }
{ "tr" ~quotation~ }
[ drop document swap start-body-element ]
} case
]
}
{
[ dup end-tag? ]
[
dup name>> { "body" "html" } member? [
document template-insertion-modes>> empty? [
document over name>> "body" =
~quotation~ ~quotation~ if
>>insertion-mode drop
document swap mark-end-tag
] [ drop ] if
] [ document swap end-body-element ] if
]
}
{ [ dup f = ] [ drop ] }
[
dup integer? [
document reconstruct-formatting
document over update-frameset-for-character
] when document swap append-node
]
} cond document ;