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

Method SetURL

webview.go:240–252  ·  view source on GitHub ↗
(url string)

Source from the content-addressed store, hash-verified

238}
239
240func (wv *WebView) SetURL(url string) error {
241 return wv.withWebBrowser2(func(webBrowser2 *win.IWebBrowser2) error {
242 urlBstr := win.StringToVariantBSTR(url)
243 flags := win.IntToVariantI4(0)
244 targetFrameName := win.StringToVariantBSTR("_self")
245
246 if hr := webBrowser2.Navigate2(urlBstr, flags, targetFrameName, nil, nil); win.FAILED(hr) {
247 return errorFromHRESULT("IWebBrowser2.Navigate2", hr)
248 }
249
250 return nil
251 })
252}
253
254func (wv *WebView) URLChanged() *Event {
255 return wv.urlChangedPublisher.Event()

Callers 4

NewWebViewFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95
NewMainWinFunction · 0.80

Calls 2

withWebBrowser2Method · 0.95
errorFromHRESULTFunction · 0.85

Tested by

no test coverage detected