Documentation
¶
Index ¶
- type ProxyWebView
- func (v *ProxyWebView) GetClient() srpc.Client
- func (v *ProxyWebView) GetDocumentId() string
- func (v *ProxyWebView) GetId() string
- func (v *ProxyWebView) GetParentId() string
- func (v *ProxyWebView) GetPermanent() bool
- func (v *ProxyWebView) Remove(ctx context.Context) error
- func (v *ProxyWebView) ResetWebView(ctx context.Context) error
- func (v *ProxyWebView) SetHtmlLinks(ctx context.Context, req *web_view.SetHtmlLinksRequest) (*web_view.SetHtmlLinksResponse, error)
- func (v *ProxyWebView) SetRenderMode(ctx context.Context, req *web_view.SetRenderModeRequest) (*web_view.SetRenderModeResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProxyWebView ¶
type ProxyWebView struct {
// contains filtered or unexported fields
}
ProxyWebView is a WebView which proxies requests to the RPC client.
func NewProxyWebView ¶
func NewProxyWebView( ctx context.Context, id, parent, document string, permanent bool, client srpc.Client, view web_view.SRPCWebViewClient, ) *ProxyWebView
NewProxyWebView constructs a new ProxyWebView.
func NewProxyWebViewViaAccess ¶
func NewProxyWebViewViaAccess( ctx context.Context, id, parent, document string, permanent bool, accessClient web_view.SRPCAccessWebViewsClient, ) *ProxyWebView
NewProxyWebViewViaAccess builds a ProxyWebView which accesses the WebView via an AccessWebViews service.
func (*ProxyWebView) GetClient ¶
func (v *ProxyWebView) GetClient() srpc.Client
GetClient returns the RPC client for WebView and other services.
func (*ProxyWebView) GetDocumentId ¶
func (v *ProxyWebView) GetDocumentId() string
GetDocumentId returns the id of the parent WebDocument. May be empty.
func (*ProxyWebView) GetId ¶
func (v *ProxyWebView) GetId() string
GetId returns the web view identifier.
func (*ProxyWebView) GetParentId ¶
func (v *ProxyWebView) GetParentId() string
GetParentId returns the id of the parent web view (if any)
func (*ProxyWebView) GetPermanent ¶
func (v *ProxyWebView) GetPermanent() bool
GetPermanent returns if the web view is not removable.
func (*ProxyWebView) Remove ¶
func (v *ProxyWebView) Remove(ctx context.Context) error
Remove shuts down the WebView and closes the window/tab if possible. Returns ErrWebViewPermanent if the view cannot be closed. Returns context.Canceled if ctx is canceled (but still processes the op) Note: browser windows not created by CreateWebView cannot be closed.
func (*ProxyWebView) ResetWebView ¶
func (v *ProxyWebView) ResetWebView(ctx context.Context) error
ResetWebView resets the web view to the initial state.
func (*ProxyWebView) SetHtmlLinks ¶
func (v *ProxyWebView) SetHtmlLinks( ctx context.Context, req *web_view.SetHtmlLinksRequest, ) (*web_view.SetHtmlLinksResponse, error)
SetHtmlLinks updates the list of HtmlLink on the WebView.
func (*ProxyWebView) SetRenderMode ¶
func (v *ProxyWebView) SetRenderMode( ctx context.Context, req *web_view.SetRenderModeRequest, ) (*web_view.SetRenderModeResponse, error)
SetRenderMode updates the RenderMode of the WebView.