From dc9926c4a5e1deaf3a5186edc15c2655ea99fb39 Mon Sep 17 00:00:00 2001 From: Jason Woofenden Date: Tue, 22 Dec 2015 12:18:51 -0500 Subject: [PATCH] fix at start --- parse-html.coffee | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/parse-html.coffee b/parse-html.coffee index 85a91af..e193118 100644 --- a/parse-html.coffee +++ b/parse-html.coffee @@ -1157,7 +1157,7 @@ parse_html = (txt, parse_error_cb = null) -> 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 @@ -1184,6 +1184,7 @@ parse_html = (txt, parse_error_cb = null) -> 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 @@ -3364,7 +3365,7 @@ parse_html = (txt, parse_error_cb = null) -> # 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 -- 1.7.10.4