Get HTML of page with awesomium

awesomium, c++, html

Solution

Using Javascript you can do it like this:

web_view->ExecuteJavascriptWithResult("document.getElementsByTagName('html')[0].innerHTML"); 

also you can use:

web_view->CopyHTML();

and then get `HTML` from the clipboard. I am not sure if there is another way of getting `HTML` without using Javascript.

Problem

How do I get the HTML of a web page in awesomium with C++? I've searched and apparently you can only do it with webcontrol in C# or in Java. Using the sample hello I tried doing: ``` JSValue theVal( view->ExecuteJavascriptWithResult(WSLit("document.getElementsByTagName('html')[0].innerHTML"),WSLit(""))); ``` but it does not work. any ideas? and please in c++ as i am aware that you can do this in C# and Java.

Original source