function getSourceAsDOM(url) {
xmlhttp=new XMLHttpRequest();
xmlhttp.open("GET",url,false);
xmlhttp.send();
parser=new DOMParser();
return parser.parseFromString(xmlhttp.responseText,"text/html");
}
I use this function to get the html of a web page via link.
I want to search it for a specific div. how do i do it?
I tried element.querySelectorAll('.nameOfClass')
but i get NodeList[] with 0 elements.
if I console.log() it i get #document