Search code examples
c#proxytorgeckofx

display html in geckofx


How do I go about displaying a HTML source file that is in memory - held in a variable, within GeckoFX.

What I want to do is download a webpage using WebClient and display the resultant HTML in GeckoFX.

I know I can use Geckofx.Navigate ... but the proxy settings for Tor are not working properly and this will do as a fudge until I get the proxy stuff working properly.


Solution

  • geckofx 21.0-0.2 has a new method GeckoWebBrowser::LoadHtml(string content, string url) you could try that.

    If this doesn't work the way you want then, as suggested by John Hatton, save to a temp file on disk. (Just be careful you don't delete the file before the navigation has finished. The Geckofx.Navigate method is asynchronous.)