All but the main document are hidden and on initial load all those non-visible instances are not fully initialized until they are activated. ![]() In some cases like in Markdown Monster I have potentially many separate WebView instances open at the same time where each document is tied to its own WebView2 instance that stays open and ready to be interacted with. Hidden WebViews?Īt first, a hidden WebView may seem like an edge case, but in most applications I've built with the WebView, the browser usually lives on a tab that initially is not visible. In this post I describe a few scenarios where this initial visibility load prevention is causing me problems and a workaround that can mitigate this behavior. On the surface this sounds like a great optimization, as it can potentially save resources and speed up load time of some applications, especially those that display multiple WebView controls on various overlaid components like Tab controls.īut this behavior can cause many unexpected side effects, and has caused me more headaches than almost any other feature in the WebView related to load timing and startup and activation flickering. The Microsoft Edge WebView2 control has a clever 'feature' that tries to optimize load behavior, by not fully initializing the WebView until it becomes visible in the UI.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |