WebGadget; FEATURE_BROWSER_EMULATION; Windows 10;

Windows specific forum
HanPBF
Enthusiast
Enthusiast
Posts: 562
Joined: Fri Feb 19, 2010 3:42 am

WebGadget; FEATURE_BROWSER_EMULATION; Windows 10;

Post by HanPBF »

Hello!

I need help getting FEATURE_BROWSER_EMULATION running.

I have an HTA file with borwser detection.

When putting mshta.exe into registry ../Main/FeatureControl/FEATURE_BROWSER_EMULATION/mshta.exe, put

Code: Select all

<meta http-equiv="x-ua-compatible" content="ie=11">
into HTML header and start my HTA, it gives

Code: Select all

Browser name = Netscape
Full version = 5
Major version = 5
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729; rv:11.0) like Gecko
It changed the default entry to somewhat newer.

I tried this for PureBasic WebGadget like given example at http://www.purebasic.fr/english/viewtop ... ON#p505947, but no success.

Any comibnation of settings explained on https://msdn.microsoft.com/en-us/librar ... _emulation did not work.

Browser detection is always:

Code: Select all

Browser name = Microsoft Internet Explorer
Full version = 7.0
Major version = 7
navigator.appName = Microsoft Internet Explorer
navigator.userAgent = Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.2; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729)
which is old version IE7.0

Of course, IE11 is installed on system...

Is webgadget not able to use FEATURE_BROWSER_EMULATION?


Thanks for any hint!



Here the PureBasic code:

Code: Select all

EnableExplicit


declare RegisterFeatureBrowserEmulation()
declare UnRegisterFeatureBrowserEmulation()


RegisterFeatureBrowserEmulation()

If OpenWindow(0, 0, 0, 600, 300, "WebGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) 
    WebGadget(0, 10, 10, 580, 280, "file:///D:\REVIEW/HTA/Test.html") 
    
    Repeat 
    Until WaitWindowEvent() = #PB_Event_CloseWindow 
  EndIf




Procedure RegisterFeatureBrowserEmulation()
;===== Registry: temp setting to optimise web gadget: Use when Install Program ====
protected sglpValueName.s = GetFilePart(ProgramFilename());"C:\D\REVIEW\PureBasic\PureBasic_Compilation0.exe")
protected lglpData.l = 11001
protected lglpdwDisposition.l
protected igphkResult.i

If RegCreateKeyEx_(#HKEY_CURRENT_USER, "SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION", 0, #Null, #REG_OPTION_VOLATILE, #KEY_ALL_ACCESS, #Null, @igphkResult, @lglpdwDisposition) = #ERROR_SUCCESS
  RegSetValueEx_(igphkResult, sglpValueName, 0, #REG_DWORD, @lglpData, SizeOf(LONG))
  RegCloseKey_(igphkResult)
EndIf
EndProcedure

Procedure OpenHtml()
protected File2Read.s = GetCurrentDirectory() + "index.html"

OpenWindow(1, 0, 0, 0, 0, "",#PB_Window_BorderLess|#PB_Window_Maximize)
SetWindowColor(1,$660000)
WebGadget(0, 0, 0, WindowWidth(1), WindowHeight(1), File2Read)
EndProcedure

Procedure UnRegisterFeatureBrowserEmulation()
 ;==== Registry: temp setting to optimise web gadget: Use when uninstall program ====
protected sglpValueName.s = GetFilePart(ProgramFilename())
protected lglpData.l = 11001
protected lglpdwDisposition.l
protected igphkResult.i

If RegOpenKeyEx_(#HKEY_CURRENT_USER, "SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION", 0, #KEY_SET_VALUE, @igphkResult) = #ERROR_SUCCESS
  RegDeleteValue_(igphkResult, sglpValueName)
  RegCloseKey_(igphkResult)
EndIf
EndProcedure

here the html code:

Code: Select all

<!DOCTYPE html> 
<html>
	<head>
		<meta http-equiv="x-ua-compatible" content="ie=11">
		
		<script>
			function testFileCreation(){
				var fso = new ActiveXObject("Scripting.FileSystemObject");

				var a = fso.CreateTextFile("d:\\temp\\testfile.txt", true);

				a.WriteLine("This is a test.");

				a.Close();	
			}
			
			window.resizeTo(480 * 2, 320 * 2);
			
			window.onload = function (){
				TA.innerText = navigator.userAgent;
			};
			
			
			var nVer = navigator.appVersion;
var nAgt = navigator.userAgent;
var browserName  = navigator.appName;
var fullVersion  = ''+parseFloat(navigator.appVersion); 
var majorVersion = parseInt(navigator.appVersion,10);
var nameOffset,verOffset,ix;

// In Opera 15+, the true version is after "OPR/" 
if ((verOffset=nAgt.indexOf("OPR/"))!=-1) {
 browserName = "Opera";
 fullVersion = nAgt.substring(verOffset+4);
}
// In older Opera, the true version is after "Opera" or after "Version"
else if ((verOffset=nAgt.indexOf("Opera"))!=-1) {
 browserName = "Opera";
 fullVersion = nAgt.substring(verOffset+6);
 if ((verOffset=nAgt.indexOf("Version"))!=-1) 
   fullVersion = nAgt.substring(verOffset+8);
}
// In MSIE, the true version is after "MSIE" in userAgent
else if ((verOffset=nAgt.indexOf("MSIE"))!=-1) {
 browserName = "Microsoft Internet Explorer";
 fullVersion = nAgt.substring(verOffset+5);
}
// In Chrome, the true version is after "Chrome" 
else if ((verOffset=nAgt.indexOf("Chrome"))!=-1) {
 browserName = "Chrome";
 fullVersion = nAgt.substring(verOffset+7);
}
// In Safari, the true version is after "Safari" or after "Version" 
else if ((verOffset=nAgt.indexOf("Safari"))!=-1) {
 browserName = "Safari";
 fullVersion = nAgt.substring(verOffset+7);
 if ((verOffset=nAgt.indexOf("Version"))!=-1) 
   fullVersion = nAgt.substring(verOffset+8);
}
// In Firefox, the true version is after "Firefox" 
else if ((verOffset=nAgt.indexOf("Firefox"))!=-1) {
 browserName = "Firefox";
 fullVersion = nAgt.substring(verOffset+8);
}
// In most other browsers, "name/version" is at the end of userAgent 
else if ( (nameOffset=nAgt.lastIndexOf(' ')+1) < 
          (verOffset=nAgt.lastIndexOf('/')) ) 
{
 browserName = nAgt.substring(nameOffset,verOffset);
 fullVersion = nAgt.substring(verOffset+1);
 if (browserName.toLowerCase()==browserName.toUpperCase()) {
  browserName = navigator.appName;
 }
}
// trim the fullVersion string at semicolon/space if present
if ((ix=fullVersion.indexOf(";"))!=-1)
   fullVersion=fullVersion.substring(0,ix);
if ((ix=fullVersion.indexOf(" "))!=-1)
   fullVersion=fullVersion.substring(0,ix);

majorVersion = parseInt(''+fullVersion,10);
if (isNaN(majorVersion)) {
 fullVersion  = ''+parseFloat(navigator.appVersion); 
 majorVersion = parseInt(navigator.appVersion,10);
}

document.write(''
 +'Browser name  = '+browserName+'<br>'
 +'Full version  = '+fullVersion+'<br>'
 +'Major version = '+majorVersion+'<br>'
 +'navigator.appName = '+navigator.appName+'<br>'
 +'navigator.userAgent = '+navigator.userAgent+'<br>'
)

		</script>
	</head>
	<body>
		<input type="textbox" value="?"/>
		<input type="button" value="o.k."/>
		<br/>
		
		<textarea id="TA" style="width:10cm; height:5cm"></textarea>
	</body>
</html>
HanPBF
Enthusiast
Enthusiast
Posts: 562
Joined: Fri Feb 19, 2010 3:42 am

Re: WebGadget; FEATURE_BROWSER_EMULATION; Windows 10;

Post by HanPBF »

o.k. found this:
Note: The user agent string sent to the server in the request is IE 7. Be aware of this mismatch if you will also be browsing to the same content in the IE browser. The full IE browser would send an IE 11 user agent string unless the site was included in the compatibility view list. If your web page is doing browser sniffing via the user agent string, you could encounter rendering differences or errors.
I know useragent detection is not good as browser feature detection is...
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: WebGadget; FEATURE_BROWSER_EMULATION; Windows 10;

Post by JHPJHP »

Hi HanPBF,

Enhanced examples using FEATURE_BROWSER_EMULATION (previously mentioned here):
- Barcode Generator, Embed JS into PureBasic, Geolocation: Google Maps

Modifying FEATURE_BROWSER_EMULATION with one of the following values will change the output:
11001 Internet Explorer 11. Webpages are displayed in IE11 edge mode, regardless of the !DOCTYPE directive.
11000 IE11. Webpages containing standards-based !DOCTYPE directives are displayed in IE11 edge mode. Default value for IE11.
10001 Internet Explorer 10. Webpages are displayed in IE10 Standards mode, regardless of the !DOCTYPE directive.
10000 Internet Explorer 10. Webpages containing standards-based !DOCTYPE directives are displayed in IE10 Standards mode. Default value for Internet Explorer 10.
9999 Windows Internet Explorer 9. Webpages are displayed in IE9 Standards mode, regardless of the !DOCTYPE directive.
9000 Internet Explorer 9. Webpages containing standards-based !DOCTYPE directives are displayed in IE9 mode. Default value for Internet Explorer 9.
8888 Webpages are displayed in IE8 Standards mode, regardless of the !DOCTYPE directive.
8000 Webpages containing standards-based !DOCTYPE directives are displayed in IE8 mode. Default value for Internet Explorer 8
7000 Webpages containing standards-based !DOCTYPE directives are displayed in IE7 Standards mode. Default value for applications hosting the WebBrowser Control.
Try the following:

Code: Select all

Enumeration
  #MainWindow
  #WebGadget
EndEnumeration

Procedure BrowserDetection(HTML.s)
  lpValueName.s = GetFilePart(ProgramFilename()) : lpData = 11001

  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)

    If OpenWindow(#MainWindow, 0, 0, 640, 480, "Browser Detection", #PB_Window_SystemMenu | #PB_Window_ScreenCentered | #PB_Window_Invisible)
      WebGadget(#WebGadget, 0, 0, 640, 480, #Null$)
      SetWindowLongPtr_(GadgetID(#WebGadget), #GWL_STYLE, GetWindowLongPtr_(GadgetID(#WebGadget), #GWL_STYLE) | #WS_CLIPSIBLINGS)
      SetWindowPos_(GadgetID(#WebGadget), #HWND_BOTTOM, #Null, #Null, #Null, #Null, #SWP_NOSIZE | #SWP_NOMOVE)
      SetGadgetAttribute(#WebGadget, #PB_Web_BlockPopupMenu, #True)
      SetGadgetAttribute(#WebGadget, #PB_Web_BlockPopups, #True)
      WebBrowser2.IWebBrowser2 = GetWindowLongPtr_(GadgetID(#WebGadget), #GWL_USERDATA)
      WebBrowser2\put_Silent(#True)
      SetGadgetItemText(#WebGadget, #PB_Web_HtmlCode, HTML)
      StickyWindow(#MainWindow, #True) : HideWindow(#MainWindow, #False)
      Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
    EndIf

    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
  Else
    MessageRequester("Browser Detection", "Registry update failed." + #LF$ + #LF$ + "Operation cancelled.", #MB_ICONERROR)
  EndIf
EndProcedure

HTML.s = "<!DOCTYPE html>" + #LF$ +
         "<html>" + #LF$ +
         #TAB$ + "<head>" + #LF$ +
         #TAB$ + #TAB$ + "<meta http-equiv='X-UA-Compatible' content='IE=11'>" + #LF$ +
         #TAB$ + #TAB$ + "<script>" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + "window.onload=function (){" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + #TAB$ + "TA.innerText=navigator.userAgent;" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + "};" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + "var nVer=navigator.appVersion;" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + "var nAgt=navigator.userAgent;" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + "var browserName=navigator.appName;" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + "var fullVersion=''+parseFloat(navigator.appVersion);" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + "var majorVersion=parseInt(navigator.appVersion,10);" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + "var nameOffset,verOffset,ix;" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + "if ((verOffset=nAgt.indexOf('OPR/'))!=-1) {" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + #TAB$ + "browserName='Opera';" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + #TAB$ + "fullVersion=nAgt.substring(verOffset+4);" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + "}" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + "else if ((verOffset=nAgt.indexOf('Opera'))!=-1) {" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + #TAB$ + "browserName='Opera';" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + #TAB$ + "fullVersion=nAgt.substring(verOffset+6);" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + #TAB$ + "if ((verOffset=nAgt.indexOf('Version'))!=-1)" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + #TAB$ + #TAB$ + "fullVersion=nAgt.substring(verOffset+8);" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + "}" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + "else if ((verOffset=nAgt.indexOf('MSIE'))!=-1) {" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + #TAB$ + "browserName='Microsoft Internet Explorer';" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + #TAB$ + "fullVersion=nAgt.substring(verOffset+5);" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + "}" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + "else if ((verOffset=nAgt.indexOf('Chrome'))!=-1) {" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + #TAB$ + "browserName='Chrome';" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + #TAB$ + "fullVersion=nAgt.substring(verOffset+7);" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + "}" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + "else if ((verOffset=nAgt.indexOf('Safari'))!=-1) {" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + #TAB$ + "browserName='Safari';" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + #TAB$ + "fullVersion=nAgt.substring(verOffset+7);" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + #TAB$ + "if ((verOffset=nAgt.indexOf('Version'))!=-1)" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + #TAB$ + #TAB$ + "fullVersion=nAgt.substring(verOffset+8);" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + "}" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + "else if ((verOffset=nAgt.indexOf('Firefox'))!=-1) {" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + #TAB$ + "browserName='Firefox';" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + #TAB$ + "fullVersion=nAgt.substring(verOffset+8);" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + "}" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + "else if ((nameOffset=nAgt.lastIndexOf(' ')+1) < (verOffset=nAgt.lastIndexOf('/'))) {" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + #TAB$ + "browserName=nAgt.substring(nameOffset,verOffset);" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + #TAB$ + "fullVersion=nAgt.substring(verOffset+1);" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + #TAB$ + "if (browserName.toLowerCase()==browserName.toUpperCase()) {" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + #TAB$ + #TAB$ + "browserName=navigator.appName;" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + #TAB$ + "}" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + "}" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + "if ((ix=fullVersion.indexOf(';'))!=-1)" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + #TAB$ + "fullVersion=fullVersion.substring(0,ix);" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + "if ((ix=fullVersion.indexOf(' '))!=-1)" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + #TAB$ + "fullVersion=fullVersion.substring(0,ix);" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + #TAB$ + "majorVersion=parseInt(''+fullVersion,10);" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + "if (isNaN(majorVersion)) {" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + #TAB$ + "fullVersion =''+parseFloat(navigator.appVersion);" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + #TAB$ + "majorVersion=parseInt(navigator.appVersion,10);" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + "}" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + "document.write(''" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + #TAB$ + "+'Browser name = '+browserName+'<br>'" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + #TAB$ + "+'Full version = '+fullVersion+'<br>'" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + #TAB$ + "+'Major version = '+majorVersion+'<br>'" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + #TAB$ + "+'App Name = '+navigator.appName+'<br>'" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + #TAB$ + "+'User Agent = '+navigator.userAgent+'<br><br>'" + #LF$ +
         #TAB$ + #TAB$ + #TAB$ + ")" + #LF$ +
         #TAB$ + #TAB$ + "</script>" + #LF$ +
         #TAB$ + "</head>" + #LF$ +
         #TAB$ + "<body>" + #LF$ +
         #TAB$ + #TAB$ + "<textarea id='TA' style='width:10cm; height:5cm'></textarea>" + #LF$ +
         #TAB$ + "</body>" + #LF$ +
         "</html>"
BrowserDetection(HTML)
HanPBF
Enthusiast
Enthusiast
Posts: 562
Joined: Fri Feb 19, 2010 3:42 am

Re: WebGadget; FEATURE_BROWSER_EMULATION; Windows 10;

Post by HanPBF »

Thanks a lot for the great example!

Have seen a 32MB limit (at my site) for document.title.
Should be enough for some data exchange;-)

Browser emulation does work indeed.

At the moment the best way to combine PureBasic with ubiquitous web technology (for intranet).

Node.js (Electron framework) lacks debugging somewhat.

With the runtime library in PureBasic, message passing is easily done!
Seymour Clufley
Addict
Addict
Posts: 1233
Joined: Wed Feb 28, 2007 9:13 am
Location: London

Re: WebGadget; FEATURE_BROWSER_EMULATION; Windows 10;

Post by Seymour Clufley »

It looks like it is now possible to use Edge instead of Internet Explorer - but it might require PB itself to be updated, in how it sets up the Webgadget. LINK
JACK WEBB: "Coding in C is like sculpting a statue using only sandpaper. You can do it, but the result wouldn't be any better. So why bother? Just use the right tools and get the job done."
User avatar
idle
Always Here
Always Here
Posts: 5019
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: WebGadget; FEATURE_BROWSER_EMULATION; Windows 10;

Post by idle »

As far as I can see the IE version emulation of the webgadget appears to be due to which version of ComCtl32 is getting referenced in the VC build
quote from msdn
If you do not define the _WIN32_IE macro in your project, it is automatically defined as 0x0500
which results in emulation of Microsoft Internet Explorer 5.01, Microsoft Internet Explorer 5.5, and Microsoft Internet Explorer 6
defining it as /D _WIN32_IE=0x0600 should address the problem.


Try this use x86 compiler
https://www.dropbox.com/sh/ali08ef86qa2 ... 61Zra?dl=0

and does it look like this

https://html5up.net/hyperspace
Windows 11, Manjaro, Raspberry Pi OS
Image
User avatar
idle
Always Here
Always Here
Posts: 5019
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: WebGadget; FEATURE_BROWSER_EMULATION; Windows 10;

Post by idle »

Setting the Feature Browser Emulation to $9000 should be ok for html5
Not sure what would happen if people didn't have IE11 on their system
Windows 11, Manjaro, Raspberry Pi OS
Image
HanPBF
Enthusiast
Enthusiast
Posts: 562
Joined: Fri Feb 19, 2010 3:42 am

Re: WebGadget; FEATURE_BROWSER_EMULATION; Windows 10;

Post by HanPBF »

For a correct browser plugin You can use Sciter (https://sciter.com).

The help from JHPJHP is still great!
User avatar
idle
Always Here
Always Here
Posts: 5019
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: WebGadget; FEATURE_BROWSER_EMULATION; Windows 10;

Post by idle »

HanPBF wrote:For a correct browser plugin You can use Sciter (https://sciter.com).

The help from JHPJHP is still great!
Have you ported the interface to sciter? It's a great looking lib.
If I don't succeed with the webgadget or webview lib I'll end up porting sciter
much rather than than CEF 5mb vs 20mb dependency
Windows 11, Manjaro, Raspberry Pi OS
Image
The8th
User
User
Posts: 29
Joined: Fri Sep 04, 2015 10:23 am

Re: WebGadget; FEATURE_BROWSER_EMULATION; Windows 10;

Post by The8th »

Hello idle,

I tried your WebView example (#WIN32_IE = $600) with the URLs listed on
https://sdr.hu/

But I am sorry, it does not bring along any browser emulation which supports the Edge HTML5 renderer.
All webpages report this:
Browser doesn't support WebAudio:
Mozilla/5.0 (Windows NT 6.2; WOW64; Trident/7.0; rv:11.0) like Gecko
Please update to the latest version of your browser.


It's just the same as with the original Purebasic WebGadget.

Henry
JHPJHP
Addict
Addict
Posts: 2129
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: WebGadget; FEATURE_BROWSER_EMULATION; Windows 10;

Post by JHPJHP »

Hi idle,

This is really great (like all your contributions), I look forward to your HTML5 IE Gadget.

------------------------------------------------

Hi The8th,

See the following site to test HTML5 compatibility: HTML5test.
User avatar
idle
Always Here
Always Here
Posts: 5019
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: WebGadget; FEATURE_BROWSER_EMULATION; Windows 10;

Post by idle »

The8th

Sorry I haven't uploaded the fixed version yet and it's only a test at the moment.
odd thing was it was trying to set the feature emulation from within the dll but it doesn't work
and didn't produce an error either.


JHPJHP

Thanks, I don't contribute a 10th of what you do, your effort and commitment are great.
I'll get around to making webview it into a gadget soon but am currently working on another lib
which will utilize either webview, webgadget or sciter.
Windows 11, Manjaro, Raspberry Pi OS
Image
The8th
User
User
Posts: 29
Joined: Fri Sep 04, 2015 10:23 am

Re: WebGadget; FEATURE_BROWSER_EMULATION; Windows 10;

Post by The8th »

Thanks for all your work, idle.
I tried with your current version, but the result is still the same. Except that a different user agent is detected now.
But HTML5 WebAudio still does not work.

Browser doesn't support WebAudio:
Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/17.9200

Please update to the latest version of your browser.


Henry
User avatar
idle
Always Here
Always Here
Posts: 5019
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: WebGadget; FEATURE_BROWSER_EMULATION; Windows 10;

Post by idle »

The8th wrote:Hello idle,

I tried your WebView example (#WIN32_IE = $600) with the URLs listed on
https://sdr.hu/

But I am sorry, it does not bring along any browser emulation which supports the Edge HTML5 renderer.
All webpages report this:
Browser doesn't support WebAudio:
Mozilla/5.0 (Windows NT 6.2; WOW64; Trident/7.0; rv:11.0) like Gecko
Please update to the latest version of your browser.


It's just the same as with the original Purebasic WebGadget.

Henry
Sorry didn't notice that, it won't do webaudio, the trident IE component only meets half of html5 specifications.
Windows 11, Manjaro, Raspberry Pi OS
Image
Post Reply