How to adapt the height of a wx.html2.WebView to its contents?
I found a hack that works : I inject javascript that on document load navigates to "size:"+document.body.scrollHeight
Then, I bind to the event EVT_WEBVIEW_NAVIGATING, veto it and use the URL from the event to get the height and set the WebView height to it.
I'm trying to make a wx.html2.WebView high enough that its contents don't need to be scrolled.
I tried using javascript in RunScript to detect that document height is larger than window height, but it won't work on some backends, for which RunScript does not return results.
Can I detect scrollbars on the WebView from Python to adapt the height ? Is there another way ?