My program creates a webview, and displays some html successfully. I have seen two bad behaviors:
If the content is not good HTML, then closing the window causes a SEGV
If the content is good HTML, closing the window is fine, but the next window I create causes a SEGV
I need to be able to create/destroy webview windows many times during my application. Is this possible?
Webview is constrained to just one function in my code, and is taken right from an example:
func displayEmail(txt string) {
// open a viewport and view it
w := webview.New(false)
defer w.Destroy()
w.SetTitle("Email View")
w.SetSize(480, 320, webview.HintNone)
w.SetHtml(txt)
w.Run()
}
There have been various changes recently in the core webview library that aim to improve this, and I believe this is now possible although it isn't an officially documented use case. See the linked PR.
Hi-
My program creates a webview, and displays some html successfully. I have seen two bad behaviors:
I need to be able to create/destroy webview windows many times during my application. Is this possible?
Webview is constrained to just one function in my code, and is taken right from an example:
func displayEmail(txt string) { // open a viewport and view it w := webview.New(false) defer w.Destroy() w.SetTitle("Email View") w.SetSize(480, 320, webview.HintNone) w.SetHtml(txt) w.Run() }