简体   繁体   中英

Webbrowser control to run in latest IE version

I have a problem where we need to run webbrowser control to run in system installed IE version.

Have already studied the pats recommendations for fixing it via reg key. https://blogs.msdn.microsoft.com/patricka/2015/01/12/controlling-webbrowser-control-compatibility/

However cant use the FEATURE_BROWSER_EMULATION Registry Key as it will affect previous versions of my application.

Since i am not in control of the site which is being loaded, is it possible to add the compatibility meta tag from with in the code.

<meta http-equiv=”X-UA-Compatible” content=”IE=edge”>

Please recommend if any one has tried it before.

Yes , there are multiple choices available. But handling for all the sites is not suited as it will conflict with there individual implementation. Few options listed below : • InsertAdjacentHTML • put_innerHTML • use IHTMLMetaElement reference for run time meta element creation. • htmldoc's Write() which overwrites the entire body. • On DocumentComplete event insert by creating new element in HTML

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM