if is_space_tok t
return
if t.type is TYPE_COMMENT
- # fixfull this is supposed to be "the last child of the document object"
+ # ?fixfull
doc.children.push t
return
if t.type is TYPE_DOCTYPE
return
if t.type is TYPE_START_TAG and t.name is 'html'
el = token_to_element t, NS_HTML, doc
+ doc.children.push el
open_els.unshift(el)
# fixfull (big paragraph in spec about manifest, fragment, urls, etc)
insertion_mode = ins_mode_before_head
# tree constructor initialization
# see comments on TYPE_TAG/etc for the structure of this data
doc = new Node TYPE_TAG, name: 'html', namespace: NS_HTML
- open_els = [doc]
+ open_els = []
afe = [] # active formatting elements
template_insertion_modes = []
insertion_mode = ins_mode_initial