sciter-sdk / go-sciter

Golang bindings of Sciter: the Embeddable HTML/CSS/script engine for modern UI development
https://sciter.com
2.57k stars 268 forks source link

不使用tiscript,使用go代码,可否动态更新html元素 #164

Closed bishen closed 6 years ago

bishen commented 6 years ago

func main() { w, err := window.New(sciter.SW_TITLEBAR|sciter.SW_RESIZEABLE|sciter.SW_CONTROLS|sciter.SW_MAIN|sciter.SW_ENABLE_DEBUG, nil) if err != nil { log.Fatal(err) } // log.Printf("handle: %v", w.Handle) w.LoadFile("1.html") w.SetTitle("test")

root, err := w.GetRootElement()
if err != nil {
    log.Panicln(err)
}

w.Show() w.Run() // 已经运行了, // 后面可否在动态更新 html node el, _ := root.SelectById("gradient-rotated") el.SetText("00000000") w.UpdateWindow() // 无用 w.Show() w.Run() }

pravic commented 6 years ago

Could you translate to English?

maojindao55 commented 5 years ago

@bishen 解决了吗?