FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour WebView and HTML file
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
WebView and HTML file
Posted: Sat May 10, 2025 05:04 AM
Hi,

There is a file tb.html (https://cloud.mail.ru/public/56wz/UMMJiRWaR)
Try to open it in webview2
#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?
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: WebView and HTML file
Posted: Sat May 10, 2025 06:14 AM
The file is over 65K :(
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: WebView and HTML file
Posted: Sat May 10, 2025 08:44 AM

Please open OpenDevToolsWindow() and check the logs

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: WebView and HTML file
Posted: Sat May 10, 2025 09:54 AM

Thanks !

Continue the discussion