X_ViewPort_rootElement = document.compatMode !== 'CSS1Compat' ? elmBody : elmHtml || elmBody;
html = X.Doc.html = X_Node_html = elmHtml && new Node( elmHtml );
-
+ html._flags |= X_Node_State.IN_TREE;
+
head = X.Doc.head = X_Node_head = elmHead && new Node( elmHead );
body = X.Doc.body = X_Node_body = new Node( elmBody );
-
- body._root = html._root = head._root = body;// _root は html だろ
+
body.parent = head.parent = html;
html._xnodes = [ head, body ];