0

The website use ajax to load some data.When DocumentCompleted,I only get the html code without ajax data.

How to get the ajax data through webkit.net?

Thanks.

AlphaWu
  • 181
  • 1
  • 1
  • 8

1 Answers1

0

I've just recently fought with this myself and have what should be a working solution. I've not tried it with ajax, but I have used it after creating and appending DOM elements from C# and it produces the full code where DocumentText only produces the original unmodified HTML.

var fullHTML = webKitBrowser1.StringByEvaluatingJavaScriptFromString("document.getElementsByTagName('html')[0].outerHTML")

The only limitation to this method that I've seen is that it does not include the doctype tag if there is one, but everything else is there.

Vaelek
  • 190
  • 10