Documentation ¶
Overview ¶
Package browser implements the Browser domain. The Browser domain defines methods and events for browser managing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Bounds ¶
type Bounds struct { Left *int `json:"left,omitempty"` // The offset from the left edge of the screen to the window in pixels. Top *int `json:"top,omitempty"` // The offset from the top edge of the screen to the window in pixels. Width *int `json:"width,omitempty"` // The window width in pixels. Height *int `json:"height,omitempty"` // The window height in pixels. WindowState WindowState `json:"windowState,omitempty"` // The window state. Default to normal. }
Bounds Browser window bounds information
Note: This type is experimental.
type GetVersionReply ¶ added in v0.11.1
type GetVersionReply struct { ProtocolVersion string `json:"protocolVersion"` // Protocol version. Product string `json:"product"` // Product name. Revision string `json:"revision"` // Product revision. UserAgent string `json:"userAgent"` // User-Agent. JsVersion string `json:"jsVersion"` // V8 version. }
GetVersionReply represents the return values for GetVersion in the Browser domain.
type GetWindowBoundsArgs ¶
type GetWindowBoundsArgs struct {
WindowID WindowID `json:"windowId"` // Browser window id.
}
GetWindowBoundsArgs represents the arguments for GetWindowBounds in the Browser domain.
func NewGetWindowBoundsArgs ¶
func NewGetWindowBoundsArgs(windowID WindowID) *GetWindowBoundsArgs
NewGetWindowBoundsArgs initializes GetWindowBoundsArgs with the required arguments.
type GetWindowBoundsReply ¶
type GetWindowBoundsReply struct {
Bounds Bounds `json:"bounds"` // Bounds information of the window. When window state is 'minimized', the restored window position and size are returned.
}
GetWindowBoundsReply represents the return values for GetWindowBounds in the Browser domain.
type GetWindowForTargetArgs ¶
type GetWindowForTargetArgs struct {
TargetID target.ID `json:"targetId"` // Devtools agent host id.
}
GetWindowForTargetArgs represents the arguments for GetWindowForTarget in the Browser domain.
func NewGetWindowForTargetArgs ¶
func NewGetWindowForTargetArgs(targetID target.ID) *GetWindowForTargetArgs
NewGetWindowForTargetArgs initializes GetWindowForTargetArgs with the required arguments.
type GetWindowForTargetReply ¶
type GetWindowForTargetReply struct { WindowID WindowID `json:"windowId"` // Browser window id. Bounds Bounds `json:"bounds"` // Bounds information of the window. When window state is 'minimized', the restored window position and size are returned. }
GetWindowForTargetReply represents the return values for GetWindowForTarget in the Browser domain.
type SetWindowBoundsArgs ¶
type SetWindowBoundsArgs struct { WindowID WindowID `json:"windowId"` // Browser window id. Bounds Bounds `json:"bounds"` // New window bounds. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined with 'left', 'top', 'width' or 'height'. Leaves unspecified fields unchanged. }
SetWindowBoundsArgs represents the arguments for SetWindowBounds in the Browser domain.
func NewSetWindowBoundsArgs ¶
func NewSetWindowBoundsArgs(windowID WindowID, bounds Bounds) *SetWindowBoundsArgs
NewSetWindowBoundsArgs initializes SetWindowBoundsArgs with the required arguments.
type WindowState ¶
type WindowState string
WindowState The state of the browser window.
Note: This type is experimental.
const ( WindowStateNotSet WindowState = "" WindowStateNormal WindowState = "normal" WindowStateMinimized WindowState = "minimized" WindowStateMaximized WindowState = "maximized" WindowStateFullscreen WindowState = "fullscreen" )
WindowState as enums.
func (WindowState) String ¶
func (e WindowState) String() string
func (WindowState) Valid ¶
func (e WindowState) Valid() bool