child 1
child 4
{"ScriptPreparationCode":"uidc = 0;\r\nfunction getUid (el) {\r\n\tvar id = el.id;\r\n\tif(!id) {\r\n \tid = \u0022uid_\u0022\u002B (\u002B\u002Buidc);\r\n \tel.id = id;\r\n }\r\n\treturn id;\r\n}\r\nvar target1 = document.querySelector(\u0022#child1\u0022);\r\nvar target4 = document.querySelector(\u0022#child4\u0022);\r\nvar parent = document.querySelector(\u0022#parenter\u0022);\r\nfunction matchSel (target, selector, parent) {\r\n while(target \u0026\u0026 target !== parent){\r\n if(target.matches(selector)){\r\n return;\r\n }else{\r\n target = target.parentNode;\r\n }\r\n }\r\n}","TestCases":[{"Name":"matches nested 4","Code":"matchSel (target4, \u0022.parent\u0022, parent);","IsDeferred":false},{"Name":"selector nested 1","Code":"parent.querySelector(\u0022.parent #\u0022\u002Btarget1.id);","IsDeferred":false},{"Name":"matches nested 1","Code":"matchSel (target1, \u0022.parent\u0022, parent);","IsDeferred":false},{"Name":"selector nested 4","Code":"parent.querySelector(\u0022.parent #\u0022\u002Btarget4.id);","IsDeferred":false}]}