Thanks for testing it Juror, odd that it's still quirking on your system.
I found that by setting the Feature_Browser_Emulation in the host application directly worked with F5 compile
It's being set in the dll but maybe it's not working as expected when it's hosted.
Can you try this, It will set the compatibility to IE 9 which should be OK for html5
plus if you have no script set in IE that could possibly be another explanation?
Code:
PrototypeC webview_external_invoke_cb_t(*webview,arg.s)
PrototypeC webview_dispatch_fn(*webview,arg.s) ;
Structure webview_priv
hwnd.i;
*browser
is_fullscreen.i;
saved_style.l;
saved_ex_style.l;
saved_rect.RECT ;
EndStructure
Structure webview
url.s
title.s;
width.l;
height.l;
resizable.l;
nDebug.l;
*external_invoke_cb.webview_external_invoke_cb_t ;
priv.webview_priv;
*userdata;
EndStructure ;
Structure webview_dispatch_arg
*fn.webview_dispatch_fn;
*webview.webview;
*arg;
EndStructure ;
#WEBVIEW_DIALOG_TYPE_OPEN = 0
#WEBVIEW_DIALOG_TYPE_SAVE = 1
#WEBVIEW_DIALOG_TYPE_ALERT = 2
ImportC "webview.lib"
webview.l(title.s,url.s,width.l,height.l,resizable.l);
webview_init.l(*webview.webview)
webview_loop.l(*webview.webview,blocking.l);
webview_eval.l(*webview.webview,*js.p-utf8);
webview_inject_css.l(*webview.webview,css.s);
webview_set_title.l(*webview.webview,title.s);
webview_set_fullscreen(*webview.webview,fullscreen.l);
webview_set_color(*webview.webview,r.a,g.a,b.a,a.a);
webview_dialog(*webview.webview,webview_dialog_type,flags.l,title.s,arg.s,*result.string,resultsz.i);
webview_dispatch(*webview.webview,*fn.webview_dispatch_fn,*arg);
webview_terminate(*webview.webview);
webview_exit(*webview.webview);
webview_debug(format.s,*args,*args1=0,*args2=0,*args3=0,*args4=0,*args5=0,*args6=0,*args7=0,*args8=0);
webview_print_log(*s.string);
EndImport
Procedure SetFeature_Browser_Emulation()
Protected lpValueName.s,lpData.l,phkResult
lpValueName.s = GetFilePart(ProgramFilename())
lpData = $9000;11001 ;9000
If RegCreateKeyEx_(#HKEY_CURRENT_USER, "SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION", 0, #Null, #REG_OPTION_VOLATILE, #KEY_ALL_ACCESS, #Null, @phkResult, @lpdwDisposition) = #ERROR_SUCCESS
RegSetValueEx_(phkResult, lpValueName, 0, #REG_DWORD, @lpData, SizeOf(LONG))
RegCloseKey_(phkResult)
EndIf
EndProcedure
Procedure DelFeature_Browser_Emulation()
Protected phkResult,lpValueName.s
lpValueName.s = GetFilePart(ProgramFilename())
If RegOpenKeyEx_(#HKEY_CURRENT_USER, "SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION", 0, #KEY_SET_VALUE, @phkResult) = #ERROR_SUCCESS
RegDeleteValue_(phkResult, lpValueName)
RegCloseKey_(phkResult)
EndIf
EndProcedure
ProcedureC WebviewEval(*wv,*arg)
Protected *msg,input.s
input = PeekS(*arg,-1,#PB_UTF8)
*msg = UTF8("alert('You clicked " + input + "');")
;it's safe to call webview_eval now
webview_eval(*wv,*msg);
EndProcedure
ProcedureC CBExternInvoke(*wv,*arg)
;webview called this function
Debug PeekS(*arg,-1,#PB_UTF8)
;passes the function pointer to the browser which then calls the function when its ready
webview_dispatch(*wv,@webvieweval(),*arg)
EndProcedure
Global wv.webview
SetFeature_Browser_Emulation()
;if you just want to display a page, blocks until window is closed no interaction
webview("PB_WebView: Supports HTML5","https://html5up.net/hyperspace",800,600,1)
;webview("PB_WebView: Supports HTML5","http://localhost:8080",800,600,1)
dir.s = GetCurrentDirectory() ; open webview.pbi from explorer should set it
;if you want a bit more control
wv\title = "PB_WebView Demo 2 way comms"
wv\width = 800
wv\height = 600
wv\resizable = 1
wv\url = "file://" + dir + "index.html"
wv\resizable =1
wv\external_invoke_cb = @CBExternInvoke()
webview_init(@wv)
While webview_loop(@wv,1) = 0
Wend
webview_exit(@wv)
DelFeature_Browser_Emulation()