cat
blank
blank
blank
blank
blank
bat
[name]cat[not]blank[not1]blank[not2]blank[not3]blank[not4]blank[type]bat[
{"ScriptPreparationCode":"var node = document.getElementById(\u0027node\u0027)\r\nvar attr = document.getElementById(\u0027attr\u0027)\r\nvar node2 = document.getElementById(\u0027node2\u0027)\r\nvar obj = { name:\u0027cat\u0027, not:\u0027blank\u0027, not1:\u0027blank\u0027, not2:\u0027blank\u0027, not3:\u0027blank\u0027, not4:\u0027blank\u0027, type:\u0027bat\u0027 }\r\n\r\nvar al = {\r\n name:0,\r\n not:1,\r\n not1:2,\r\n not2:3,\r\n not3:4,\r\n not4:5,\r\n type:6\r\n}\r\n","TestCases":[{"Name":"write nodes with 7 child nodes","Code":"let elem = node.firstElementChild;\r\nlet n;\r\ndo {\r\n if ( elem.nodeName === \u0027TYPE\u0027 ) {\r\n \telem.nodeValue=\u0027rat\u0027;\r\n break;\r\n }\r\n} while (elem = elem.nextElementSibling)","IsDeferred":false},{"Name":"write attribute with 7 attributes","Code":" attr.getAttributeNode(\u0027type\u0027).value=\u0027rat\u0027;","IsDeferred":false},{"Name":"write nodevalue with 7 string attributes","Code":"let t = node2.firstElementChild.firstChild.nodeValue;\r\nlet s = t.indexOf(\u0027[type]\u0027)\u002B6\r\nlet e = t.indexOf(\u0027[\u0027, s)\r\nlet n = t.substring(0,s) \u002B \u0027rat\u0027 \u002B t.substring(e)","IsDeferred":false},{"Name":"write nodes with 7 child nodes with children \u002B index","Code":"node.children[al[\u0027type\u0027]].nodeValue=\u0027rat\u0027;","IsDeferred":false},{"Name":"write nodes with 7 child nodes with nextElementSibling \u002B index","Code":"let elem = node.firstElementChild;\r\nlet n;\r\nfor (let i = 0; i\u003C10; i\u002B\u002B) {\r\n if ( i === al[\u0027type\u0027] ) {\r\n \telem.nodeValue = \u0027rat\u0027;\r\n break;\r\n } \r\nelem = elem.nextElementSibling\r\n}","IsDeferred":false},{"Name":"write nodes with 7 child nodes with children \u002B no index","Code":"node.children[6].nodeValue=\u0027rat\u0027;","IsDeferred":false},{"Name":"write nodes with 7 child nodes with nextElementSibling \u002B no index","Code":"let elem = node.firstElementChild;\r\nlet n;\r\nfor (let i = 0; i\u003C10; i\u002B\u002B) {\r\n if ( i === 6 ) {\r\n \telem.nodeValue = \u0027rat\u0027;\r\n break;\r\n } \r\nelem = elem.nextElementSibling\r\n}","IsDeferred":false},{"Name":"obj with 7 items","Code":"obj[\u0027type\u0027]=\u0027rat\u0027;","IsDeferred":false}]}