{"ScriptPreparationCode":"let template = document.createElement(\u0022template\u0022);\r\ntemplate.innerHTML = \u0060\u003Cspan class=\u0022simple\u0022\u003E\u003C/span\u003E\u0060;\r\nlet DOMTemplate = document.getElementById(\u0022PERFORMANCE-DOM-TEMPLATE\u0022);\r\n\r\ncustomElements.define(\r\n \u0022performance-template\u0022,\r\n class extends HTMLElement {\r\n constructor() {\r\n super()\r\n .attachShadow({\r\n mode: \u0022open\u0022,\r\n })\r\n .append(template.content.cloneNode(true));\r\n }\r\n }\r\n);\r\ncustomElements.define(\r\n \u0022performance-innerhtml\u0022,\r\n class extends HTMLElement {\r\n constructor() {\r\n super().attachShadow({\r\n mode: \u0022open\u0022,\r\n }).innerHTML = \u0060\u003Cspan class=\u0022simple\u0022\u003E\u003C/span\u003E\u0060;\r\n }\r\n }\r\n);\r\ncustomElements.define(\r\n \u0022performance-dom-template\u0022,\r\n class extends HTMLElement {\r\n constructor() {\r\n super()\r\n .attachShadow({\r\n mode: \u0022open\u0022,\r\n })\r\n .append(DOMtemplate.content.cloneNode(true));\r\n }\r\n }\r\n);\r\ncustomElements.define(\r\n \u0022performance-dom-template-getelement\u0022,\r\n class extends HTMLElement {\r\n constructor() {\r\n super()\r\n .attachShadow({\r\n mode: \u0022open\u0022,\r\n })\r\n .append(\r\n document.getElementById(\u0022PERFORMANCE-DOM-TEMPLATE\u0022).content.cloneNode(true)\r\n );\r\n }\r\n }\r\n);","TestCases":[{"Name":"JavaScript Template","Code":"let el = document.createElement(\u0022performance-template\u0022);\r\ndocument.body.append(el);","IsDeferred":false},{"Name":"only innerHTML","Code":"let el = document.createElement(\u0022performance-innerhtml\u0022);\r\ndocument.body.append(el);","IsDeferred":false},{"Name":"DOM Template, repeated getElementById","Code":"let el = document.createElement(\u0022performance-dom-template-getelement\u0022);\r\ndocument.body.append(el);","IsDeferred":false},{"Name":"DOM Template, single getElementById","Code":"let el = document.createElement(\u0022performance-dom-template\u0022);\r\ndocument.body.append(el);","IsDeferred":false}]}