U: demo crawling-web-pages

This commit is contained in:
杨红岩 2024-04-23 22:00:17 +08:00
parent e63bdffc8c
commit 44169fa36f

View File

@ -317,7 +317,13 @@ func (m *Energy) listen() {
})
m.chromium.SetOnTitleChange(func(sender lcl.IObject, browser *cef.ICefBrowser, title string) {
if m.window != nil {
m.window.SetTitle(title)
if m.window.IsLCL() {
cef.RunOnMainThread(func() {
m.window.SetTitle(title)
})
} else {
m.window.SetTitle(title)
}
}
})
m.chromium.SetOnLoadingProgressChange(func(sender lcl.IObject, browser *cef.ICefBrowser, progress float64) {