Obviously modifying it would be out of the question.
But you would think just reading it should not be a problem?
If i have my .js running on someone's system and I want to analyze the DOM of another URL , client side, is there a way to do this?
Something simple like pull the title tag or pull the url...maybe load the site into an iframe to accomplish this?
You can do this using xmlhttp
function getSourceAsDOM(url)
{
xmlhttp=new XMLHttpRequest();
xmlhttp.open("GET",url,false);
xmlhttp.send();
parser=new DOMParser();
return parser.parseFromString(xmlhttp.responseText,"text/html");
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With