wxWebView questions

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
User avatar
Experienced Solver
Experienced Solver
Posts: 74
Joined: Thu May 26, 2016 9:19 pm

wxWebView questions

Post by bsenftner » Mon Apr 13, 2020 6:01 pm

I've started using wxWebView to create interactive help panels in my applications. I'm running wxWidgets 3.1.2, and am thinking of moving to version 3.1.3; developing in Win10 and deploying to Win64 and Ubuntu. If anyone can answer a few questions about working with a wxWebView, their information would be very appreciated:

I've noticed the online documentation for wxWebView describes EnableAccessToDevTools(), which is not available in the latest wxWebView headers. Is the source the latest documentation for the current wxWebView? Is there another location (maintainer's blog?) that is more current?

Under Windows, I see the current wxWebView has a wxWebViewBackendIE defined - is this IE with Chromium or some other, perhaps Trident, engine? Is the IE backend the same as requesting the default browser?

Has anyone blogged about using a wxWebView? Perhaps discussed interactively communicating with JavaScript, using the events and maintaining the backend's internal process loop? I've noticed content in a webView will "run" as expected, such as gif animations play and the simple JavaScript DOM manipulating functions I've tried work. But with limitations; is there any documentation of what does or does not work in the browser engine?

Following a discussion of using the wxWebView Title Changed Event to communicate mouse clicks to the C++ app, I noticed that receiving the Title Changed Event causes the wxWebView loop (playing gifs and running js) to halt. How would one write code that receives such wxWebView events without halting the wxWebView internal loop? (That discussion about communications is: viewtopic.php?t=38315)

Is the wxWebViewChromium project still relevant? I have read that changes may be pending with Chromium as the backend of Edge, but I don't really follow the browser war soap opera. What's the state of the backends for wxWebView?

Part Of The Furniture
Part Of The Furniture
Posts: 2512
Joined: Sun Jan 03, 2010 5:45 pm

Re: wxWebView questions

Post by PB » Mon Apr 13, 2020 6:13 pm

Just a few answers relevant to 3.1.3: The only wxWebView on MSW is wxWebViewIE, based on the good old Internet Explorer (there is no Chromium-based Internet Explorer), see wxWebViewIE::MSWSetEmulationLevel().

As you can see in the docs, wxWebView::EnableAccessToDevTools() is only for a new MSW wxWebView backend for Chromium-based Microsoft Edge, available since 3.1.4 (with some limitations). See the back ends description at https://docs.wxwidgets.org/trunk/classwx_web_view.html

The implementation of the multiplatform Chromium-based wxWebViewChromium has been on hold for years, the most recent attempt is here

Post Reply