I am experiencing Javascript errors with TWebbrowser due to the fact that TWebbrowser is running in IE7 compatibility mode.
Is there a way to prevent this and just have it run in IE9 mode?
So, for example, if you wish to make the simplest possible change you would add the following registry setting:
HKEY_LOCAL_MACHINE (or HKEY_CURRENT_USER) SOFTWARE Microsoft Internet Explorer Main FeatureControl FEATURE_BROWSER_EMULATION YourExeNameGoesHere.exe = (DWORD) 00009999
The documentation for the value 9999
says:
9999 Windows Internet Explorer 9. Webpages are displayed in IE9 Standards mode, regardless of the !DOCTYPE directive.
Were you to use 9000
then you'd need also to modify the DOCTYPE of your document:
9000 Internet Explorer 9. Webpages containing standards-based !DOCTYPE directives are displayed in IE9 mode. Default value for Internet Explorer 9.
The linked documentation also includes the information required to specify other IE versions.
include in html, " http-equiv="X-UA-Compatible" content="IE=edge"
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" http-equiv="X-UA-Compatible" content="IE=edge" />
</head>
<body>
your code ....
</body>
</html>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With