I would like to run javascript on HTML generated from a C # line. (without opening a browser - only C # code)
Sort of:
string myHTML = '<div id="divTest">This is test<br/><br/></div>';
Javascript should be:
function test
{
return document.getElementById('divTest').offsetHeight;
}
What I have already tried is to check out some headless browsers like PhantomJS and Optimus, but they don't have the ability to display a string (only to open a webpage via a web address, for example http://google.com/). is it through c #?
source
share