WebHTMLViewer with local HTML

I have a standalone web app that creates (locally, in a temp file) an HTML page.

Is there some way to show that HTML in a WebHTMLViewer? Some other approach is also OK, not necessarily wedded to WebHTMLViewer.

If this were a CGI app, I could just have a control do a showURL, and Apache (or whatever the web host is) would take care of it. But I don’t have a web server on this particular host, and I can’t install one.

I’ve tried making a URL like “file:///tmp/foobar.html” but that doesn’t work.

Any suggestions? Thanks!

Xojo 2017r1.1, MacOS El Capitan

The documentation for WebFile says it has a URL property.
You can probably use that to display the WebFile in the HTMLViewer.
I’m not able to test this theory at the moment.

Hi Tim,

Brilliant!

For those looking for this answer, the magic sauce is:

Sub ShowLocalHTMLfile(f As FolderItem) If f <> nil Then Session.reportFile = WebFile.Open(f) If Session.reportFile <> nil Then ReportPage.HTMLViewer1.URL = Session.reportFile.URL // ReportPage is a WebPage containing an HTMLViewer ReportPage.Show End If End Sub

Thanks!