Example #1
0
File: webkit.go Project: zackb/code
func getHtml(webview *webkit.WebView) string {
	js := "document.title=document.documentElement.outerHTML"
	webview.ExecuteScript(js)
	str := webview.GetMainFrame().GetTitle()
	//str := webview.GetTitle()
	return str
}
Example #2
0
File: webkit.go Project: zackb/code
func doit(webview *webkit.WebView) {
	for true {
		var url string
		fmt.Scanf("%s", &url)
		fmt.Printf("Read %s\n", url)
		//webview.LoadUri(url)
		go webview.LoadString("<html><DIV>Fooe</DIV></html>", "text/html", "utf-8", "")
		select {
		case <-c:
			fmt.Printf("DONE\n")
		}
		fmt.Printf("FFFFFFFFFFFFFF%s\n", getHtml(webview))
	}
}