(parent, vnode, hooks, ns, nextSibling)
| 98 | insertNode(parent, fragment, nextSibling) |
| 99 | } |
| 100 | function createElement(parent, vnode, hooks, ns, nextSibling) { |
| 101 | var tag = vnode.tag |
| 102 | var attrs = vnode.attrs |
| 103 | var is = attrs && attrs.is |
| 104 | |
| 105 | ns = getNameSpace(vnode) || ns |
| 106 | |
| 107 | var element = ns ? |
| 108 | is ? $doc.createElementNS(ns, tag, {is: is}) : $doc.createElementNS(ns, tag) : |
| 109 | is ? $doc.createElement(tag, {is: is}) : $doc.createElement(tag) |
| 110 | vnode.dom = element |
| 111 | |
| 112 | if (attrs != null) { |
| 113 | setAttrs(vnode, attrs, ns) |
| 114 | } |
| 115 | |
| 116 | insertNode(parent, element, nextSibling) |
| 117 | |
| 118 | if (attrs != null && attrs.contenteditable != null) { |
| 119 | setContentEditable(vnode) |
| 120 | } |
| 121 | else { |
| 122 | if (vnode.text != null) { |
| 123 | if (vnode.text !== "") element.textContent = vnode.text |
| 124 | else vnode.children = [Vnode("#", undefined, undefined, vnode.text, undefined, undefined)] |
| 125 | } |
| 126 | if (vnode.children != null) { |
| 127 | var children = vnode.children |
| 128 | createNodes(element, children, 0, children.length, hooks, null, ns) |
| 129 | if (vnode.tag === "select" && attrs != null) setLateSelectAttrs(vnode, attrs) |
| 130 | } |
| 131 | } |
| 132 | } |
| 133 | function initComponent(vnode, hooks) { |
| 134 | var sentinel |
| 135 | if (typeof vnode.tag.view === "function") { |
no test coverage detected