{"ScriptPreparationCode":"// @BotDamian\r\n// Twitter @NerdDamian\r\n// Video https://d.tube/#!/c/botdamian00\r\n\r\nfunction n(tag, args, content){\r\n const el = document.createElement(tag)\r\n\r\n if(args){\r\n // Handle arguments\r\n for(key in args){\r\n const value = args[key]\r\n console.log(key, value);\r\n }\r\n }\r\n\r\n if(content){\r\n if(typeof content === \u0027string\u0027){\r\n el.textContent = content\r\n }else if(content instanceof Array){\r\n el.append(...content)\r\n }else{\r\n el.appendChild(content)\r\n }\r\n }\r\n\r\n return el\r\n}\r\n\r\nvar templateHtml = x =\u003E \u0060\u003Cdiv class=\u0022video\u0022\u003E\u003Cdiv class=\u0022preview\u0022\u003E\u003Cimg src=\u0022https://d.tube/#!/c/botdamian00\u0022 alt=\u0022\u0022 class=\u0022thumbnail\u0022\u003E\u003Cdiv class=\u0022votingpower\u0022\u003E\u003Ci class=\u0022icon bolt\u0022\u003E\u003C/i\u003E69\u003C/div\u003E\u003Cdiv class=\u0022videotime\u0022\u003E04:20\u003C/div\u003E\u003C/div\u003E\u003Cdiv class=\u0022info\u0022\u003E\u003Cdiv class=\u0022title\u0022\u003EChase \u0026 Taylor Stunning Wedding Day Teaser\u003C/div\u003E\u003Cdiv class=\u0022username\u0022\u003Ecaptainbob\u003C/div\u003E\u003Cdiv class=\u0022stats\u0022\u003E\u003Cdiv class=\u0022dtc\u0022\u003E63\u003C/div\u003E\u003Cdiv class=\u0022time\u0022\u003E6 hours ago\u003C/div\u003E\u003C/div\u003E\u003C/div\u003E\u003C/div\u003E\u0060\r\n\r\nfunction clear(node){\r\n while(node.lastChild) node.removeChild(node.lastChild) \r\n}\r\n\r\nvar cachedVnode = n(\u0027div\u0027, {className: \u0027video\u0027}, [\r\n n(\u0027div\u0027, {className: \u0027preview\u0027}, [\r\n n(\u0027img\u0027, {className: \u0027thumbnail\u0027, src: \u0022https://i.ytimg.com/vi/XGHdPHWYdGA/mqdefault.jpg\u0022}),\r\n n(\u0027div\u0027, {className: \u0027votingpower\u0027}, [\r\n n(\u0027i\u0027, {className: [\u0027icon\u0027, \u0027bolt\u0027]}),\r\n \u002769\u0027\r\n ]),\r\n n(\u0027div\u0027, {className: \u0027videotime\u0027}, \u002704:20\u0027)\r\n ]),\r\n n(\u0027div\u0027, {className: \u0027info\u0027}, [\r\n n(\u0027div\u0027, {className: \u0027title\u0027}, \u0027Chase \u0026 Taylor Stunning Wedding Day Teaser\u0027),\r\n n(\u0027div\u0027, {className: \u0027username\u0027}, \u0027captainbob\u0027),\r\n n(\u0027div\u0027, {className: \u0027stats\u0027}, [\r\n n(\u0027div\u0027, {className: \u0027dtc\u0027}, \u002763\u0027),\r\n n(\u0027div\u0027, {className: \u0027time\u0027}, \u00276 hours ago\u0027)\r\n ])\r\n ])\r\n])\r\n\r\nvar parent = document.getElementById(\u0027parent\u0027)\r\n\r\nvar vparent = document.createElement(\u0027div\u0027)","TestCases":[{"Name":"Html String (append)","Code":"parent.append(\u0027\u003Cdiv class=\u0022video\u0022\u003E\u003Cdiv class=\u0022preview\u0022\u003E\u003Cimg src=\u0022https://d.tube/#!/c/botdamian00\u0022 alt=\u0022\u0022 class=\u0022thumbnail\u0022\u003E\u003Cdiv class=\u0022votingpower\u0022\u003E\u003Ci class=\u0022icon bolt\u0022\u003E\u003C/i\u003E69\u003C/div\u003E\u003Cdiv class=\u0022videotime\u0022\u003E04:20\u003C/div\u003E\u003C/div\u003E\u003Cdiv class=\u0022info\u0022\u003E\u003Cdiv class=\u0022title\u0022\u003EChase \u0026 Taylor Stunning Wedding Day Teaser\u003C/div\u003E\u003Cdiv class=\u0022username\u0022\u003Ecaptainbob\u003C/div\u003E\u003Cdiv class=\u0022stats\u0022\u003E\u003Cdiv class=\u0022dtc\u0022\u003E63\u003C/div\u003E\u003Cdiv class=\u0022time\u0022\u003E6 hours ago\u003C/div\u003E\u003C/div\u003E\u003C/div\u003E\u003C/div\u003E\u0027)\r\nclear(parent)","IsDeferred":false},{"Name":"html string (innerHTML)","Code":"parent.innerHTML = \u0027\u003Cdiv class=\u0022video\u0022\u003E\u003Cdiv class=\u0022preview\u0022\u003E\u003Cimg src=\u0022https://d.tube/#!/c/botdamian00\u0022 alt=\u0022\u0022 class=\u0022thumbnail\u0022\u003E\u003Cdiv class=\u0022votingpower\u0022\u003E\u003Ci class=\u0022icon bolt\u0022\u003E\u003C/i\u003E69\u003C/div\u003E\u003Cdiv class=\u0022videotime\u0022\u003E04:20\u003C/div\u003E\u003C/div\u003E\u003Cdiv class=\u0022info\u0022\u003E\u003Cdiv class=\u0022title\u0022\u003EChase \u0026 Taylor Stunning Wedding Day Teaser\u003C/div\u003E\u003Cdiv class=\u0022username\u0022\u003Ecaptainbob\u003C/div\u003E\u003Cdiv class=\u0022stats\u0022\u003E\u003Cdiv class=\u0022dtc\u0022\u003E63\u003C/div\u003E\u003Cdiv class=\u0022time\u0022\u003E6 hours ago\u003C/div\u003E\u003C/div\u003E\u003C/div\u003E\u003C/div\u003E\u0027\r\nclear(parent)","IsDeferred":false},{"Name":"virtual node function","Code":"parent.appendChild(n(\u0027div\u0027, {className: \u0027video\u0027}, [\r\n n(\u0027div\u0027, {className: \u0027preview\u0027}, [\r\n n(\u0027img\u0027, {className: \u0027thumbnail\u0027, src: \u0022https://i.ytimg.com/vi/XGHdPHWYdGA/mqdefault.jpg\u0022}),\r\n n(\u0027div\u0027, {className: \u0027votingpower\u0027}, [\r\n n(\u0027i\u0027, {className: [\u0027icon\u0027, \u0027bolt\u0027]}),\r\n \u002769\u0027\r\n ]),\r\n n(\u0027div\u0027, {className: \u0027videotime\u0027}, \u002704:20\u0027)\r\n ]),\r\n n(\u0027div\u0027, {className: \u0027info\u0027}, [\r\n n(\u0027div\u0027, {className: \u0027title\u0027}, \u0027Chase \u0026 Taylor Stunning Wedding Day Teaser\u0027),\r\n n(\u0027div\u0027, {className: \u0027username\u0027}, \u0027captainbob\u0027),\r\n n(\u0027div\u0027, {className: \u0027stats\u0027}, [\r\n n(\u0027div\u0027, {className: \u0027dtc\u0027}, \u002763\u0027),\r\n n(\u0027div\u0027, {className: \u0027time\u0027}, \u00276 hours ago\u0027)\r\n ])\r\n ])\r\n]))\r\nclear(parent)","IsDeferred":false},{"Name":"Clone cached vnode","Code":"var cloned = cachedVnode.cloneNode(true)\r\nparent.appendChild(cloned)\r\nclear(parent)","IsDeferred":false},{"Name":"vparent (append)","Code":"parent.append(\u0027\u003Cdiv class=\u0022video\u0022\u003E\u003Cdiv class=\u0022preview\u0022\u003E\u003Cimg src=\u0022https://d.tube/#!/c/botdamian00\u0022 alt=\u0022\u0022 class=\u0022thumbnail\u0022\u003E\u003Cdiv class=\u0022votingpower\u0022\u003E\u003Ci class=\u0022icon bolt\u0022\u003E\u003C/i\u003E69\u003C/div\u003E\u003Cdiv class=\u0022videotime\u0022\u003E04:20\u003C/div\u003E\u003C/div\u003E\u003Cdiv class=\u0022info\u0022\u003E\u003Cdiv class=\u0022title\u0022\u003EChase \u0026 Taylor Stunning Wedding Day Teaser\u003C/div\u003E\u003Cdiv class=\u0022username\u0022\u003Ecaptainbob\u003C/div\u003E\u003Cdiv class=\u0022stats\u0022\u003E\u003Cdiv class=\u0022dtc\u0022\u003E63\u003C/div\u003E\u003Cdiv class=\u0022time\u0022\u003E6 hours ago\u003C/div\u003E\u003C/div\u003E\u003C/div\u003E\u003C/div\u003E\u0027)\r\nclear(parent)","IsDeferred":false},{"Name":"vparent (innerHTML)","Code":"vparent.innerHTML = \u0027\u003Cdiv class=\u0022video\u0022\u003E\u003Cdiv class=\u0022preview\u0022\u003E\u003Cimg src=\u0022https://d.tube/#!/c/botdamian00\u0022 alt=\u0022\u0022 class=\u0022thumbnail\u0022\u003E\u003Cdiv class=\u0022votingpower\u0022\u003E\u003Ci class=\u0022icon bolt\u0022\u003E\u003C/i\u003E69\u003C/div\u003E\u003Cdiv class=\u0022videotime\u0022\u003E04:20\u003C/div\u003E\u003C/div\u003E\u003Cdiv class=\u0022info\u0022\u003E\u003Cdiv class=\u0022title\u0022\u003EChase \u0026 Taylor Stunning Wedding Day Teaser\u003C/div\u003E\u003Cdiv class=\u0022username\u0022\u003Ecaptainbob\u003C/div\u003E\u003Cdiv class=\u0022stats\u0022\u003E\u003Cdiv class=\u0022dtc\u0022\u003E63\u003C/div\u003E\u003Cdiv class=\u0022time\u0022\u003E6 hours ago\u003C/div\u003E\u003C/div\u003E\u003C/div\u003E\u003C/div\u003E\u0027\r\nclear(parent)","IsDeferred":false},{"Name":"vparent appendChild","Code":"vparent.appendChild(n(\u0027div\u0027, {className: \u0027video\u0027}, [\r\n n(\u0027div\u0027, {className: \u0027preview\u0027}, [\r\n n(\u0027img\u0027, {className: \u0027thumbnail\u0027, src: \u0022https://i.ytimg.com/vi/XGHdPHWYdGA/mqdefault.jpg\u0022}),\r\n n(\u0027div\u0027, {className: \u0027votingpower\u0027}, [\r\n n(\u0027i\u0027, {className: [\u0027icon\u0027, \u0027bolt\u0027]}),\r\n \u002769\u0027\r\n ]),\r\n n(\u0027div\u0027, {className: \u0027videotime\u0027}, \u002704:20\u0027)\r\n ]),\r\n n(\u0027div\u0027, {className: \u0027info\u0027}, [\r\n n(\u0027div\u0027, {className: \u0027title\u0027}, \u0027Chase \u0026 Taylor Stunning Wedding Day Teaser\u0027),\r\n n(\u0027div\u0027, {className: \u0027username\u0027}, \u0027captainbob\u0027),\r\n n(\u0027div\u0027, {className: \u0027stats\u0027}, [\r\n n(\u0027div\u0027, {className: \u0027dtc\u0027}, \u002763\u0027),\r\n n(\u0027div\u0027, {className: \u0027time\u0027}, \u00276 hours ago\u0027)\r\n ])\r\n ])\r\n]))\r\nclear(parent)","IsDeferred":false},{"Name":"vparent cloneNode","Code":"var cloned = cachedVnode.cloneNode(true)\r\nvparent.appendChild(cloned)\r\nclear(parent)","IsDeferred":false},{"Name":"Control run coz i dont believe that innerHTML is slower.","Code":"parent.append(\u0027\u003Cdiv class=\u0022video\u0022\u003E\u003Cdiv class=\u0022preview\u0022\u003E\u003Cimg src=\u0022https://d.tube/#!/c/botdamian00\u0022 alt=\u0022\u0022 class=\u0022thumbnail\u0022\u003E\u003Cdiv class=\u0022votingpower\u0022\u003E\u003Ci class=\u0022icon bolt\u0022\u003E\u003C/i\u003E69\u003C/div\u003E\u003Cdiv class=\u0022videotime\u0022\u003E04:20\u003C/div\u003E\u003C/div\u003E\u003Cdiv class=\u0022info\u0022\u003E\u003Cdiv class=\u0022title\u0022\u003EChase \u0026 Taylor Stunning Wedding Day Teaser\u003C/div\u003E\u003Cdiv class=\u0022username\u0022\u003Ecaptainbob\u003C/div\u003E\u003Cdiv class=\u0022stats\u0022\u003E\u003Cdiv class=\u0022dtc\u0022\u003E63\u003C/div\u003E\u003Cdiv class=\u0022time\u0022\u003E6 hours ago\u003C/div\u003E\u003C/div\u003E\u003C/div\u003E\u003C/div\u003E\u0027)\r\nclear(parent)","IsDeferred":false},{"Name":"template string function","Code":"parent.append(templateHtml())\r\nclear(parent)","IsDeferred":false}]}