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
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 int
WindowState The state of the browser window.
const ( WindowStateNotSet WindowState = iota WindowStateNormal WindowStateMinimized WindowStateMaximized WindowStateFullscreen )
WindowState as enums.
func (WindowState) MarshalJSON ¶
func (e WindowState) MarshalJSON() ([]byte, error)
MarshalJSON encodes enum into a string or null when not set.
func (WindowState) String ¶
func (e WindowState) String() string
func (*WindowState) UnmarshalJSON ¶
func (e *WindowState) UnmarshalJSON(data []byte) error
UnmarshalJSON decodes a string value into a enum.