Exemplo n.º 1
0
// LoadHTML loads the given content string with the specified baseURI. The MIME
// type of the document will be "text/html".
//
// See also: webkit_web_view_load_html at
// http://webkitgtk.org/reference/webkit2gtk/stable/WebKitWebView.html#webkit-web-view-load-html
func (v *WebView) LoadHTML(content, baseURI string) {
	cContent := C.CString(content)
	defer C.free(unsafe.Pointer(cContent))
	cBaseURI := C.CString(baseURI)
	defer C.free(unsafe.Pointer(cBaseURI))
	C.webkit_web_view_load_html(v.webView, (*C.gchar)(cContent), (*C.gchar)(cBaseURI))
}
Exemplo n.º 2
0
// LoadHTML loads the given content string with the specified baseURI. The MIME
// type of the document will be "text/html".
//
// See also: webkit_web_view_load_html at
// http://webkitgtk.org/reference/webkit2gtk/stable/WebKitWebView.html#webkit-web-view-load-html
func (v *WebView) LoadHTML(content, baseURI string) {
	C.webkit_web_view_load_html(v.webView, (*C.gchar)(C.CString(content)), (*C.gchar)(C.CString(baseURI)))
}