MCPcopy Index your code
hub / github.com/lxn/walk / URL

Method URL

webview.go:224–238  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

222}
223
224func (wv *WebView) URL() (url string, err error) {
225 err = wv.withWebBrowser2(func(webBrowser2 *win.IWebBrowser2) error {
226 var urlBstr *uint16 /*BSTR*/
227 if hr := webBrowser2.Get_LocationURL(&urlBstr); win.FAILED(hr) {
228 return errorFromHRESULT("IWebBrowser2.Get_LocationURL", hr)
229 }
230 defer win.SysFreeString(urlBstr)
231
232 url = win.BSTRToString(urlBstr)
233
234 return nil
235 })
236
237 return
238}
239
240func (wv *WebView) SetURL(url string) error {
241 return wv.withWebBrowser2(func(webBrowser2 *win.IWebBrowser2) error {

Callers 2

NewWebViewFunction · 0.95
mainFunction · 0.45

Calls 2

withWebBrowser2Method · 0.95
errorFromHRESULTFunction · 0.85

Tested by

no test coverage detected