{"ScriptPreparationCode":"var class17 = document.getElementsByClassName(\u002217\u0022);\r\nObject.prototype.closestParent = function(tag, multi) {\r\n var el=this.parentNode; var newTag = tag.slice(1); var g = 0; \r\n if(tag[0] === \u0022.\u0022){while(el \u0026\u0026 g \u003C multi){if(el.className !== newTag){g\u002B\u002B;el=el.parentNode;}else{return el;}}}\r\n if(tag[0] === \u0022#\u0022){while(el \u0026\u0026 g \u003C multi){if(el.id !== newTag){g\u002B\u002B;el=el.parentNode;}else{return el;}}}\r\n};","TestCases":[{"Name":"parentElement","Code":"for(i=0;i\u003C1000;i\u002B\u002B){\r\n console.log(class17[0].parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement);\r\n}","IsDeferred":false},{"Name":"closestParent","Code":"for(i=0;i\u003C1000;i\u002B\u002B){\r\n console.log(class17[0].closestParent(\u0022.1\u0022, 99));\r\n}","IsDeferred":false}]}