Page 1 of 1

WebView and HTML file

Posted: Sat May 10, 2025 5:04 am
by Natter
Hi,

There is a file tb.html (https://cloud.mail.ru/public/56wz/UMMJiRWaR)
Try to open it in webview2

Code: Select all | Expand

#include "FiveWin.ch"

function Main()
local oWebView := TWebView():New()

   oWebView:SetHTML(memoread("tb.html"))
   oWebView:SetTitle( "Microsoft Edge WebView working from FWH" )
   oWebView:SetSize( 1200, 800 )
   oWebView:SetUserAgent( "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.53 Mobile Safari/537.36" )
   sleep( 300 )
   oWebView:Run()
   oWebView:Destroy()

return nil
However, I get an empty window. Why?

Re: WebView and HTML file

Posted: Sat May 10, 2025 6:14 am
by Natter
The file is over 65K :(

Re: WebView and HTML file

Posted: Sat May 10, 2025 8:44 am
by Antonio Linares
Please open OpenDevToolsWindow() and check the logs

Re: WebView and HTML file

Posted: Sat May 10, 2025 9:54 am
by Natter
Thanks !