Hi,
You can actually use JSON to parse the text:
uses
JSON;
procedure TForm48.Button1Click(Sender: TObject);
begin
AdvWebBrowser1.ExecuteJavascript('function GetHTML(){return unescape(document.documentElement.innerHTML);} GetHTML();',
procedure(const AValue: string)
begin
memo1.Lines.Text := TJSONObject.ParseJSONValue(AValue).Value;
end
);
end;
We are working on a Demo, and are expanding our documentation, however, we cannot cover every piece of JavaScript code. The browser itself also doesn't expose a way to access the DOM. If that is possible, then JavaScript wouldn't be necessary to get the inner HTML of the document.