Documentation ¶
Overview ¶
Package overlay implements the Overlay domain. This domain provides various functionality related to drawing atop the inspected page.
Index ¶
- func NewClient(conn *rpcc.Conn) *domainClient
- type GetHighlightObjectForTestArgs
- type GetHighlightObjectForTestReply
- type HighlightConfig
- type HighlightFrameArgs
- type HighlightNodeArgs
- func (a *HighlightNodeArgs) SetBackendNodeID(backendNodeID dom.BackendNodeID) *HighlightNodeArgs
- func (a *HighlightNodeArgs) SetNodeID(nodeID dom.NodeID) *HighlightNodeArgs
- func (a *HighlightNodeArgs) SetObjectID(objectID runtime.RemoteObjectID) *HighlightNodeArgs
- func (a *HighlightNodeArgs) SetSelector(selector string) *HighlightNodeArgs
- type HighlightQuadArgs
- type HighlightRectArgs
- type InspectMode
- type InspectModeCanceledClient
- type InspectModeCanceledReply
- type InspectNodeRequestedClient
- type InspectNodeRequestedReply
- type NodeHighlightRequestedClient
- type NodeHighlightRequestedReply
- type ScreenshotRequestedClient
- type ScreenshotRequestedReply
- type SetInspectModeArgs
- type SetPausedInDebuggerMessageArgs
- type SetShowAdHighlightsArgs
- type SetShowDebugBordersArgs
- type SetShowFPSCounterArgs
- type SetShowHitTestBordersArgs
- type SetShowLayoutShiftRegionsArgs
- type SetShowPaintRectsArgs
- type SetShowScrollBottleneckRectsArgs
- type SetShowViewportSizeOnResizeArgs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GetHighlightObjectForTestArgs ¶
type GetHighlightObjectForTestArgs struct { NodeID dom.NodeID `json:"nodeId"` // Id of the node to get highlight object for. IncludeDistance *bool `json:"includeDistance,omitempty"` // Whether to include distance info. }
GetHighlightObjectForTestArgs represents the arguments for GetHighlightObjectForTest in the Overlay domain.
func NewGetHighlightObjectForTestArgs ¶
func NewGetHighlightObjectForTestArgs(nodeID dom.NodeID) *GetHighlightObjectForTestArgs
NewGetHighlightObjectForTestArgs initializes GetHighlightObjectForTestArgs with the required arguments.
func (*GetHighlightObjectForTestArgs) SetIncludeDistance ¶ added in v0.23.2
func (a *GetHighlightObjectForTestArgs) SetIncludeDistance(includeDistance bool) *GetHighlightObjectForTestArgs
SetIncludeDistance sets the IncludeDistance optional argument. Whether to include distance info.
type GetHighlightObjectForTestReply ¶
type GetHighlightObjectForTestReply struct {
Highlight json.RawMessage `json:"highlight"` // Highlight data for the node.
}
GetHighlightObjectForTestReply represents the return values for GetHighlightObjectForTest in the Overlay domain.
type HighlightConfig ¶
type HighlightConfig struct { ShowInfo *bool `json:"showInfo,omitempty"` // Whether the node info tooltip should be shown (default: false). ShowStyles *bool `json:"showStyles,omitempty"` // Whether the node styles in the tooltip (default: false). ShowRulers *bool `json:"showRulers,omitempty"` // Whether the rulers should be shown (default: false). ShowExtensionLines *bool `json:"showExtensionLines,omitempty"` // Whether the extension lines from node to the rulers should be shown (default: false). ContentColor *dom.RGBA `json:"contentColor,omitempty"` // The content box highlight fill color (default: transparent). PaddingColor *dom.RGBA `json:"paddingColor,omitempty"` // The padding highlight fill color (default: transparent). BorderColor *dom.RGBA `json:"borderColor,omitempty"` // The border highlight fill color (default: transparent). MarginColor *dom.RGBA `json:"marginColor,omitempty"` // The margin highlight fill color (default: transparent). EventTargetColor *dom.RGBA `json:"eventTargetColor,omitempty"` // The event target element highlight fill color (default: transparent). ShapeColor *dom.RGBA `json:"shapeColor,omitempty"` // The shape outside fill color (default: transparent). ShapeMarginColor *dom.RGBA `json:"shapeMarginColor,omitempty"` // The shape margin fill color (default: transparent). CSSGridColor *dom.RGBA `json:"cssGridColor,omitempty"` // The grid layout color (default: transparent). }
HighlightConfig Configuration data for the highlighting of page elements.
type HighlightFrameArgs ¶
type HighlightFrameArgs struct { FrameID page.FrameID `json:"frameId"` // Identifier of the frame to highlight. ContentColor *dom.RGBA `json:"contentColor,omitempty"` // The content box highlight fill color (default: transparent). ContentOutlineColor *dom.RGBA `json:"contentOutlineColor,omitempty"` // The content box highlight outline color (default: transparent). }
HighlightFrameArgs represents the arguments for HighlightFrame in the Overlay domain.
func NewHighlightFrameArgs ¶
func NewHighlightFrameArgs(frameID page.FrameID) *HighlightFrameArgs
NewHighlightFrameArgs initializes HighlightFrameArgs with the required arguments.
func (*HighlightFrameArgs) SetContentColor ¶
func (a *HighlightFrameArgs) SetContentColor(contentColor dom.RGBA) *HighlightFrameArgs
SetContentColor sets the ContentColor optional argument. The content box highlight fill color (default: transparent).
func (*HighlightFrameArgs) SetContentOutlineColor ¶
func (a *HighlightFrameArgs) SetContentOutlineColor(contentOutlineColor dom.RGBA) *HighlightFrameArgs
SetContentOutlineColor sets the ContentOutlineColor optional argument. The content box highlight outline color (default: transparent).
type HighlightNodeArgs ¶
type HighlightNodeArgs struct { HighlightConfig HighlightConfig `json:"highlightConfig"` // A descriptor for the highlight appearance. NodeID *dom.NodeID `json:"nodeId,omitempty"` // Identifier of the node to highlight. BackendNodeID *dom.BackendNodeID `json:"backendNodeId,omitempty"` // Identifier of the backend node to highlight. ObjectID *runtime.RemoteObjectID `json:"objectId,omitempty"` // JavaScript object id of the node to be highlighted. Selector *string `json:"selector,omitempty"` // Selectors to highlight relevant nodes. }
HighlightNodeArgs represents the arguments for HighlightNode in the Overlay domain.
func NewHighlightNodeArgs ¶
func NewHighlightNodeArgs(highlightConfig HighlightConfig) *HighlightNodeArgs
NewHighlightNodeArgs initializes HighlightNodeArgs with the required arguments.
func (*HighlightNodeArgs) SetBackendNodeID ¶
func (a *HighlightNodeArgs) SetBackendNodeID(backendNodeID dom.BackendNodeID) *HighlightNodeArgs
SetBackendNodeID sets the BackendNodeID optional argument. Identifier of the backend node to highlight.
func (*HighlightNodeArgs) SetNodeID ¶
func (a *HighlightNodeArgs) SetNodeID(nodeID dom.NodeID) *HighlightNodeArgs
SetNodeID sets the NodeID optional argument. Identifier of the node to highlight.
func (*HighlightNodeArgs) SetObjectID ¶
func (a *HighlightNodeArgs) SetObjectID(objectID runtime.RemoteObjectID) *HighlightNodeArgs
SetObjectID sets the ObjectID optional argument. JavaScript object id of the node to be highlighted.
func (*HighlightNodeArgs) SetSelector ¶ added in v0.22.0
func (a *HighlightNodeArgs) SetSelector(selector string) *HighlightNodeArgs
SetSelector sets the Selector optional argument. Selectors to highlight relevant nodes.
type HighlightQuadArgs ¶
type HighlightQuadArgs struct { Quad dom.Quad `json:"quad"` // Quad to highlight Color *dom.RGBA `json:"color,omitempty"` // The highlight fill color (default: transparent). OutlineColor *dom.RGBA `json:"outlineColor,omitempty"` // The highlight outline color (default: transparent). }
HighlightQuadArgs represents the arguments for HighlightQuad in the Overlay domain.
func NewHighlightQuadArgs ¶
func NewHighlightQuadArgs(quad dom.Quad) *HighlightQuadArgs
NewHighlightQuadArgs initializes HighlightQuadArgs with the required arguments.
func (*HighlightQuadArgs) SetColor ¶
func (a *HighlightQuadArgs) SetColor(color dom.RGBA) *HighlightQuadArgs
SetColor sets the Color optional argument. The highlight fill color (default: transparent).
func (*HighlightQuadArgs) SetOutlineColor ¶
func (a *HighlightQuadArgs) SetOutlineColor(outlineColor dom.RGBA) *HighlightQuadArgs
SetOutlineColor sets the OutlineColor optional argument. The highlight outline color (default: transparent).
type HighlightRectArgs ¶
type HighlightRectArgs struct { X int `json:"x"` // X coordinate Y int `json:"y"` // Y coordinate Width int `json:"width"` // Rectangle width Height int `json:"height"` // Rectangle height Color *dom.RGBA `json:"color,omitempty"` // The highlight fill color (default: transparent). OutlineColor *dom.RGBA `json:"outlineColor,omitempty"` // The highlight outline color (default: transparent). }
HighlightRectArgs represents the arguments for HighlightRect in the Overlay domain.
func NewHighlightRectArgs ¶
func NewHighlightRectArgs(x int, y int, width int, height int) *HighlightRectArgs
NewHighlightRectArgs initializes HighlightRectArgs with the required arguments.
func (*HighlightRectArgs) SetColor ¶
func (a *HighlightRectArgs) SetColor(color dom.RGBA) *HighlightRectArgs
SetColor sets the Color optional argument. The highlight fill color (default: transparent).
func (*HighlightRectArgs) SetOutlineColor ¶
func (a *HighlightRectArgs) SetOutlineColor(outlineColor dom.RGBA) *HighlightRectArgs
SetOutlineColor sets the OutlineColor optional argument. The highlight outline color (default: transparent).
type InspectMode ¶
type InspectMode string
InspectMode
const ( InspectModeNotSet InspectMode = "" InspectModeSearchForNode InspectMode = "searchForNode" InspectModeSearchForUAShadowDOM InspectMode = "searchForUAShadowDOM" InspectModeCaptureAreaScreenshot InspectMode = "captureAreaScreenshot" InspectModeShowDistances InspectMode = "showDistances" InspectModeNone InspectMode = "none" )
InspectMode as enums.
func (InspectMode) String ¶
func (e InspectMode) String() string
func (InspectMode) Valid ¶
func (e InspectMode) Valid() bool
type InspectModeCanceledClient ¶ added in v0.22.0
type InspectModeCanceledClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*InspectModeCanceledReply, error) rpcc.Stream }
InspectModeCanceledClient is a client for InspectModeCanceled events. Fired when user cancels the inspect mode.
type InspectModeCanceledReply ¶ added in v0.22.0
type InspectModeCanceledReply struct { }
InspectModeCanceledReply is the reply for InspectModeCanceled events.
type InspectNodeRequestedClient ¶
type InspectNodeRequestedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*InspectNodeRequestedReply, error) rpcc.Stream }
InspectNodeRequestedClient is a client for InspectNodeRequested events. Fired when the node should be inspected. This happens after call to `setInspectMode` or when user manually inspects an element.
type InspectNodeRequestedReply ¶
type InspectNodeRequestedReply struct {
BackendNodeID dom.BackendNodeID `json:"backendNodeId"` // Id of the node to inspect.
}
InspectNodeRequestedReply is the reply for InspectNodeRequested events.
type NodeHighlightRequestedClient ¶
type NodeHighlightRequestedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*NodeHighlightRequestedReply, error) rpcc.Stream }
NodeHighlightRequestedClient is a client for NodeHighlightRequested events. Fired when the node should be highlighted. This happens after call to `setInspectMode`.
type NodeHighlightRequestedReply ¶
NodeHighlightRequestedReply is the reply for NodeHighlightRequested events.
type ScreenshotRequestedClient ¶ added in v0.9.1
type ScreenshotRequestedClient interface { // Recv calls RecvMsg on rpcc.Stream, blocks until the event is // triggered, context canceled or connection closed. Recv() (*ScreenshotRequestedReply, error) rpcc.Stream }
ScreenshotRequestedClient is a client for ScreenshotRequested events. Fired when user asks to capture screenshot of some area on the page.
type ScreenshotRequestedReply ¶ added in v0.9.1
type ScreenshotRequestedReply struct {
Viewport page.Viewport `json:"viewport"` // Viewport to capture, in device independent pixels (dip).
}
ScreenshotRequestedReply is the reply for ScreenshotRequested events.
type SetInspectModeArgs ¶
type SetInspectModeArgs struct { Mode InspectMode `json:"mode"` // Set an inspection mode. HighlightConfig *HighlightConfig `json:"highlightConfig,omitempty"` // A descriptor for the highlight appearance of hovered-over nodes. May be omitted if `enabled == false`. }
SetInspectModeArgs represents the arguments for SetInspectMode in the Overlay domain.
func NewSetInspectModeArgs ¶
func NewSetInspectModeArgs(mode InspectMode) *SetInspectModeArgs
NewSetInspectModeArgs initializes SetInspectModeArgs with the required arguments.
func (*SetInspectModeArgs) SetHighlightConfig ¶
func (a *SetInspectModeArgs) SetHighlightConfig(highlightConfig HighlightConfig) *SetInspectModeArgs
SetHighlightConfig sets the HighlightConfig optional argument. A descriptor for the highlight appearance of hovered-over nodes. May be omitted if `enabled == false`.
type SetPausedInDebuggerMessageArgs ¶
type SetPausedInDebuggerMessageArgs struct {
Message *string `json:"message,omitempty"` // The message to display, also triggers resume and step over controls.
}
SetPausedInDebuggerMessageArgs represents the arguments for SetPausedInDebuggerMessage in the Overlay domain.
func NewSetPausedInDebuggerMessageArgs ¶
func NewSetPausedInDebuggerMessageArgs() *SetPausedInDebuggerMessageArgs
NewSetPausedInDebuggerMessageArgs initializes SetPausedInDebuggerMessageArgs with the required arguments.
func (*SetPausedInDebuggerMessageArgs) SetMessage ¶
func (a *SetPausedInDebuggerMessageArgs) SetMessage(message string) *SetPausedInDebuggerMessageArgs
SetMessage sets the Message optional argument. The message to display, also triggers resume and step over controls.
type SetShowAdHighlightsArgs ¶ added in v0.22.0
type SetShowAdHighlightsArgs struct {
Show bool `json:"show"` // True for showing ad highlights
}
SetShowAdHighlightsArgs represents the arguments for SetShowAdHighlights in the Overlay domain.
func NewSetShowAdHighlightsArgs ¶ added in v0.22.0
func NewSetShowAdHighlightsArgs(show bool) *SetShowAdHighlightsArgs
NewSetShowAdHighlightsArgs initializes SetShowAdHighlightsArgs with the required arguments.
type SetShowDebugBordersArgs ¶
type SetShowDebugBordersArgs struct {
Show bool `json:"show"` // True for showing debug borders
}
SetShowDebugBordersArgs represents the arguments for SetShowDebugBorders in the Overlay domain.
func NewSetShowDebugBordersArgs ¶
func NewSetShowDebugBordersArgs(show bool) *SetShowDebugBordersArgs
NewSetShowDebugBordersArgs initializes SetShowDebugBordersArgs with the required arguments.
type SetShowFPSCounterArgs ¶
type SetShowFPSCounterArgs struct {
Show bool `json:"show"` // True for showing the FPS counter
}
SetShowFPSCounterArgs represents the arguments for SetShowFPSCounter in the Overlay domain.
func NewSetShowFPSCounterArgs ¶
func NewSetShowFPSCounterArgs(show bool) *SetShowFPSCounterArgs
NewSetShowFPSCounterArgs initializes SetShowFPSCounterArgs with the required arguments.
type SetShowHitTestBordersArgs ¶ added in v0.21.0
type SetShowHitTestBordersArgs struct {
Show bool `json:"show"` // True for showing hit-test borders
}
SetShowHitTestBordersArgs represents the arguments for SetShowHitTestBorders in the Overlay domain.
func NewSetShowHitTestBordersArgs ¶ added in v0.21.0
func NewSetShowHitTestBordersArgs(show bool) *SetShowHitTestBordersArgs
NewSetShowHitTestBordersArgs initializes SetShowHitTestBordersArgs with the required arguments.
type SetShowLayoutShiftRegionsArgs ¶ added in v0.23.4
type SetShowLayoutShiftRegionsArgs struct {
Result bool `json:"result"` // True for showing layout shift regions
}
SetShowLayoutShiftRegionsArgs represents the arguments for SetShowLayoutShiftRegions in the Overlay domain.
func NewSetShowLayoutShiftRegionsArgs ¶ added in v0.23.4
func NewSetShowLayoutShiftRegionsArgs(result bool) *SetShowLayoutShiftRegionsArgs
NewSetShowLayoutShiftRegionsArgs initializes SetShowLayoutShiftRegionsArgs with the required arguments.
type SetShowPaintRectsArgs ¶
type SetShowPaintRectsArgs struct {
Result bool `json:"result"` // True for showing paint rectangles
}
SetShowPaintRectsArgs represents the arguments for SetShowPaintRects in the Overlay domain.
func NewSetShowPaintRectsArgs ¶
func NewSetShowPaintRectsArgs(result bool) *SetShowPaintRectsArgs
NewSetShowPaintRectsArgs initializes SetShowPaintRectsArgs with the required arguments.
type SetShowScrollBottleneckRectsArgs ¶
type SetShowScrollBottleneckRectsArgs struct {
Show bool `json:"show"` // True for showing scroll bottleneck rects
}
SetShowScrollBottleneckRectsArgs represents the arguments for SetShowScrollBottleneckRects in the Overlay domain.
func NewSetShowScrollBottleneckRectsArgs ¶
func NewSetShowScrollBottleneckRectsArgs(show bool) *SetShowScrollBottleneckRectsArgs
NewSetShowScrollBottleneckRectsArgs initializes SetShowScrollBottleneckRectsArgs with the required arguments.
type SetShowViewportSizeOnResizeArgs ¶
type SetShowViewportSizeOnResizeArgs struct {
Show bool `json:"show"` // Whether to paint size or not.
}
SetShowViewportSizeOnResizeArgs represents the arguments for SetShowViewportSizeOnResize in the Overlay domain.
func NewSetShowViewportSizeOnResizeArgs ¶
func NewSetShowViewportSizeOnResizeArgs(show bool) *SetShowViewportSizeOnResizeArgs
NewSetShowViewportSizeOnResizeArgs initializes SetShowViewportSizeOnResizeArgs with the required arguments.