gcdapi

package
v2.3.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 19, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const CHROME_CHANNEL = "unknown"

Chrome Channel information

View Source
const CHROME_VERSION = "unknown"

Chrome Version information

View Source
const DEVTOOLS_MAJOR_VERSION = "1"

Protocol Major version

View Source
const DEVTOOLS_MINOR_VERSION = "3"

Protocol Minor version

Variables

This section is empty.

Functions

This section is empty.

Types

type Accessibility

type Accessibility struct {
	// contains filtered or unexported fields
}

func NewAccessibility

func NewAccessibility(target gcdmessage.ChromeTargeter) *Accessibility

func (*Accessibility) Disable

Disables the accessibility domain.

func (*Accessibility) Enable

Enables the accessibility domain which causes `AXNodeId`s to remain consistent between method calls. This turns on accessibility for the page, which can impact performance until accessibility is disabled.

func (*Accessibility) GetAXNodeAndAncestors added in v2.2.4

func (c *Accessibility) GetAXNodeAndAncestors(ctx context.Context, nodeId int, backendNodeId int, objectId string) ([]*AccessibilityAXNode, error)

GetAXNodeAndAncestors - Fetches a node and all ancestors up to and including the root. Requires `enable()` to have been called previously. nodeId - Identifier of the node to get. backendNodeId - Identifier of the backend node to get. objectId - JavaScript object id of the node wrapper to get. Returns - nodes -

func (*Accessibility) GetAXNodeAndAncestorsWithParams added in v2.2.4

func (c *Accessibility) GetAXNodeAndAncestorsWithParams(ctx context.Context, v *AccessibilityGetAXNodeAndAncestorsParams) ([]*AccessibilityAXNode, error)

GetAXNodeAndAncestorsWithParams - Fetches a node and all ancestors up to and including the root. Requires `enable()` to have been called previously. Returns - nodes -

func (*Accessibility) GetChildAXNodes added in v2.0.7

func (c *Accessibility) GetChildAXNodes(ctx context.Context, id string, frameId string) ([]*AccessibilityAXNode, error)

GetChildAXNodes - Fetches a particular accessibility node by AXNodeId. Requires `enable()` to have been called previously. id - frameId - The frame in whose document the node resides. If omitted, the root frame is used. Returns - nodes -

func (*Accessibility) GetChildAXNodesWithParams added in v2.0.7

func (c *Accessibility) GetChildAXNodesWithParams(ctx context.Context, v *AccessibilityGetChildAXNodesParams) ([]*AccessibilityAXNode, error)

GetChildAXNodesWithParams - Fetches a particular accessibility node by AXNodeId. Requires `enable()` to have been called previously. Returns - nodes -

func (*Accessibility) GetFullAXTree

func (c *Accessibility) GetFullAXTree(ctx context.Context, depth int, frameId string) ([]*AccessibilityAXNode, error)

GetFullAXTree - Fetches the entire accessibility tree for the root Document depth - The maximum depth at which descendants of the root node should be retrieved. If omitted, the full tree is returned. frameId - The frame for whose document the AX tree should be retrieved. If omited, the root frame is used. Returns - nodes -

func (*Accessibility) GetFullAXTreeWithParams added in v2.0.7

func (c *Accessibility) GetFullAXTreeWithParams(ctx context.Context, v *AccessibilityGetFullAXTreeParams) ([]*AccessibilityAXNode, error)

GetFullAXTreeWithParams - Fetches the entire accessibility tree for the root Document Returns - nodes -

func (*Accessibility) GetPartialAXTree

func (c *Accessibility) GetPartialAXTree(ctx context.Context, nodeId int, backendNodeId int, objectId string, fetchRelatives bool) ([]*AccessibilityAXNode, error)

GetPartialAXTree - Fetches the accessibility node and partial accessibility tree for this DOM node, if it exists. nodeId - Identifier of the node to get the partial accessibility tree for. backendNodeId - Identifier of the backend node to get the partial accessibility tree for. objectId - JavaScript object id of the node wrapper to get the partial accessibility tree for. fetchRelatives - Whether to fetch this node's ancestors, siblings and children. Defaults to true. Returns - nodes - The `Accessibility.AXNode` for this DOM node, if it exists, plus its ancestors, siblings and children, if requested.

func (*Accessibility) GetPartialAXTreeWithParams

func (c *Accessibility) GetPartialAXTreeWithParams(ctx context.Context, v *AccessibilityGetPartialAXTreeParams) ([]*AccessibilityAXNode, error)

GetPartialAXTreeWithParams - Fetches the accessibility node and partial accessibility tree for this DOM node, if it exists. Returns - nodes - The `Accessibility.AXNode` for this DOM node, if it exists, plus its ancestors, siblings and children, if requested.

func (*Accessibility) GetRootAXNode added in v2.2.4

func (c *Accessibility) GetRootAXNode(ctx context.Context, frameId string) (*AccessibilityAXNode, error)

GetRootAXNode - Fetches the root node. Requires `enable()` to have been called previously. frameId - The frame in whose document the node resides. If omitted, the root frame is used. Returns - node -

func (*Accessibility) GetRootAXNodeWithParams added in v2.2.4

GetRootAXNodeWithParams - Fetches the root node. Requires `enable()` to have been called previously. Returns - node -

func (*Accessibility) QueryAXTree added in v2.0.7

func (c *Accessibility) QueryAXTree(ctx context.Context, nodeId int, backendNodeId int, objectId string, accessibleName string, role string) ([]*AccessibilityAXNode, error)

QueryAXTree - Query a DOM node's accessibility subtree for accessible name and role. This command computes the name and role for all nodes in the subtree, including those that are ignored for accessibility, and returns those that mactch the specified name and role. If no DOM node is specified, or the DOM node does not exist, the command returns an error. If neither `accessibleName` or `role` is specified, it returns all the accessibility nodes in the subtree. nodeId - Identifier of the node for the root to query. backendNodeId - Identifier of the backend node for the root to query. objectId - JavaScript object id of the node wrapper for the root to query. accessibleName - Find nodes with this computed name. role - Find nodes with this computed role. Returns - nodes - A list of `Accessibility.AXNode` matching the specified attributes, including nodes that are ignored for accessibility.

func (*Accessibility) QueryAXTreeWithParams added in v2.0.7

func (c *Accessibility) QueryAXTreeWithParams(ctx context.Context, v *AccessibilityQueryAXTreeParams) ([]*AccessibilityAXNode, error)

QueryAXTreeWithParams - Query a DOM node's accessibility subtree for accessible name and role. This command computes the name and role for all nodes in the subtree, including those that are ignored for accessibility, and returns those that mactch the specified name and role. If no DOM node is specified, or the DOM node does not exist, the command returns an error. If neither `accessibleName` or `role` is specified, it returns all the accessibility nodes in the subtree. Returns - nodes - A list of `Accessibility.AXNode` matching the specified attributes, including nodes that are ignored for accessibility.

type AccessibilityAXNode

type AccessibilityAXNode struct {
	NodeId           string                     `json:"nodeId"`                     // Unique identifier for this node.
	Ignored          bool                       `json:"ignored"`                    // Whether this node is ignored for accessibility
	IgnoredReasons   []*AccessibilityAXProperty `json:"ignoredReasons,omitempty"`   // Collection of reasons why this node is hidden.
	Role             *AccessibilityAXValue      `json:"role,omitempty"`             // This `Node`'s role, whether explicit or implicit.
	ChromeRole       *AccessibilityAXValue      `json:"chromeRole,omitempty"`       // This `Node`'s Chrome raw role.
	Name             *AccessibilityAXValue      `json:"name,omitempty"`             // The accessible name for this `Node`.
	Description      *AccessibilityAXValue      `json:"description,omitempty"`      // The accessible description for this `Node`.
	Value            *AccessibilityAXValue      `json:"value,omitempty"`            // The value for this `Node`.
	Properties       []*AccessibilityAXProperty `json:"properties,omitempty"`       // All other properties
	ParentId         string                     `json:"parentId,omitempty"`         // ID for this node's parent.
	ChildIds         []string                   `json:"childIds,omitempty"`         // IDs for each of this node's child nodes.
	BackendDOMNodeId int                        `json:"backendDOMNodeId,omitempty"` // The backend ID for the associated DOM node, if any.
	FrameId          string                     `json:"frameId,omitempty"`          // The frame ID for the frame associated with this nodes document.
}

A node in the accessibility tree.

type AccessibilityAXProperty

type AccessibilityAXProperty struct {
	Name  string                `json:"name"`  // The name of this property. enum values: busy, disabled, editable, focusable, focused, hidden, hiddenRoot, invalid, keyshortcuts, settable, roledescription, live, atomic, relevant, root, autocomplete, hasPopup, level, multiselectable, orientation, multiline, readonly, required, valuemin, valuemax, valuetext, checked, expanded, modal, pressed, selected, activedescendant, controls, describedby, details, errormessage, flowto, labelledby, owns
	Value *AccessibilityAXValue `json:"value"` // The value of this property.
}

No Description.

type AccessibilityAXRelatedNode

type AccessibilityAXRelatedNode struct {
	BackendDOMNodeId int    `json:"backendDOMNodeId"` // The BackendNodeId of the related DOM node.
	Idref            string `json:"idref,omitempty"`  // The IDRef value provided, if any.
	Text             string `json:"text,omitempty"`   // The text alternative of this node in the current context.
}

No Description.

type AccessibilityAXValue

type AccessibilityAXValue struct {
	Type         string                        `json:"type"`                   // The type of this value. enum values: boolean, tristate, booleanOrUndefined, idref, idrefList, integer, node, nodeList, number, string, computedString, token, tokenList, domRelation, role, internalRole, valueUndefined
	Value        interface{}                   `json:"value,omitempty"`        // The computed value of this property.
	RelatedNodes []*AccessibilityAXRelatedNode `json:"relatedNodes,omitempty"` // One or more related nodes, if applicable.
	Sources      []*AccessibilityAXValueSource `json:"sources,omitempty"`      // The sources which contributed to the computation of this property.
}

A single computed AX property.

type AccessibilityAXValueSource

type AccessibilityAXValueSource struct {
	Type              string                `json:"type"`                        // What type of source this is. enum values: attribute, implicit, style, contents, placeholder, relatedElement
	Value             *AccessibilityAXValue `json:"value,omitempty"`             // The value of this property source.
	Attribute         string                `json:"attribute,omitempty"`         // The name of the relevant attribute, if any.
	AttributeValue    *AccessibilityAXValue `json:"attributeValue,omitempty"`    // The value of the relevant attribute, if any.
	Superseded        bool                  `json:"superseded,omitempty"`        // Whether this source is superseded by a higher priority source.
	NativeSource      string                `json:"nativeSource,omitempty"`      // The native markup source for this value, e.g. a <label> element. enum values: description, figcaption, label, labelfor, labelwrapped, legend, rubyannotation, tablecaption, title, other
	NativeSourceValue *AccessibilityAXValue `json:"nativeSourceValue,omitempty"` // The value, such as a node or node list, of the native source.
	Invalid           bool                  `json:"invalid,omitempty"`           // Whether the value for this property is invalid.
	InvalidReason     string                `json:"invalidReason,omitempty"`     // Reason for the value being invalid, if it is.
}

A single source for a computed AX property.

type AccessibilityGetAXNodeAndAncestorsParams added in v2.2.4

type AccessibilityGetAXNodeAndAncestorsParams struct {
	// Identifier of the node to get.
	NodeId int `json:"nodeId,omitempty"`
	// Identifier of the backend node to get.
	BackendNodeId int `json:"backendNodeId,omitempty"`
	// JavaScript object id of the node wrapper to get.
	ObjectId string `json:"objectId,omitempty"`
}

type AccessibilityGetChildAXNodesParams added in v2.0.7

type AccessibilityGetChildAXNodesParams struct {
	//
	Id string `json:"id"`
	// The frame in whose document the node resides. If omitted, the root frame is used.
	FrameId string `json:"frameId,omitempty"`
}

type AccessibilityGetFullAXTreeParams added in v2.0.7

type AccessibilityGetFullAXTreeParams struct {
	// The maximum depth at which descendants of the root node should be retrieved. If omitted, the full tree is returned.
	Depth int `json:"depth,omitempty"`
	// The frame for whose document the AX tree should be retrieved. If omited, the root frame is used.
	FrameId string `json:"frameId,omitempty"`
}

type AccessibilityGetPartialAXTreeParams

type AccessibilityGetPartialAXTreeParams struct {
	// Identifier of the node to get the partial accessibility tree for.
	NodeId int `json:"nodeId,omitempty"`
	// Identifier of the backend node to get the partial accessibility tree for.
	BackendNodeId int `json:"backendNodeId,omitempty"`
	// JavaScript object id of the node wrapper to get the partial accessibility tree for.
	ObjectId string `json:"objectId,omitempty"`
	// Whether to fetch this node's ancestors, siblings and children. Defaults to true.
	FetchRelatives bool `json:"fetchRelatives,omitempty"`
}

type AccessibilityGetRootAXNodeParams added in v2.2.4

type AccessibilityGetRootAXNodeParams struct {
	// The frame in whose document the node resides. If omitted, the root frame is used.
	FrameId string `json:"frameId,omitempty"`
}

type AccessibilityLoadCompleteEvent added in v2.2.4

type AccessibilityLoadCompleteEvent struct {
	Method string `json:"method"`
	Params struct {
		Root *AccessibilityAXNode `json:"root"` // New document root node.
	} `json:"Params,omitempty"`
}

The loadComplete event mirrors the load complete event sent by the browser to assistive technology when the web page has finished loading.

type AccessibilityNodesUpdatedEvent added in v2.2.4

type AccessibilityNodesUpdatedEvent struct {
	Method string `json:"method"`
	Params struct {
		Nodes []*AccessibilityAXNode `json:"nodes"` // Updated node data.
	} `json:"Params,omitempty"`
}

The nodesUpdated event is sent every time a previously requested node has changed the in tree.

type AccessibilityQueryAXTreeParams added in v2.0.7

type AccessibilityQueryAXTreeParams struct {
	// Identifier of the node for the root to query.
	NodeId int `json:"nodeId,omitempty"`
	// Identifier of the backend node for the root to query.
	BackendNodeId int `json:"backendNodeId,omitempty"`
	// JavaScript object id of the node wrapper for the root to query.
	ObjectId string `json:"objectId,omitempty"`
	// Find nodes with this computed name.
	AccessibleName string `json:"accessibleName,omitempty"`
	// Find nodes with this computed role.
	Role string `json:"role,omitempty"`
}

type Animation

type Animation struct {
	// contains filtered or unexported fields
}

func NewAnimation

func NewAnimation(target gcdmessage.ChromeTargeter) *Animation

func (*Animation) Disable

Disables animation domain notifications.

func (*Animation) Enable

Enables animation domain notifications.

func (*Animation) GetCurrentTime

func (c *Animation) GetCurrentTime(ctx context.Context, id string) (float64, error)

GetCurrentTime - Returns the current time of the an animation. id - Id of animation. Returns - currentTime - Current time of the page.

func (*Animation) GetCurrentTimeWithParams

func (c *Animation) GetCurrentTimeWithParams(ctx context.Context, v *AnimationGetCurrentTimeParams) (float64, error)

GetCurrentTimeWithParams - Returns the current time of the an animation. Returns - currentTime - Current time of the page.

func (*Animation) GetPlaybackRate

func (c *Animation) GetPlaybackRate(ctx context.Context) (float64, error)

GetPlaybackRate - Gets the playback rate of the document timeline. Returns - playbackRate - Playback rate for animations on page.

func (*Animation) ReleaseAnimations

func (c *Animation) ReleaseAnimations(ctx context.Context, animations []string) (*gcdmessage.ChromeResponse, error)

ReleaseAnimations - Releases a set of animations to no longer be manipulated. animations - List of animation ids to seek.

func (*Animation) ReleaseAnimationsWithParams

func (c *Animation) ReleaseAnimationsWithParams(ctx context.Context, v *AnimationReleaseAnimationsParams) (*gcdmessage.ChromeResponse, error)

ReleaseAnimationsWithParams - Releases a set of animations to no longer be manipulated.

func (*Animation) ResolveAnimation

func (c *Animation) ResolveAnimation(ctx context.Context, animationId string) (*RuntimeRemoteObject, error)

ResolveAnimation - Gets the remote object of the Animation. animationId - Animation id. Returns - remoteObject - Corresponding remote object.

func (*Animation) ResolveAnimationWithParams

func (c *Animation) ResolveAnimationWithParams(ctx context.Context, v *AnimationResolveAnimationParams) (*RuntimeRemoteObject, error)

ResolveAnimationWithParams - Gets the remote object of the Animation. Returns - remoteObject - Corresponding remote object.

func (*Animation) SeekAnimations

func (c *Animation) SeekAnimations(ctx context.Context, animations []string, currentTime float64) (*gcdmessage.ChromeResponse, error)

SeekAnimations - Seek a set of animations to a particular time within each animation. animations - List of animation ids to seek. currentTime - Set the current time of each animation.

func (*Animation) SeekAnimationsWithParams

func (c *Animation) SeekAnimationsWithParams(ctx context.Context, v *AnimationSeekAnimationsParams) (*gcdmessage.ChromeResponse, error)

SeekAnimationsWithParams - Seek a set of animations to a particular time within each animation.

func (*Animation) SetPaused

func (c *Animation) SetPaused(ctx context.Context, animations []string, paused bool) (*gcdmessage.ChromeResponse, error)

SetPaused - Sets the paused state of a set of animations. animations - Animations to set the pause state of. paused - Paused state to set to.

func (*Animation) SetPausedWithParams

func (c *Animation) SetPausedWithParams(ctx context.Context, v *AnimationSetPausedParams) (*gcdmessage.ChromeResponse, error)

SetPausedWithParams - Sets the paused state of a set of animations.

func (*Animation) SetPlaybackRate

func (c *Animation) SetPlaybackRate(ctx context.Context, playbackRate float64) (*gcdmessage.ChromeResponse, error)

SetPlaybackRate - Sets the playback rate of the document timeline. playbackRate - Playback rate for animations on page

func (*Animation) SetPlaybackRateWithParams

func (c *Animation) SetPlaybackRateWithParams(ctx context.Context, v *AnimationSetPlaybackRateParams) (*gcdmessage.ChromeResponse, error)

SetPlaybackRateWithParams - Sets the playback rate of the document timeline.

func (*Animation) SetTiming

func (c *Animation) SetTiming(ctx context.Context, animationId string, duration float64, delay float64) (*gcdmessage.ChromeResponse, error)

SetTiming - Sets the timing of an animation node. animationId - Animation id. duration - Duration of the animation. delay - Delay of the animation.

func (*Animation) SetTimingWithParams

func (c *Animation) SetTimingWithParams(ctx context.Context, v *AnimationSetTimingParams) (*gcdmessage.ChromeResponse, error)

SetTimingWithParams - Sets the timing of an animation node.

type AnimationAnimation

type AnimationAnimation struct {
	Id           string                    `json:"id"`               // `Animation`'s id.
	Name         string                    `json:"name"`             // `Animation`'s name.
	PausedState  bool                      `json:"pausedState"`      // `Animation`'s internal paused state.
	PlayState    string                    `json:"playState"`        // `Animation`'s play state.
	PlaybackRate float64                   `json:"playbackRate"`     // `Animation`'s playback rate.
	StartTime    float64                   `json:"startTime"`        // `Animation`'s start time.
	CurrentTime  float64                   `json:"currentTime"`      // `Animation`'s current time.
	Type         string                    `json:"type"`             // Animation type of `Animation`.
	Source       *AnimationAnimationEffect `json:"source,omitempty"` // `Animation`'s source animation node.
	CssId        string                    `json:"cssId,omitempty"`  // A unique ID for `Animation` representing the sources that triggered this CSS animation/transition.
}

Animation instance.

type AnimationAnimationCanceledEvent

type AnimationAnimationCanceledEvent struct {
	Method string `json:"method"`
	Params struct {
		Id string `json:"id"` // Id of the animation that was cancelled.
	} `json:"Params,omitempty"`
}

Event for when an animation has been cancelled.

type AnimationAnimationCreatedEvent

type AnimationAnimationCreatedEvent struct {
	Method string `json:"method"`
	Params struct {
		Id string `json:"id"` // Id of the animation that was created.
	} `json:"Params,omitempty"`
}

Event for each animation that has been created.

type AnimationAnimationEffect

type AnimationAnimationEffect struct {
	Delay          float64                 `json:"delay"`                   // `AnimationEffect`'s delay.
	EndDelay       float64                 `json:"endDelay"`                // `AnimationEffect`'s end delay.
	IterationStart float64                 `json:"iterationStart"`          // `AnimationEffect`'s iteration start.
	Iterations     float64                 `json:"iterations"`              // `AnimationEffect`'s iterations.
	Duration       float64                 `json:"duration"`                // `AnimationEffect`'s iteration duration.
	Direction      string                  `json:"direction"`               // `AnimationEffect`'s playback direction.
	Fill           string                  `json:"fill"`                    // `AnimationEffect`'s fill mode.
	BackendNodeId  int                     `json:"backendNodeId,omitempty"` // `AnimationEffect`'s target node.
	KeyframesRule  *AnimationKeyframesRule `json:"keyframesRule,omitempty"` // `AnimationEffect`'s keyframes.
	Easing         string                  `json:"easing"`                  // `AnimationEffect`'s timing function.
}

AnimationEffect instance

type AnimationAnimationStartedEvent

type AnimationAnimationStartedEvent struct {
	Method string `json:"method"`
	Params struct {
		Animation *AnimationAnimation `json:"animation"` // Animation that was started.
	} `json:"Params,omitempty"`
}

Event for animation that has been started.

type AnimationGetCurrentTimeParams

type AnimationGetCurrentTimeParams struct {
	// Id of animation.
	Id string `json:"id"`
}

type AnimationKeyframeStyle

type AnimationKeyframeStyle struct {
	Offset string `json:"offset"` // Keyframe's time offset.
	Easing string `json:"easing"` // `AnimationEffect`'s timing function.
}

Keyframe Style

type AnimationKeyframesRule

type AnimationKeyframesRule struct {
	Name      string                    `json:"name,omitempty"` // CSS keyframed animation's name.
	Keyframes []*AnimationKeyframeStyle `json:"keyframes"`      // List of animation keyframes.
}

Keyframes Rule

type AnimationReleaseAnimationsParams

type AnimationReleaseAnimationsParams struct {
	// List of animation ids to seek.
	Animations []string `json:"animations"`
}

type AnimationResolveAnimationParams

type AnimationResolveAnimationParams struct {
	// Animation id.
	AnimationId string `json:"animationId"`
}

type AnimationSeekAnimationsParams

type AnimationSeekAnimationsParams struct {
	// List of animation ids to seek.
	Animations []string `json:"animations"`
	// Set the current time of each animation.
	CurrentTime float64 `json:"currentTime"`
}

type AnimationSetPausedParams

type AnimationSetPausedParams struct {
	// Animations to set the pause state of.
	Animations []string `json:"animations"`
	// Paused state to set to.
	Paused bool `json:"paused"`
}

type AnimationSetPlaybackRateParams

type AnimationSetPlaybackRateParams struct {
	// Playback rate for animations on page
	PlaybackRate float64 `json:"playbackRate"`
}

type AnimationSetTimingParams

type AnimationSetTimingParams struct {
	// Animation id.
	AnimationId string `json:"animationId"`
	// Duration of the animation.
	Duration float64 `json:"duration"`
	// Delay of the animation.
	Delay float64 `json:"delay"`
}

type Audits

type Audits struct {
	// contains filtered or unexported fields
}

func NewAudits

func NewAudits(target gcdmessage.ChromeTargeter) *Audits

func (*Audits) CheckContrast added in v2.0.7

func (c *Audits) CheckContrast(ctx context.Context, reportAAA bool) (*gcdmessage.ChromeResponse, error)

CheckContrast - Runs the contrast check for the target page. Found issues are reported using Audits.issueAdded event. reportAAA - Whether to report WCAG AAA level issues. Default is false.

func (*Audits) CheckContrastWithParams added in v2.1.1

func (c *Audits) CheckContrastWithParams(ctx context.Context, v *AuditsCheckContrastParams) (*gcdmessage.ChromeResponse, error)

CheckContrastWithParams - Runs the contrast check for the target page. Found issues are reported using Audits.issueAdded event.

func (*Audits) Disable

func (c *Audits) Disable(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Disables issues domain, prevents further issues from being reported to the client.

func (*Audits) Enable

func (c *Audits) Enable(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Enables issues domain, sends the issues collected so far to the client by means of the `issueAdded` event.

func (*Audits) GetEncodedResponse

func (c *Audits) GetEncodedResponse(ctx context.Context, requestId string, encoding string, quality float64, sizeOnly bool) (string, int, int, error)

GetEncodedResponse - Returns the response body and size if it were re-encoded with the specified settings. Only applies to images. requestId - Identifier of the network request to get content for. encoding - The encoding to use. quality - The quality of the encoding (0-1). (defaults to 1) sizeOnly - Whether to only return the size information (defaults to false). Returns - body - The encoded body as a base64 string. Omitted if sizeOnly is true. (Encoded as a base64 string when passed over JSON) originalSize - Size before re-encoding. encodedSize - Size after re-encoding.

func (*Audits) GetEncodedResponseWithParams

func (c *Audits) GetEncodedResponseWithParams(ctx context.Context, v *AuditsGetEncodedResponseParams) (string, int, int, error)

GetEncodedResponseWithParams - Returns the response body and size if it were re-encoded with the specified settings. Only applies to images. Returns - body - The encoded body as a base64 string. Omitted if sizeOnly is true. (Encoded as a base64 string when passed over JSON) originalSize - Size before re-encoding. encodedSize - Size after re-encoding.

type AuditsAffectedCookie

type AuditsAffectedCookie struct {
	Name   string `json:"name"`   // The following three properties uniquely identify a cookie
	Path   string `json:"path"`   //
	Domain string `json:"domain"` //
}

Information about a cookie that is affected by an inspector issue.

type AuditsAffectedFrame

type AuditsAffectedFrame struct {
	FrameId string `json:"frameId"` //
}

Information about the frame affected by an inspector issue.

type AuditsAffectedRequest

type AuditsAffectedRequest struct {
	RequestId string `json:"requestId"`     // The unique request id.
	Url       string `json:"url,omitempty"` //
}

Information about a request that is affected by an inspector issue.

type AuditsAttributionReportingIssueDetails added in v2.1.1

type AuditsAttributionReportingIssueDetails struct {
	ViolationType    string                 `json:"violationType"`              //  enum values: PermissionPolicyDisabled, UntrustworthyReportingOrigin, InsecureContext, InvalidHeader, InvalidRegisterTriggerHeader, InvalidEligibleHeader, SourceAndTriggerHeaders, SourceIgnored, TriggerIgnored, OsSourceIgnored, OsTriggerIgnored, InvalidRegisterOsSourceHeader, InvalidRegisterOsTriggerHeader, WebAndOsHeaders, NoWebOrOsSupport
	Request          *AuditsAffectedRequest `json:"request,omitempty"`          //
	ViolatingNodeId  int                    `json:"violatingNodeId,omitempty"`  //
	InvalidParameter string                 `json:"invalidParameter,omitempty"` //
}

Details for issues around "Attribution Reporting API" usage. Explainer: https://github.com/WICG/attribution-reporting-api

type AuditsBlockedByResponseIssueDetails

type AuditsBlockedByResponseIssueDetails struct {
	Request      *AuditsAffectedRequest `json:"request"`                //
	ParentFrame  *AuditsAffectedFrame   `json:"parentFrame,omitempty"`  //
	BlockedFrame *AuditsAffectedFrame   `json:"blockedFrame,omitempty"` //
	Reason       string                 `json:"reason"`                 //  enum values: CoepFrameResourceNeedsCoepHeader, CoopSandboxedIFrameCannotNavigateToCoopPage, CorpNotSameOrigin, CorpNotSameOriginAfterDefaultedToSameOriginByCoep, CorpNotSameSite
}

Details for a request that has been blocked with the BLOCKED_BY_RESPONSE code. Currently only used for COEP/COOP, but may be extended to include some CSP errors in the future.

type AuditsBounceTrackingIssueDetails added in v2.3.1

type AuditsBounceTrackingIssueDetails struct {
	TrackingSites []string `json:"trackingSites"` //
}

This issue warns about sites in the redirect chain of a finished navigation that may be flagged as trackers and have their state cleared if they don't receive a user interaction. Note that in this context 'site' means eTLD+1. For example, if the URL `https://example.test:80/bounce` was in the redirect chain, the site reported would be `example.test`.

type AuditsCheckContrastParams added in v2.1.1

type AuditsCheckContrastParams struct {
	// Whether to report WCAG AAA level issues. Default is false.
	ReportAAA bool `json:"reportAAA,omitempty"`
}

type AuditsClientHintIssueDetails added in v2.2.5

type AuditsClientHintIssueDetails struct {
	SourceCodeLocation    *AuditsSourceCodeLocation `json:"sourceCodeLocation"`    //
	ClientHintIssueReason string                    `json:"clientHintIssueReason"` //  enum values: MetaTagAllowListInvalidOrigin, MetaTagModifiedHTML
}

This issue tracks client hints related issues. It's used to deprecate old features, encourage the use of new ones, and provide general guidance.

type AuditsContentSecurityPolicyIssueDetails

type AuditsContentSecurityPolicyIssueDetails struct {
	BlockedURL                         string                    `json:"blockedURL,omitempty"`               // The url not included in allowed sources.
	ViolatedDirective                  string                    `json:"violatedDirective"`                  // Specific directive that is violated, causing the CSP issue.
	IsReportOnly                       bool                      `json:"isReportOnly"`                       //
	ContentSecurityPolicyViolationType string                    `json:"contentSecurityPolicyViolationType"` //  enum values: kInlineViolation, kEvalViolation, kURLViolation, kTrustedTypesSinkViolation, kTrustedTypesPolicyViolation, kWasmEvalViolation
	FrameAncestor                      *AuditsAffectedFrame      `json:"frameAncestor,omitempty"`            //
	SourceCodeLocation                 *AuditsSourceCodeLocation `json:"sourceCodeLocation,omitempty"`       //
	ViolatingNodeId                    int                       `json:"violatingNodeId,omitempty"`          //
}

No Description.

type AuditsCookieIssueDetails added in v2.2.5

type AuditsCookieIssueDetails struct {
	Cookie                 *AuditsAffectedCookie  `json:"cookie,omitempty"`         // If AffectedCookie is not set then rawCookieLine contains the raw Set-Cookie header string. This hints at a problem where the cookie line is syntactically or semantically malformed in a way that no valid cookie could be created.
	RawCookieLine          string                 `json:"rawCookieLine,omitempty"`  //
	CookieWarningReasons   []string               `json:"cookieWarningReasons"`     //  enum values: WarnSameSiteUnspecifiedCrossSiteContext, WarnSameSiteNoneInsecure, WarnSameSiteUnspecifiedLaxAllowUnsafe, WarnSameSiteStrictLaxDowngradeStrict, WarnSameSiteStrictCrossDowngradeStrict, WarnSameSiteStrictCrossDowngradeLax, WarnSameSiteLaxCrossDowngradeStrict, WarnSameSiteLaxCrossDowngradeLax, WarnAttributeValueExceedsMaxSize, WarnDomainNonASCII
	CookieExclusionReasons []string               `json:"cookieExclusionReasons"`   //  enum values: ExcludeSameSiteUnspecifiedTreatedAsLax, ExcludeSameSiteNoneInsecure, ExcludeSameSiteLax, ExcludeSameSiteStrict, ExcludeInvalidSameParty, ExcludeSamePartyCrossPartyContext, ExcludeDomainNonASCII, ExcludeThirdPartyCookieBlockedInFirstPartySet
	Operation              string                 `json:"operation"`                // Optionally identifies the site-for-cookies and the cookie url, which may be used by the front-end as additional context. enum values: SetCookie, ReadCookie
	SiteForCookies         string                 `json:"siteForCookies,omitempty"` //
	CookieUrl              string                 `json:"cookieUrl,omitempty"`      //
	Request                *AuditsAffectedRequest `json:"request,omitempty"`        //
}

This information is currently necessary, as the front-end has a difficult time finding a specific cookie. With this, we can convey specific error information without the cookie.

type AuditsCorsIssueDetails added in v2.1.1

type AuditsCorsIssueDetails struct {
	CorsErrorStatus        *NetworkCorsErrorStatus     `json:"corsErrorStatus"`                  //
	IsWarning              bool                        `json:"isWarning"`                        //
	Request                *AuditsAffectedRequest      `json:"request"`                          //
	Location               *AuditsSourceCodeLocation   `json:"location,omitempty"`               //
	InitiatorOrigin        string                      `json:"initiatorOrigin,omitempty"`        //
	ResourceIPAddressSpace string                      `json:"resourceIPAddressSpace,omitempty"` //  enum values: Local, Private, Public, Unknown
	ClientSecurityState    *NetworkClientSecurityState `json:"clientSecurityState,omitempty"`    //
}

Details for a CORS related issue, e.g. a warning or error related to CORS RFC1918 enforcement.

type AuditsDeprecationIssueDetails added in v2.2.4

type AuditsDeprecationIssueDetails struct {
	AffectedFrame      *AuditsAffectedFrame      `json:"affectedFrame,omitempty"` //
	SourceCodeLocation *AuditsSourceCodeLocation `json:"sourceCodeLocation"`      //
	Type               string                    `json:"type"`                    // One of the deprecation names from third_party/blink/renderer/core/frame/deprecation/deprecation.json5
}

This issue tracks information needed to print a deprecation message. https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/frame/third_party/blink/renderer/core/frame/deprecation/README.md

type AuditsFederatedAuthRequestIssueDetails added in v2.2.5

type AuditsFederatedAuthRequestIssueDetails struct {
	FederatedAuthRequestIssueReason string `json:"federatedAuthRequestIssueReason"` //  enum values: ShouldEmbargo, TooManyRequests, WellKnownHttpNotFound, WellKnownNoResponse, WellKnownInvalidResponse, WellKnownListEmpty, WellKnownInvalidContentType, ConfigNotInWellKnown, WellKnownTooBig, ConfigHttpNotFound, ConfigNoResponse, ConfigInvalidResponse, ConfigInvalidContentType, ClientMetadataHttpNotFound, ClientMetadataNoResponse, ClientMetadataInvalidResponse, ClientMetadataInvalidContentType, DisabledInSettings, ErrorFetchingSignin, InvalidSigninResponse, AccountsHttpNotFound, AccountsNoResponse, AccountsInvalidResponse, AccountsListEmpty, AccountsInvalidContentType, IdTokenHttpNotFound, IdTokenNoResponse, IdTokenInvalidResponse, IdTokenInvalidRequest, IdTokenInvalidContentType, ErrorIdToken, Canceled, RpPageNotVisible
}

No Description.

type AuditsGenericIssueDetails added in v2.2.4

type AuditsGenericIssueDetails struct {
	ErrorType              string `json:"errorType"`                        // Issues with the same errorType are aggregated in the frontend. enum values: CrossOriginPortalPostMessageError, FormLabelForNameError, FormDuplicateIdForInputError, FormInputWithNoLabelError, FormAutocompleteAttributeEmptyError, FormEmptyIdAndNameAttributesForInputError, FormAriaLabelledByToNonExistingId, FormInputAssignedAutocompleteValueToIdOrNameAttributeError, FormLabelHasNeitherForNorNestedInput, FormLabelForMatchesNonExistingIdError, FormInputHasWrongButWellIntendedAutocompleteValueError
	FrameId                string `json:"frameId,omitempty"`                //
	ViolatingNodeId        int    `json:"violatingNodeId,omitempty"`        //
	ViolatingNodeAttribute string `json:"violatingNodeAttribute,omitempty"` //
}

Depending on the concrete errorType, different properties are set.

type AuditsGetEncodedResponseParams

type AuditsGetEncodedResponseParams struct {
	// Identifier of the network request to get content for.
	RequestId string `json:"requestId"`
	// The encoding to use.
	Encoding string `json:"encoding"`
	// The quality of the encoding (0-1). (defaults to 1)
	Quality float64 `json:"quality,omitempty"`
	// Whether to only return the size information (defaults to false).
	SizeOnly bool `json:"sizeOnly,omitempty"`
}

type AuditsHeavyAdIssueDetails

type AuditsHeavyAdIssueDetails struct {
	Resolution string               `json:"resolution"` // The resolution status, either blocking the content or warning. enum values: HeavyAdBlocked, HeavyAdWarning
	Reason     string               `json:"reason"`     // The reason the ad was blocked, total network or cpu or peak cpu. enum values: NetworkTotalLimit, CpuTotalLimit, CpuPeakLimit
	Frame      *AuditsAffectedFrame `json:"frame"`      // The frame that was blocked.
}

No Description.

type AuditsInspectorIssue

type AuditsInspectorIssue struct {
	Code    string                       `json:"code"`              //  enum values: CookieIssue, MixedContentIssue, BlockedByResponseIssue, HeavyAdIssue, ContentSecurityPolicyIssue, SharedArrayBufferIssue, TrustedWebActivityIssue, LowTextContrastIssue, CorsIssue, AttributionReportingIssue, QuirksModeIssue, NavigatorUserAgentIssue, GenericIssue, DeprecationIssue, ClientHintIssue, FederatedAuthRequestIssue, BounceTrackingIssue
	Details *AuditsInspectorIssueDetails `json:"details"`           //
	IssueId string                       `json:"issueId,omitempty"` // A unique id for this issue. May be omitted if no other entity (e.g. exception, CDP message, etc.) is referencing this issue.
}

An inspector issue reported from the back-end.

type AuditsInspectorIssueDetails

type AuditsInspectorIssueDetails struct {
	CookieIssueDetails                *AuditsCookieIssueDetails                `json:"cookieIssueDetails,omitempty"`                //
	MixedContentIssueDetails          *AuditsMixedContentIssueDetails          `json:"mixedContentIssueDetails,omitempty"`          //
	BlockedByResponseIssueDetails     *AuditsBlockedByResponseIssueDetails     `json:"blockedByResponseIssueDetails,omitempty"`     //
	HeavyAdIssueDetails               *AuditsHeavyAdIssueDetails               `json:"heavyAdIssueDetails,omitempty"`               //
	ContentSecurityPolicyIssueDetails *AuditsContentSecurityPolicyIssueDetails `json:"contentSecurityPolicyIssueDetails,omitempty"` //
	SharedArrayBufferIssueDetails     *AuditsSharedArrayBufferIssueDetails     `json:"sharedArrayBufferIssueDetails,omitempty"`     //
	TwaQualityEnforcementDetails      *AuditsTrustedWebActivityIssueDetails    `json:"twaQualityEnforcementDetails,omitempty"`      //
	LowTextContrastIssueDetails       *AuditsLowTextContrastIssueDetails       `json:"lowTextContrastIssueDetails,omitempty"`       //
	CorsIssueDetails                  *AuditsCorsIssueDetails                  `json:"corsIssueDetails,omitempty"`                  //
	AttributionReportingIssueDetails  *AuditsAttributionReportingIssueDetails  `json:"attributionReportingIssueDetails,omitempty"`  //
	QuirksModeIssueDetails            *AuditsQuirksModeIssueDetails            `json:"quirksModeIssueDetails,omitempty"`            //
	NavigatorUserAgentIssueDetails    *AuditsNavigatorUserAgentIssueDetails    `json:"navigatorUserAgentIssueDetails,omitempty"`    //
	GenericIssueDetails               *AuditsGenericIssueDetails               `json:"genericIssueDetails,omitempty"`               //
	DeprecationIssueDetails           *AuditsDeprecationIssueDetails           `json:"deprecationIssueDetails,omitempty"`           //
	ClientHintIssueDetails            *AuditsClientHintIssueDetails            `json:"clientHintIssueDetails,omitempty"`            //
	FederatedAuthRequestIssueDetails  *AuditsFederatedAuthRequestIssueDetails  `json:"federatedAuthRequestIssueDetails,omitempty"`  //
	BounceTrackingIssueDetails        *AuditsBounceTrackingIssueDetails        `json:"bounceTrackingIssueDetails,omitempty"`        //
}

This struct holds a list of optional fields with additional information specific to the kind of issue. When adding a new issue code, please also add a new optional field to this type.

type AuditsIssueAddedEvent

type AuditsIssueAddedEvent struct {
	Method string `json:"method"`
	Params struct {
		Issue *AuditsInspectorIssue `json:"issue"` //
	} `json:"Params,omitempty"`
}

type AuditsLowTextContrastIssueDetails added in v2.0.7

type AuditsLowTextContrastIssueDetails struct {
	ViolatingNodeId       int     `json:"violatingNodeId"`       //
	ViolatingNodeSelector string  `json:"violatingNodeSelector"` //
	ContrastRatio         float64 `json:"contrastRatio"`         //
	ThresholdAA           float64 `json:"thresholdAA"`           //
	ThresholdAAA          float64 `json:"thresholdAAA"`          //
	FontSize              string  `json:"fontSize"`              //
	FontWeight            string  `json:"fontWeight"`            //
}

No Description.

type AuditsMixedContentIssueDetails

type AuditsMixedContentIssueDetails struct {
	ResourceType     string                 `json:"resourceType,omitempty"` // The type of resource causing the mixed content issue (css, js, iframe, form,...). Marked as optional because it is mapped to from blink::mojom::RequestContextType, which will be replaced by network::mojom::RequestDestination enum values: AttributionSrc, Audio, Beacon, CSPReport, Download, EventSource, Favicon, Font, Form, Frame, Image, Import, Manifest, Ping, PluginData, PluginResource, Prefetch, Resource, Script, ServiceWorker, SharedWorker, Stylesheet, Track, Video, Worker, XMLHttpRequest, XSLT
	ResolutionStatus string                 `json:"resolutionStatus"`       // The way the mixed content issue is being resolved. enum values: MixedContentBlocked, MixedContentAutomaticallyUpgraded, MixedContentWarning
	InsecureURL      string                 `json:"insecureURL"`            // The unsafe http url causing the mixed content issue.
	MainResourceURL  string                 `json:"mainResourceURL"`        // The url responsible for the call to an unsafe url.
	Request          *AuditsAffectedRequest `json:"request,omitempty"`      // The mixed content request. Does not always exist (e.g. for unsafe form submission urls).
	Frame            *AuditsAffectedFrame   `json:"frame,omitempty"`        // Optional because not every mixed content issue is necessarily linked to a frame.
}

No Description.

type AuditsNavigatorUserAgentIssueDetails added in v2.1.2

type AuditsNavigatorUserAgentIssueDetails struct {
	Url      string                    `json:"url"`                //
	Location *AuditsSourceCodeLocation `json:"location,omitempty"` //
}

No Description.

type AuditsQuirksModeIssueDetails added in v2.1.2

type AuditsQuirksModeIssueDetails struct {
	IsLimitedQuirksMode bool   `json:"isLimitedQuirksMode"` // If false, it means the document's mode is "quirks" instead of "limited-quirks".
	DocumentNodeId      int    `json:"documentNodeId"`      //
	Url                 string `json:"url"`                 //
	FrameId             string `json:"frameId"`             //
	LoaderId            string `json:"loaderId"`            //
}

Details for issues about documents in Quirks Mode or Limited Quirks Mode that affects page layouting.

type AuditsSharedArrayBufferIssueDetails added in v2.0.7

type AuditsSharedArrayBufferIssueDetails struct {
	SourceCodeLocation *AuditsSourceCodeLocation `json:"sourceCodeLocation"` //
	IsWarning          bool                      `json:"isWarning"`          //
	Type               string                    `json:"type"`               //  enum values: TransferIssue, CreationIssue
}

Details for a issue arising from an SAB being instantiated in, or transferred to a context that is not cross-origin isolated.

type AuditsSourceCodeLocation

type AuditsSourceCodeLocation struct {
	ScriptId     string `json:"scriptId,omitempty"` //
	Url          string `json:"url"`                //
	LineNumber   int    `json:"lineNumber"`         //
	ColumnNumber int    `json:"columnNumber"`       //
}

No Description.

type AuditsTrustedWebActivityIssueDetails added in v2.0.7

type AuditsTrustedWebActivityIssueDetails struct {
	Url            string `json:"url"`                      // The url that triggers the violation.
	ViolationType  string `json:"violationType"`            //  enum values: kHttpError, kUnavailableOffline, kDigitalAssetLinks
	HttpStatusCode int    `json:"httpStatusCode,omitempty"` //
	PackageName    string `json:"packageName,omitempty"`    // The package name of the Trusted Web Activity client app. This field is only used when violation type is kDigitalAssetLinks.
	Signature      string `json:"signature,omitempty"`      // The signature of the Trusted Web Activity client app. This field is only used when violation type is kDigitalAssetLinks.
}

No Description.

type BackgroundService

type BackgroundService struct {
	// contains filtered or unexported fields
}

func NewBackgroundService

func NewBackgroundService(target gcdmessage.ChromeTargeter) *BackgroundService

func (*BackgroundService) ClearEvents

func (c *BackgroundService) ClearEvents(ctx context.Context, service string) (*gcdmessage.ChromeResponse, error)

ClearEvents - Clears all stored data for the service. service - enum values: backgroundFetch, backgroundSync, pushMessaging, notifications, paymentHandler, periodicBackgroundSync

func (*BackgroundService) ClearEventsWithParams

ClearEventsWithParams - Clears all stored data for the service.

func (*BackgroundService) SetRecording

func (c *BackgroundService) SetRecording(ctx context.Context, shouldRecord bool, service string) (*gcdmessage.ChromeResponse, error)

SetRecording - Set the recording state for the service. shouldRecord - service - enum values: backgroundFetch, backgroundSync, pushMessaging, notifications, paymentHandler, periodicBackgroundSync

func (*BackgroundService) SetRecordingWithParams

SetRecordingWithParams - Set the recording state for the service.

func (*BackgroundService) StartObserving

func (c *BackgroundService) StartObserving(ctx context.Context, service string) (*gcdmessage.ChromeResponse, error)

StartObserving - Enables event updates for the service. service - enum values: backgroundFetch, backgroundSync, pushMessaging, notifications, paymentHandler, periodicBackgroundSync

func (*BackgroundService) StartObservingWithParams

StartObservingWithParams - Enables event updates for the service.

func (*BackgroundService) StopObserving

func (c *BackgroundService) StopObserving(ctx context.Context, service string) (*gcdmessage.ChromeResponse, error)

StopObserving - Disables event updates for the service. service - enum values: backgroundFetch, backgroundSync, pushMessaging, notifications, paymentHandler, periodicBackgroundSync

func (*BackgroundService) StopObservingWithParams

StopObservingWithParams - Disables event updates for the service.

type BackgroundServiceBackgroundServiceEvent

type BackgroundServiceBackgroundServiceEvent struct {
	Timestamp                   float64                           `json:"timestamp"`                   // Timestamp of the event (in seconds).
	Origin                      string                            `json:"origin"`                      // The origin this event belongs to.
	ServiceWorkerRegistrationId string                            `json:"serviceWorkerRegistrationId"` // The Service Worker ID that initiated the event.
	Service                     string                            `json:"service"`                     // The Background Service this event belongs to. enum values: backgroundFetch, backgroundSync, pushMessaging, notifications, paymentHandler, periodicBackgroundSync
	EventName                   string                            `json:"eventName"`                   // A description of the event.
	InstanceId                  string                            `json:"instanceId"`                  // An identifier that groups related events together.
	EventMetadata               []*BackgroundServiceEventMetadata `json:"eventMetadata"`               // A list of event-specific information.
	StorageKey                  string                            `json:"storageKey"`                  // Storage key this event belongs to.
}

No Description.

type BackgroundServiceBackgroundServiceEventReceivedEvent

type BackgroundServiceBackgroundServiceEventReceivedEvent struct {
	Method string `json:"method"`
	Params struct {
		BackgroundServiceEvent *BackgroundServiceBackgroundServiceEvent `json:"backgroundServiceEvent"` //
	} `json:"Params,omitempty"`
}

Called with all existing backgroundServiceEvents when enabled, and all new events afterwards if enabled and recording.

type BackgroundServiceClearEventsParams

type BackgroundServiceClearEventsParams struct {
	//  enum values: backgroundFetch, backgroundSync, pushMessaging, notifications, paymentHandler, periodicBackgroundSync
	Service string `json:"service"`
}

type BackgroundServiceEventMetadata

type BackgroundServiceEventMetadata struct {
	Key   string `json:"key"`   //
	Value string `json:"value"` //
}

A key-value pair for additional event information to pass along.

type BackgroundServiceRecordingStateChangedEvent

type BackgroundServiceRecordingStateChangedEvent struct {
	Method string `json:"method"`
	Params struct {
		IsRecording bool   `json:"isRecording"` //
		Service     string `json:"service"`     //  enum values: backgroundFetch, backgroundSync, pushMessaging, notifications, paymentHandler, periodicBackgroundSync
	} `json:"Params,omitempty"`
}

Called when the recording state for the service has been updated.

type BackgroundServiceSetRecordingParams

type BackgroundServiceSetRecordingParams struct {
	//
	ShouldRecord bool `json:"shouldRecord"`
	//  enum values: backgroundFetch, backgroundSync, pushMessaging, notifications, paymentHandler, periodicBackgroundSync
	Service string `json:"service"`
}

type BackgroundServiceStartObservingParams

type BackgroundServiceStartObservingParams struct {
	//  enum values: backgroundFetch, backgroundSync, pushMessaging, notifications, paymentHandler, periodicBackgroundSync
	Service string `json:"service"`
}

type BackgroundServiceStopObservingParams

type BackgroundServiceStopObservingParams struct {
	//  enum values: backgroundFetch, backgroundSync, pushMessaging, notifications, paymentHandler, periodicBackgroundSync
	Service string `json:"service"`
}

type Browser

type Browser struct {
	// contains filtered or unexported fields
}

func NewBrowser

func NewBrowser(target gcdmessage.ChromeTargeter) *Browser

func (*Browser) CancelDownload added in v2.1.1

func (c *Browser) CancelDownload(ctx context.Context, guid string, browserContextId string) (*gcdmessage.ChromeResponse, error)

CancelDownload - Cancel a download if in progress guid - Global unique identifier of the download. browserContextId - BrowserContext to perform the action in. When omitted, default browser context is used.

func (*Browser) CancelDownloadWithParams added in v2.1.1

func (c *Browser) CancelDownloadWithParams(ctx context.Context, v *BrowserCancelDownloadParams) (*gcdmessage.ChromeResponse, error)

CancelDownloadWithParams - Cancel a download if in progress

func (*Browser) Close

Close browser gracefully.

func (*Browser) Crash

Crashes browser on the main thread.

func (*Browser) CrashGpuProcess

func (c *Browser) CrashGpuProcess(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Crashes GPU process.

func (*Browser) ExecuteBrowserCommand added in v2.0.7

func (c *Browser) ExecuteBrowserCommand(ctx context.Context, commandId string) (*gcdmessage.ChromeResponse, error)

ExecuteBrowserCommand - Invoke custom browser commands used by telemetry. commandId - enum values: openTabSearch, closeTabSearch

func (*Browser) ExecuteBrowserCommandWithParams added in v2.0.7

func (c *Browser) ExecuteBrowserCommandWithParams(ctx context.Context, v *BrowserExecuteBrowserCommandParams) (*gcdmessage.ChromeResponse, error)

ExecuteBrowserCommandWithParams - Invoke custom browser commands used by telemetry.

func (*Browser) GetBrowserCommandLine

func (c *Browser) GetBrowserCommandLine(ctx context.Context) ([]string, error)

GetBrowserCommandLine - Returns the command line switches for the browser process if, and only if --enable-automation is on the commandline. Returns - arguments - Commandline parameters

func (*Browser) GetHistogram

func (c *Browser) GetHistogram(ctx context.Context, name string, delta bool) (*BrowserHistogram, error)

GetHistogram - Get a Chrome histogram by name. name - Requested histogram name. delta - If true, retrieve delta since last delta call. Returns - histogram - Histogram.

func (*Browser) GetHistogramWithParams

func (c *Browser) GetHistogramWithParams(ctx context.Context, v *BrowserGetHistogramParams) (*BrowserHistogram, error)

GetHistogramWithParams - Get a Chrome histogram by name. Returns - histogram - Histogram.

func (*Browser) GetHistograms

func (c *Browser) GetHistograms(ctx context.Context, query string, delta bool) ([]*BrowserHistogram, error)

GetHistograms - Get Chrome histograms. query - Requested substring in name. Only histograms which have query as a substring in their name are extracted. An empty or absent query returns all histograms. delta - If true, retrieve delta since last delta call. Returns - histograms - Histograms.

func (*Browser) GetHistogramsWithParams

func (c *Browser) GetHistogramsWithParams(ctx context.Context, v *BrowserGetHistogramsParams) ([]*BrowserHistogram, error)

GetHistogramsWithParams - Get Chrome histograms. Returns - histograms - Histograms.

func (*Browser) GetVersion

func (c *Browser) GetVersion(ctx context.Context) (string, string, string, string, string, error)

GetVersion - Returns version information. Returns - protocolVersion - Protocol version. product - Product name. revision - Product revision. userAgent - User-Agent. jsVersion - V8 version.

func (*Browser) GetWindowBounds

func (c *Browser) GetWindowBounds(ctx context.Context, windowId int) (*BrowserBounds, error)

GetWindowBounds - Get position and size of the browser window. windowId - Browser window id. Returns - bounds - Bounds information of the window. When window state is 'minimized', the restored window position and size are returned.

func (*Browser) GetWindowBoundsWithParams

func (c *Browser) GetWindowBoundsWithParams(ctx context.Context, v *BrowserGetWindowBoundsParams) (*BrowserBounds, error)

GetWindowBoundsWithParams - Get position and size of the browser window. Returns - bounds - Bounds information of the window. When window state is 'minimized', the restored window position and size are returned.

func (*Browser) GetWindowForTarget

func (c *Browser) GetWindowForTarget(ctx context.Context, targetId string) (int, *BrowserBounds, error)

GetWindowForTarget - Get the browser window that contains the devtools target. targetId - Devtools agent host id. If called as a part of the session, associated targetId is used. Returns - windowId - Browser window id. bounds - Bounds information of the window. When window state is 'minimized', the restored window position and size are returned.

func (*Browser) GetWindowForTargetWithParams

func (c *Browser) GetWindowForTargetWithParams(ctx context.Context, v *BrowserGetWindowForTargetParams) (int, *BrowserBounds, error)

GetWindowForTargetWithParams - Get the browser window that contains the devtools target. Returns - windowId - Browser window id. bounds - Bounds information of the window. When window state is 'minimized', the restored window position and size are returned.

func (*Browser) GrantPermissions

func (c *Browser) GrantPermissions(ctx context.Context, permissions []string, origin string, browserContextId string) (*gcdmessage.ChromeResponse, error)

GrantPermissions - Grant specific permissions to the given origin and reject all others. permissions - enum values: accessibilityEvents, audioCapture, backgroundSync, backgroundFetch, clipboardReadWrite, clipboardSanitizedWrite, displayCapture, durableStorage, flash, geolocation, idleDetection, localFonts, midi, midiSysex, nfc, notifications, paymentHandler, periodicBackgroundSync, protectedMediaIdentifier, sensors, storageAccess, topLevelStorageAccess, videoCapture, videoCapturePanTiltZoom, wakeLockScreen, wakeLockSystem, windowManagement origin - Origin the permission applies to, all origins if not specified. browserContextId - BrowserContext to override permissions. When omitted, default browser context is used.

func (*Browser) GrantPermissionsWithParams

func (c *Browser) GrantPermissionsWithParams(ctx context.Context, v *BrowserGrantPermissionsParams) (*gcdmessage.ChromeResponse, error)

GrantPermissionsWithParams - Grant specific permissions to the given origin and reject all others.

func (*Browser) ResetPermissions

func (c *Browser) ResetPermissions(ctx context.Context, browserContextId string) (*gcdmessage.ChromeResponse, error)

ResetPermissions - Reset all permission management for all origins. browserContextId - BrowserContext to reset permissions. When omitted, default browser context is used.

func (*Browser) ResetPermissionsWithParams

func (c *Browser) ResetPermissionsWithParams(ctx context.Context, v *BrowserResetPermissionsParams) (*gcdmessage.ChromeResponse, error)

ResetPermissionsWithParams - Reset all permission management for all origins.

func (*Browser) SetDockTile

func (c *Browser) SetDockTile(ctx context.Context, badgeLabel string, image string) (*gcdmessage.ChromeResponse, error)

SetDockTile - Set dock tile details, platform-specific. badgeLabel - image - Png encoded image. (Encoded as a base64 string when passed over JSON)

func (*Browser) SetDockTileWithParams

func (c *Browser) SetDockTileWithParams(ctx context.Context, v *BrowserSetDockTileParams) (*gcdmessage.ChromeResponse, error)

SetDockTileWithParams - Set dock tile details, platform-specific.

func (*Browser) SetDownloadBehavior

func (c *Browser) SetDownloadBehavior(ctx context.Context, behavior string, browserContextId string, downloadPath string, eventsEnabled bool) (*gcdmessage.ChromeResponse, error)

SetDownloadBehavior - Set the behavior when downloading a file. behavior - Whether to allow all or deny all download requests, or use default Chrome behavior if available (otherwise deny). |allowAndName| allows download and names files according to their dowmload guids. browserContextId - BrowserContext to set download behavior. When omitted, default browser context is used. downloadPath - The default path to save downloaded files to. This is required if behavior is set to 'allow' or 'allowAndName'. eventsEnabled - Whether to emit download events (defaults to false).

func (*Browser) SetDownloadBehaviorWithParams

func (c *Browser) SetDownloadBehaviorWithParams(ctx context.Context, v *BrowserSetDownloadBehaviorParams) (*gcdmessage.ChromeResponse, error)

SetDownloadBehaviorWithParams - Set the behavior when downloading a file.

func (*Browser) SetPermission

func (c *Browser) SetPermission(ctx context.Context, permission *BrowserPermissionDescriptor, setting string, origin string, browserContextId string) (*gcdmessage.ChromeResponse, error)

SetPermission - Set permission settings for given origin. permission - Descriptor of permission to override. setting - Setting of the permission. enum values: granted, denied, prompt origin - Origin the permission applies to, all origins if not specified. browserContextId - Context to override. When omitted, default browser context is used.

func (*Browser) SetPermissionWithParams

func (c *Browser) SetPermissionWithParams(ctx context.Context, v *BrowserSetPermissionParams) (*gcdmessage.ChromeResponse, error)

SetPermissionWithParams - Set permission settings for given origin.

func (*Browser) SetWindowBounds

func (c *Browser) SetWindowBounds(ctx context.Context, windowId int, bounds *BrowserBounds) (*gcdmessage.ChromeResponse, error)

SetWindowBounds - Set position and/or size of the browser window. windowId - Browser window id. bounds - New window bounds. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined with 'left', 'top', 'width' or 'height'. Leaves unspecified fields unchanged.

func (*Browser) SetWindowBoundsWithParams

func (c *Browser) SetWindowBoundsWithParams(ctx context.Context, v *BrowserSetWindowBoundsParams) (*gcdmessage.ChromeResponse, error)

SetWindowBoundsWithParams - Set position and/or size of the browser window.

type BrowserBounds

type BrowserBounds 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 string `json:"windowState,omitempty"` // The window state. Default to normal. enum values: normal, minimized, maximized, fullscreen
}

Browser window bounds information

type BrowserBucket

type BrowserBucket struct {
	Low   int `json:"low"`   // Minimum value (inclusive).
	High  int `json:"high"`  // Maximum value (exclusive).
	Count int `json:"count"` // Number of samples.
}

Chrome histogram bucket.

type BrowserCancelDownloadParams added in v2.1.1

type BrowserCancelDownloadParams struct {
	// Global unique identifier of the download.
	Guid string `json:"guid"`
	// BrowserContext to perform the action in. When omitted, default browser context is used.
	BrowserContextId string `json:"browserContextId,omitempty"`
}

type BrowserDownloadProgressEvent added in v2.1.1

type BrowserDownloadProgressEvent struct {
	Method string `json:"method"`
	Params struct {
		Guid          string  `json:"guid"`          // Global unique identifier of the download.
		TotalBytes    float64 `json:"totalBytes"`    // Total expected bytes to download.
		ReceivedBytes float64 `json:"receivedBytes"` // Total bytes received.
		State         string  `json:"state"`         // Download status.
	} `json:"Params,omitempty"`
}

Fired when download makes progress. Last call has |done| == true.

type BrowserDownloadWillBeginEvent added in v2.1.1

type BrowserDownloadWillBeginEvent struct {
	Method string `json:"method"`
	Params struct {
		FrameId           string `json:"frameId"`           // Id of the frame that caused the download to begin.
		Guid              string `json:"guid"`              // Global unique identifier of the download.
		Url               string `json:"url"`               // URL of the resource being downloaded.
		SuggestedFilename string `json:"suggestedFilename"` // Suggested file name of the resource (the actual name of the file saved on disk may differ).
	} `json:"Params,omitempty"`
}

Fired when page is about to start a download.

type BrowserExecuteBrowserCommandParams added in v2.0.7

type BrowserExecuteBrowserCommandParams struct {
	//  enum values: openTabSearch, closeTabSearch
	CommandId string `json:"commandId"`
}

type BrowserGetHistogramParams

type BrowserGetHistogramParams struct {
	// Requested histogram name.
	Name string `json:"name"`
	// If true, retrieve delta since last delta call.
	Delta bool `json:"delta,omitempty"`
}

type BrowserGetHistogramsParams

type BrowserGetHistogramsParams struct {
	// Requested substring in name. Only histograms which have query as a substring in their name are extracted. An empty or absent query returns all histograms.
	Query string `json:"query,omitempty"`
	// If true, retrieve delta since last delta call.
	Delta bool `json:"delta,omitempty"`
}

type BrowserGetWindowBoundsParams

type BrowserGetWindowBoundsParams struct {
	// Browser window id.
	WindowId int `json:"windowId"`
}

type BrowserGetWindowForTargetParams

type BrowserGetWindowForTargetParams struct {
	// Devtools agent host id. If called as a part of the session, associated targetId is used.
	TargetId string `json:"targetId,omitempty"`
}

type BrowserGrantPermissionsParams

type BrowserGrantPermissionsParams struct {
	//  enum values: accessibilityEvents, audioCapture, backgroundSync, backgroundFetch, clipboardReadWrite, clipboardSanitizedWrite, displayCapture, durableStorage, flash, geolocation, idleDetection, localFonts, midi, midiSysex, nfc, notifications, paymentHandler, periodicBackgroundSync, protectedMediaIdentifier, sensors, storageAccess, topLevelStorageAccess, videoCapture, videoCapturePanTiltZoom, wakeLockScreen, wakeLockSystem, windowManagement
	Permissions []string `json:"permissions"`
	// Origin the permission applies to, all origins if not specified.
	Origin string `json:"origin,omitempty"`
	// BrowserContext to override permissions. When omitted, default browser context is used.
	BrowserContextId string `json:"browserContextId,omitempty"`
}

type BrowserHistogram

type BrowserHistogram struct {
	Name    string           `json:"name"`    // Name.
	Sum     int              `json:"sum"`     // Sum of sample values.
	Count   int              `json:"count"`   // Total number of samples.
	Buckets []*BrowserBucket `json:"buckets"` // Buckets.
}

Chrome histogram.

type BrowserPermissionDescriptor

type BrowserPermissionDescriptor struct {
	Name                     string `json:"name"`                               // Name of permission. See https://cs.chromium.org/chromium/src/third_party/blink/renderer/modules/permissions/permission_descriptor.idl for valid permission names.
	Sysex                    bool   `json:"sysex,omitempty"`                    // For "midi" permission, may also specify sysex control.
	UserVisibleOnly          bool   `json:"userVisibleOnly,omitempty"`          // For "push" permission, may specify userVisibleOnly. Note that userVisibleOnly = true is the only currently supported type.
	AllowWithoutSanitization bool   `json:"allowWithoutSanitization,omitempty"` // For "clipboard" permission, may specify allowWithoutSanitization.
	PanTiltZoom              bool   `json:"panTiltZoom,omitempty"`              // For "camera" permission, may specify panTiltZoom.
}

Definition of PermissionDescriptor defined in the Permissions API: https://w3c.github.io/permissions/#dictdef-permissiondescriptor.

type BrowserResetPermissionsParams

type BrowserResetPermissionsParams struct {
	// BrowserContext to reset permissions. When omitted, default browser context is used.
	BrowserContextId string `json:"browserContextId,omitempty"`
}

type BrowserSetDockTileParams

type BrowserSetDockTileParams struct {
	//
	BadgeLabel string `json:"badgeLabel,omitempty"`
	// Png encoded image. (Encoded as a base64 string when passed over JSON)
	Image string `json:"image,omitempty"`
}

type BrowserSetDownloadBehaviorParams

type BrowserSetDownloadBehaviorParams struct {
	// Whether to allow all or deny all download requests, or use default Chrome behavior if available (otherwise deny). |allowAndName| allows download and names files according to their dowmload guids.
	Behavior string `json:"behavior"`
	// BrowserContext to set download behavior. When omitted, default browser context is used.
	BrowserContextId string `json:"browserContextId,omitempty"`
	// The default path to save downloaded files to. This is required if behavior is set to 'allow' or 'allowAndName'.
	DownloadPath string `json:"downloadPath,omitempty"`
	// Whether to emit download events (defaults to false).
	EventsEnabled bool `json:"eventsEnabled,omitempty"`
}

type BrowserSetPermissionParams

type BrowserSetPermissionParams struct {
	// Descriptor of permission to override.
	Permission *BrowserPermissionDescriptor `json:"permission"`
	// Setting of the permission. enum values: granted, denied, prompt
	Setting string `json:"setting"`
	// Origin the permission applies to, all origins if not specified.
	Origin string `json:"origin,omitempty"`
	// Context to override. When omitted, default browser context is used.
	BrowserContextId string `json:"browserContextId,omitempty"`
}

type BrowserSetWindowBoundsParams

type BrowserSetWindowBoundsParams struct {
	// Browser window id.
	WindowId int `json:"windowId"`
	// New window bounds. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined with 'left', 'top', 'width' or 'height'. Leaves unspecified fields unchanged.
	Bounds *BrowserBounds `json:"bounds"`
}

type CSS

type CSS struct {
	// contains filtered or unexported fields
}

func NewCSS

func NewCSS(target gcdmessage.ChromeTargeter) *CSS

func (*CSS) AddRule

func (c *CSS) AddRule(ctx context.Context, styleSheetId string, ruleText string, location *CSSSourceRange) (*CSSCSSRule, error)

AddRule - Inserts a new rule with the given `ruleText` in a stylesheet with given `styleSheetId`, at the position specified by `location`. styleSheetId - The css style sheet identifier where a new rule should be inserted. ruleText - The text of a new rule. location - Text position of a new rule in the target style sheet. Returns - rule - The newly created rule.

func (*CSS) AddRuleWithParams

func (c *CSS) AddRuleWithParams(ctx context.Context, v *CSSAddRuleParams) (*CSSCSSRule, error)

AddRuleWithParams - Inserts a new rule with the given `ruleText` in a stylesheet with given `styleSheetId`, at the position specified by `location`. Returns - rule - The newly created rule.

func (*CSS) CollectClassNames

func (c *CSS) CollectClassNames(ctx context.Context, styleSheetId string) ([]string, error)

CollectClassNames - Returns all class names from specified stylesheet. styleSheetId - Returns - classNames - Class name list.

func (*CSS) CollectClassNamesWithParams

func (c *CSS) CollectClassNamesWithParams(ctx context.Context, v *CSSCollectClassNamesParams) ([]string, error)

CollectClassNamesWithParams - Returns all class names from specified stylesheet. Returns - classNames - Class name list.

func (*CSS) CreateStyleSheet

func (c *CSS) CreateStyleSheet(ctx context.Context, frameId string) (string, error)

CreateStyleSheet - Creates a new special "via-inspector" stylesheet in the frame with given `frameId`. frameId - Identifier of the frame where "via-inspector" stylesheet should be created. Returns - styleSheetId - Identifier of the created "via-inspector" stylesheet.

func (*CSS) CreateStyleSheetWithParams

func (c *CSS) CreateStyleSheetWithParams(ctx context.Context, v *CSSCreateStyleSheetParams) (string, error)

CreateStyleSheetWithParams - Creates a new special "via-inspector" stylesheet in the frame with given `frameId`. Returns - styleSheetId - Identifier of the created "via-inspector" stylesheet.

func (*CSS) Disable

func (c *CSS) Disable(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Disables the CSS agent for the given page.

func (*CSS) Enable

func (c *CSS) Enable(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Enables the CSS agent for the given page. Clients should not assume that the CSS agent has been enabled until the result of this command is received.

func (*CSS) ForcePseudoState

func (c *CSS) ForcePseudoState(ctx context.Context, nodeId int, forcedPseudoClasses []string) (*gcdmessage.ChromeResponse, error)

ForcePseudoState - Ensures that the given node will have specified pseudo-classes whenever its style is computed by the browser. nodeId - The element id for which to force the pseudo state. forcedPseudoClasses - Element pseudo classes to force when computing the element's style.

func (*CSS) ForcePseudoStateWithParams

func (c *CSS) ForcePseudoStateWithParams(ctx context.Context, v *CSSForcePseudoStateParams) (*gcdmessage.ChromeResponse, error)

ForcePseudoStateWithParams - Ensures that the given node will have specified pseudo-classes whenever its style is computed by the browser.

func (*CSS) GetBackgroundColors

func (c *CSS) GetBackgroundColors(ctx context.Context, nodeId int) ([]string, string, string, error)

GetBackgroundColors - nodeId - Id of the node to get background colors for. Returns - backgroundColors - The range of background colors behind this element, if it contains any visible text. If no visible text is present, this will be undefined. In the case of a flat background color, this will consist of simply that color. In the case of a gradient, this will consist of each of the color stops. For anything more complicated, this will be an empty array. Images will be ignored (as if the image had failed to load). computedFontSize - The computed font size for this node, as a CSS computed value string (e.g. '12px'). computedFontWeight - The computed font weight for this node, as a CSS computed value string (e.g. 'normal' or '100').

func (*CSS) GetBackgroundColorsWithParams

func (c *CSS) GetBackgroundColorsWithParams(ctx context.Context, v *CSSGetBackgroundColorsParams) ([]string, string, string, error)

GetBackgroundColorsWithParams - Returns - backgroundColors - The range of background colors behind this element, if it contains any visible text. If no visible text is present, this will be undefined. In the case of a flat background color, this will consist of simply that color. In the case of a gradient, this will consist of each of the color stops. For anything more complicated, this will be an empty array. Images will be ignored (as if the image had failed to load). computedFontSize - The computed font size for this node, as a CSS computed value string (e.g. '12px'). computedFontWeight - The computed font weight for this node, as a CSS computed value string (e.g. 'normal' or '100').

func (*CSS) GetComputedStyleForNode

func (c *CSS) GetComputedStyleForNode(ctx context.Context, nodeId int) ([]*CSSCSSComputedStyleProperty, error)

GetComputedStyleForNode - Returns the computed style for a DOM node identified by `nodeId`. nodeId - Returns - computedStyle - Computed style for the specified DOM node.

func (*CSS) GetComputedStyleForNodeWithParams

func (c *CSS) GetComputedStyleForNodeWithParams(ctx context.Context, v *CSSGetComputedStyleForNodeParams) ([]*CSSCSSComputedStyleProperty, error)

GetComputedStyleForNodeWithParams - Returns the computed style for a DOM node identified by `nodeId`. Returns - computedStyle - Computed style for the specified DOM node.

func (*CSS) GetInlineStylesForNode

func (c *CSS) GetInlineStylesForNode(ctx context.Context, nodeId int) (*CSSCSSStyle, *CSSCSSStyle, error)

GetInlineStylesForNode - Returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM attributes) for a DOM node identified by `nodeId`. nodeId - Returns - inlineStyle - Inline style for the specified DOM node. attributesStyle - Attribute-defined element style (e.g. resulting from "width=20 height=100%").

func (*CSS) GetInlineStylesForNodeWithParams

func (c *CSS) GetInlineStylesForNodeWithParams(ctx context.Context, v *CSSGetInlineStylesForNodeParams) (*CSSCSSStyle, *CSSCSSStyle, error)

GetInlineStylesForNodeWithParams - Returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM attributes) for a DOM node identified by `nodeId`. Returns - inlineStyle - Inline style for the specified DOM node. attributesStyle - Attribute-defined element style (e.g. resulting from "width=20 height=100%").

func (*CSS) GetLayersForNode added in v2.2.5

func (c *CSS) GetLayersForNode(ctx context.Context, nodeId int) (*CSSCSSLayerData, error)

GetLayersForNode - Returns all layers parsed by the rendering engine for the tree scope of a node. Given a DOM element identified by nodeId, getLayersForNode returns the root layer for the nearest ancestor document or shadow root. The layer root contains the full layer tree for the tree scope and their ordering. nodeId - Returns - rootLayer -

func (*CSS) GetLayersForNodeWithParams added in v2.2.5

func (c *CSS) GetLayersForNodeWithParams(ctx context.Context, v *CSSGetLayersForNodeParams) (*CSSCSSLayerData, error)

GetLayersForNodeWithParams - Returns all layers parsed by the rendering engine for the tree scope of a node. Given a DOM element identified by nodeId, getLayersForNode returns the root layer for the nearest ancestor document or shadow root. The layer root contains the full layer tree for the tree scope and their ordering. Returns - rootLayer -

func (*CSS) GetMatchedStylesForNode

GetMatchedStylesForNode - Returns requested styles for a DOM node identified by `nodeId`. nodeId - Returns - inlineStyle - Inline style for the specified DOM node. attributesStyle - Attribute-defined element style (e.g. resulting from "width=20 height=100%"). matchedCSSRules - CSS rules matching this node, from all applicable stylesheets. pseudoElements - Pseudo style matches for this node. inherited - A chain of inherited styles (from the immediate node parent up to the DOM tree root). inheritedPseudoElements - A chain of inherited pseudo element styles (from the immediate node parent up to the DOM tree root). cssKeyframesRules - A list of CSS keyframed animations matching this node. cssPositionFallbackRules - A list of CSS position fallbacks matching this node. parentLayoutNodeId - Id of the first parent element that does not have display: contents.

func (*CSS) GetMatchedStylesForNodeWithParams

GetMatchedStylesForNodeWithParams - Returns requested styles for a DOM node identified by `nodeId`. Returns - inlineStyle - Inline style for the specified DOM node. attributesStyle - Attribute-defined element style (e.g. resulting from "width=20 height=100%"). matchedCSSRules - CSS rules matching this node, from all applicable stylesheets. pseudoElements - Pseudo style matches for this node. inherited - A chain of inherited styles (from the immediate node parent up to the DOM tree root). inheritedPseudoElements - A chain of inherited pseudo element styles (from the immediate node parent up to the DOM tree root). cssKeyframesRules - A list of CSS keyframed animations matching this node. cssPositionFallbackRules - A list of CSS position fallbacks matching this node. parentLayoutNodeId - Id of the first parent element that does not have display: contents.

func (*CSS) GetMediaQueries

func (c *CSS) GetMediaQueries(ctx context.Context) ([]*CSSCSSMedia, error)

GetMediaQueries - Returns all media queries parsed by the rendering engine. Returns - medias -

func (*CSS) GetPlatformFontsForNode

func (c *CSS) GetPlatformFontsForNode(ctx context.Context, nodeId int) ([]*CSSPlatformFontUsage, error)

GetPlatformFontsForNode - Requests information about platform fonts which we used to render child TextNodes in the given node. nodeId - Returns - fonts - Usage statistics for every employed platform font.

func (*CSS) GetPlatformFontsForNodeWithParams

func (c *CSS) GetPlatformFontsForNodeWithParams(ctx context.Context, v *CSSGetPlatformFontsForNodeParams) ([]*CSSPlatformFontUsage, error)

GetPlatformFontsForNodeWithParams - Requests information about platform fonts which we used to render child TextNodes in the given node. Returns - fonts - Usage statistics for every employed platform font.

func (*CSS) GetStyleSheetText

func (c *CSS) GetStyleSheetText(ctx context.Context, styleSheetId string) (string, error)

GetStyleSheetText - Returns the current textual content for a stylesheet. styleSheetId - Returns - text - The stylesheet text.

func (*CSS) GetStyleSheetTextWithParams

func (c *CSS) GetStyleSheetTextWithParams(ctx context.Context, v *CSSGetStyleSheetTextParams) (string, error)

GetStyleSheetTextWithParams - Returns the current textual content for a stylesheet. Returns - text - The stylesheet text.

func (*CSS) SetContainerQueryText added in v2.2.4

func (c *CSS) SetContainerQueryText(ctx context.Context, styleSheetId string, theRange *CSSSourceRange, text string) (*CSSCSSContainerQuery, error)

SetContainerQueryText - Modifies the expression of a container query. styleSheetId - range - text - Returns - containerQuery - The resulting CSS container query rule after modification.

func (*CSS) SetContainerQueryTextWithParams added in v2.2.4

func (c *CSS) SetContainerQueryTextWithParams(ctx context.Context, v *CSSSetContainerQueryTextParams) (*CSSCSSContainerQuery, error)

SetContainerQueryTextWithParams - Modifies the expression of a container query. Returns - containerQuery - The resulting CSS container query rule after modification.

func (*CSS) SetEffectivePropertyValueForNode

func (c *CSS) SetEffectivePropertyValueForNode(ctx context.Context, nodeId int, propertyName string, value string) (*gcdmessage.ChromeResponse, error)

SetEffectivePropertyValueForNode - Find a rule with the given active property for the given node and set the new value for this property nodeId - The element id for which to set property. propertyName - value -

func (*CSS) SetEffectivePropertyValueForNodeWithParams

func (c *CSS) SetEffectivePropertyValueForNodeWithParams(ctx context.Context, v *CSSSetEffectivePropertyValueForNodeParams) (*gcdmessage.ChromeResponse, error)

SetEffectivePropertyValueForNodeWithParams - Find a rule with the given active property for the given node and set the new value for this property

func (*CSS) SetKeyframeKey

func (c *CSS) SetKeyframeKey(ctx context.Context, styleSheetId string, theRange *CSSSourceRange, keyText string) (*CSSValue, error)

SetKeyframeKey - Modifies the keyframe rule key text. styleSheetId - range - keyText - Returns - keyText - The resulting key text after modification.

func (*CSS) SetKeyframeKeyWithParams

func (c *CSS) SetKeyframeKeyWithParams(ctx context.Context, v *CSSSetKeyframeKeyParams) (*CSSValue, error)

SetKeyframeKeyWithParams - Modifies the keyframe rule key text. Returns - keyText - The resulting key text after modification.

func (*CSS) SetLocalFontsEnabled

func (c *CSS) SetLocalFontsEnabled(ctx context.Context, enabled bool) (*gcdmessage.ChromeResponse, error)

SetLocalFontsEnabled - Enables/disables rendering of local CSS fonts (enabled by default). enabled - Whether rendering of local fonts is enabled.

func (*CSS) SetLocalFontsEnabledWithParams

func (c *CSS) SetLocalFontsEnabledWithParams(ctx context.Context, v *CSSSetLocalFontsEnabledParams) (*gcdmessage.ChromeResponse, error)

SetLocalFontsEnabledWithParams - Enables/disables rendering of local CSS fonts (enabled by default).

func (*CSS) SetMediaText

func (c *CSS) SetMediaText(ctx context.Context, styleSheetId string, theRange *CSSSourceRange, text string) (*CSSCSSMedia, error)

SetMediaText - Modifies the rule selector. styleSheetId - range - text - Returns - media - The resulting CSS media rule after modification.

func (*CSS) SetMediaTextWithParams

func (c *CSS) SetMediaTextWithParams(ctx context.Context, v *CSSSetMediaTextParams) (*CSSCSSMedia, error)

SetMediaTextWithParams - Modifies the rule selector. Returns - media - The resulting CSS media rule after modification.

func (*CSS) SetRuleSelector

func (c *CSS) SetRuleSelector(ctx context.Context, styleSheetId string, theRange *CSSSourceRange, selector string) (*CSSSelectorList, error)

SetRuleSelector - Modifies the rule selector. styleSheetId - range - selector - Returns - selectorList - The resulting selector list after modification.

func (*CSS) SetRuleSelectorWithParams

func (c *CSS) SetRuleSelectorWithParams(ctx context.Context, v *CSSSetRuleSelectorParams) (*CSSSelectorList, error)

SetRuleSelectorWithParams - Modifies the rule selector. Returns - selectorList - The resulting selector list after modification.

func (*CSS) SetScopeText added in v2.2.6

func (c *CSS) SetScopeText(ctx context.Context, styleSheetId string, theRange *CSSSourceRange, text string) (*CSSCSSScope, error)

SetScopeText - Modifies the expression of a scope at-rule. styleSheetId - range - text - Returns - scope - The resulting CSS Scope rule after modification.

func (*CSS) SetScopeTextWithParams added in v2.2.6

func (c *CSS) SetScopeTextWithParams(ctx context.Context, v *CSSSetScopeTextParams) (*CSSCSSScope, error)

SetScopeTextWithParams - Modifies the expression of a scope at-rule. Returns - scope - The resulting CSS Scope rule after modification.

func (*CSS) SetStyleSheetText

func (c *CSS) SetStyleSheetText(ctx context.Context, styleSheetId string, text string) (string, error)

SetStyleSheetText - Sets the new stylesheet text. styleSheetId - text - Returns - sourceMapURL - URL of source map associated with script (if any).

func (*CSS) SetStyleSheetTextWithParams

func (c *CSS) SetStyleSheetTextWithParams(ctx context.Context, v *CSSSetStyleSheetTextParams) (string, error)

SetStyleSheetTextWithParams - Sets the new stylesheet text. Returns - sourceMapURL - URL of source map associated with script (if any).

func (*CSS) SetStyleTexts

func (c *CSS) SetStyleTexts(ctx context.Context, edits []*CSSStyleDeclarationEdit) ([]*CSSCSSStyle, error)

SetStyleTexts - Applies specified style edits one after another in the given order. edits - Returns - styles - The resulting styles after modification.

func (*CSS) SetStyleTextsWithParams

func (c *CSS) SetStyleTextsWithParams(ctx context.Context, v *CSSSetStyleTextsParams) ([]*CSSCSSStyle, error)

SetStyleTextsWithParams - Applies specified style edits one after another in the given order. Returns - styles - The resulting styles after modification.

func (*CSS) SetSupportsText added in v2.2.5

func (c *CSS) SetSupportsText(ctx context.Context, styleSheetId string, theRange *CSSSourceRange, text string) (*CSSCSSSupports, error)

SetSupportsText - Modifies the expression of a supports at-rule. styleSheetId - range - text - Returns - supports - The resulting CSS Supports rule after modification.

func (*CSS) SetSupportsTextWithParams added in v2.2.5

func (c *CSS) SetSupportsTextWithParams(ctx context.Context, v *CSSSetSupportsTextParams) (*CSSCSSSupports, error)

SetSupportsTextWithParams - Modifies the expression of a supports at-rule. Returns - supports - The resulting CSS Supports rule after modification.

func (*CSS) StartRuleUsageTracking

func (c *CSS) StartRuleUsageTracking(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Enables the selector recording.

func (*CSS) StopRuleUsageTracking

func (c *CSS) StopRuleUsageTracking(ctx context.Context) ([]*CSSRuleUsage, error)

StopRuleUsageTracking - Stop tracking rule usage and return the list of rules that were used since last call to `takeCoverageDelta` (or since start of coverage instrumentation). Returns - ruleUsage -

func (*CSS) TakeComputedStyleUpdates added in v2.0.5

func (c *CSS) TakeComputedStyleUpdates(ctx context.Context) ([]int, error)

TakeComputedStyleUpdates - Polls the next batch of computed style updates. Returns - nodeIds - The list of node Ids that have their tracked computed styles updated.

func (*CSS) TakeCoverageDelta

func (c *CSS) TakeCoverageDelta(ctx context.Context) ([]*CSSRuleUsage, float64, error)

TakeCoverageDelta - Obtain list of rules that became used since last call to this method (or since start of coverage instrumentation). Returns - coverage - timestamp - Monotonically increasing time, in seconds.

func (*CSS) TrackComputedStyleUpdates added in v2.0.5

func (c *CSS) TrackComputedStyleUpdates(ctx context.Context, propertiesToTrack []*CSSCSSComputedStyleProperty) (*gcdmessage.ChromeResponse, error)

TrackComputedStyleUpdates - Starts tracking the given computed styles for updates. The specified array of properties replaces the one previously specified. Pass empty array to disable tracking. Use takeComputedStyleUpdates to retrieve the list of nodes that had properties modified. The changes to computed style properties are only tracked for nodes pushed to the front-end by the DOM agent. If no changes to the tracked properties occur after the node has been pushed to the front-end, no updates will be issued for the node. propertiesToTrack -

func (*CSS) TrackComputedStyleUpdatesWithParams added in v2.0.5

func (c *CSS) TrackComputedStyleUpdatesWithParams(ctx context.Context, v *CSSTrackComputedStyleUpdatesParams) (*gcdmessage.ChromeResponse, error)

TrackComputedStyleUpdatesWithParams - Starts tracking the given computed styles for updates. The specified array of properties replaces the one previously specified. Pass empty array to disable tracking. Use takeComputedStyleUpdates to retrieve the list of nodes that had properties modified. The changes to computed style properties are only tracked for nodes pushed to the front-end by the DOM agent. If no changes to the tracked properties occur after the node has been pushed to the front-end, no updates will be issued for the node.

type CSSAddRuleParams

type CSSAddRuleParams struct {
	// The css style sheet identifier where a new rule should be inserted.
	StyleSheetId string `json:"styleSheetId"`
	// The text of a new rule.
	RuleText string `json:"ruleText"`
	// Text position of a new rule in the target style sheet.
	Location *CSSSourceRange `json:"location"`
}

type CSSCSSComputedStyleProperty

type CSSCSSComputedStyleProperty struct {
	Name  string `json:"name"`  // Computed style property name.
	Value string `json:"value"` // Computed style property value.
}

No Description.

type CSSCSSContainerQuery added in v2.2.4

type CSSCSSContainerQuery struct {
	Text         string          `json:"text"`                   // Container query text.
	Range        *CSSSourceRange `json:"range,omitempty"`        // The associated rule header range in the enclosing stylesheet (if available).
	StyleSheetId string          `json:"styleSheetId,omitempty"` // Identifier of the stylesheet containing this object (if exists).
	Name         string          `json:"name,omitempty"`         // Optional name for the container.
	PhysicalAxes string          `json:"physicalAxes,omitempty"` // Optional physical axes queried for the container. enum values: Horizontal, Vertical, Both
	LogicalAxes  string          `json:"logicalAxes,omitempty"`  // Optional logical axes queried for the container. enum values: Inline, Block, Both
}

CSS container query rule descriptor.

type CSSCSSKeyframeRule

type CSSCSSKeyframeRule struct {
	StyleSheetId string       `json:"styleSheetId,omitempty"` // The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
	Origin       string       `json:"origin"`                 // Parent stylesheet's origin. enum values: injected, user-agent, inspector, regular
	KeyText      *CSSValue    `json:"keyText"`                // Associated key text.
	Style        *CSSCSSStyle `json:"style"`                  // Associated style declaration.
}

CSS keyframe rule representation.

type CSSCSSKeyframesRule

type CSSCSSKeyframesRule struct {
	AnimationName *CSSValue             `json:"animationName"` // Animation name.
	Keyframes     []*CSSCSSKeyframeRule `json:"keyframes"`     // List of keyframes.
}

CSS keyframes rule representation.

type CSSCSSLayer added in v2.2.5

type CSSCSSLayer struct {
	Text         string          `json:"text"`                   // Layer name.
	Range        *CSSSourceRange `json:"range,omitempty"`        // The associated rule header range in the enclosing stylesheet (if available).
	StyleSheetId string          `json:"styleSheetId,omitempty"` // Identifier of the stylesheet containing this object (if exists).
}

CSS Layer at-rule descriptor.

type CSSCSSLayerData added in v2.2.5

type CSSCSSLayerData struct {
	Name      string             `json:"name"`                // Layer name.
	SubLayers []*CSSCSSLayerData `json:"subLayers,omitempty"` // Direct sub-layers
	Order     float64            `json:"order"`               // Layer order. The order determines the order of the layer in the cascade order. A higher number has higher priority in the cascade order.
}

CSS Layer data.

type CSSCSSMedia

type CSSCSSMedia struct {
	Text         string           `json:"text"`                   // Media query text.
	Source       string           `json:"source"`                 // Source of the media query: "mediaRule" if specified by a @media rule, "importRule" if specified by an @import rule, "linkedSheet" if specified by a "media" attribute in a linked stylesheet's LINK tag, "inlineSheet" if specified by a "media" attribute in an inline stylesheet's STYLE tag.
	SourceURL    string           `json:"sourceURL,omitempty"`    // URL of the document containing the media query description.
	Range        *CSSSourceRange  `json:"range,omitempty"`        // The associated rule (@media or @import) header range in the enclosing stylesheet (if available).
	StyleSheetId string           `json:"styleSheetId,omitempty"` // Identifier of the stylesheet containing this object (if exists).
	MediaList    []*CSSMediaQuery `json:"mediaList,omitempty"`    // Array of media queries.
}

CSS media rule descriptor.

type CSSCSSPositionFallbackRule added in v2.3.1

type CSSCSSPositionFallbackRule struct {
	Name     *CSSValue        `json:"name"`     //
	TryRules []*CSSCSSTryRule `json:"tryRules"` // List of keyframes.
}

CSS position-fallback rule representation.

type CSSCSSProperty

type CSSCSSProperty struct {
	Name               string            `json:"name"`                         // The property name.
	Value              string            `json:"value"`                        // The property value.
	Important          bool              `json:"important,omitempty"`          // Whether the property has "!important" annotation (implies `false` if absent).
	Implicit           bool              `json:"implicit,omitempty"`           // Whether the property is implicit (implies `false` if absent).
	Text               string            `json:"text,omitempty"`               // The full property text as specified in the style.
	ParsedOk           bool              `json:"parsedOk,omitempty"`           // Whether the property is understood by the browser (implies `true` if absent).
	Disabled           bool              `json:"disabled,omitempty"`           // Whether the property is disabled by the user (present for source-based properties only).
	Range              *CSSSourceRange   `json:"range,omitempty"`              // The entire property range in the enclosing style declaration (if available).
	LonghandProperties []*CSSCSSProperty `json:"longhandProperties,omitempty"` // Parsed longhand components of this property if it is a shorthand. This field will be empty if the given property is not a shorthand.
}

CSS property declaration data.

type CSSCSSRule

type CSSCSSRule struct {
	StyleSheetId     string                  `json:"styleSheetId,omitempty"`     // The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
	SelectorList     *CSSSelectorList        `json:"selectorList"`               // Rule selector data.
	NestingSelectors []string                `json:"nestingSelectors,omitempty"` // Array of selectors from ancestor style rules, sorted by distance from the current rule.
	Origin           string                  `json:"origin"`                     // Parent stylesheet's origin. enum values: injected, user-agent, inspector, regular
	Style            *CSSCSSStyle            `json:"style"`                      // Associated style declaration.
	Media            []*CSSCSSMedia          `json:"media,omitempty"`            // Media list array (for rules involving media queries). The array enumerates media queries starting with the innermost one, going outwards.
	ContainerQueries []*CSSCSSContainerQuery `json:"containerQueries,omitempty"` // Container query list array (for rules involving container queries). The array enumerates container queries starting with the innermost one, going outwards.
	Supports         []*CSSCSSSupports       `json:"supports,omitempty"`         // @supports CSS at-rule array. The array enumerates @supports at-rules starting with the innermost one, going outwards.
	Layers           []*CSSCSSLayer          `json:"layers,omitempty"`           // Cascade layer array. Contains the layer hierarchy that this rule belongs to starting with the innermost layer and going outwards.
	Scopes           []*CSSCSSScope          `json:"scopes,omitempty"`           // @scope CSS at-rule array. The array enumerates @scope at-rules starting with the innermost one, going outwards.
}

CSS rule representation.

type CSSCSSScope added in v2.2.6

type CSSCSSScope struct {
	Text         string          `json:"text"`                   // Scope rule text.
	Range        *CSSSourceRange `json:"range,omitempty"`        // The associated rule header range in the enclosing stylesheet (if available).
	StyleSheetId string          `json:"styleSheetId,omitempty"` // Identifier of the stylesheet containing this object (if exists).
}

CSS Scope at-rule descriptor.

type CSSCSSStyle

type CSSCSSStyle struct {
	StyleSheetId     string               `json:"styleSheetId,omitempty"` // The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
	CssProperties    []*CSSCSSProperty    `json:"cssProperties"`          // CSS properties in the style.
	ShorthandEntries []*CSSShorthandEntry `json:"shorthandEntries"`       // Computed values for all shorthands found in the style.
	CssText          string               `json:"cssText,omitempty"`      // Style declaration text (if available).
	Range            *CSSSourceRange      `json:"range,omitempty"`        // Style declaration range in the enclosing stylesheet (if available).
}

CSS style representation.

type CSSCSSStyleSheetHeader

type CSSCSSStyleSheetHeader struct {
	StyleSheetId  string  `json:"styleSheetId"`            // The stylesheet identifier.
	FrameId       string  `json:"frameId"`                 // Owner frame identifier.
	SourceURL     string  `json:"sourceURL"`               // Stylesheet resource URL. Empty if this is a constructed stylesheet created using new CSSStyleSheet() (but non-empty if this is a constructed sylesheet imported as a CSS module script).
	SourceMapURL  string  `json:"sourceMapURL,omitempty"`  // URL of source map associated with the stylesheet (if any).
	Origin        string  `json:"origin"`                  // Stylesheet origin. enum values: injected, user-agent, inspector, regular
	Title         string  `json:"title"`                   // Stylesheet title.
	OwnerNode     int     `json:"ownerNode,omitempty"`     // The backend id for the owner node of the stylesheet.
	Disabled      bool    `json:"disabled"`                // Denotes whether the stylesheet is disabled.
	HasSourceURL  bool    `json:"hasSourceURL,omitempty"`  // Whether the sourceURL field value comes from the sourceURL comment.
	IsInline      bool    `json:"isInline"`                // Whether this stylesheet is created for STYLE tag by parser. This flag is not set for document.written STYLE tags.
	IsMutable     bool    `json:"isMutable"`               // Whether this stylesheet is mutable. Inline stylesheets become mutable after they have been modified via CSSOM API. <link> element's stylesheets become mutable only if DevTools modifies them. Constructed stylesheets (new CSSStyleSheet()) are mutable immediately after creation.
	IsConstructed bool    `json:"isConstructed"`           // True if this stylesheet is created through new CSSStyleSheet() or imported as a CSS module script.
	StartLine     float64 `json:"startLine"`               // Line offset of the stylesheet within the resource (zero based).
	StartColumn   float64 `json:"startColumn"`             // Column offset of the stylesheet within the resource (zero based).
	Length        float64 `json:"length"`                  // Size of the content (in characters).
	EndLine       float64 `json:"endLine"`                 // Line offset of the end of the stylesheet within the resource (zero based).
	EndColumn     float64 `json:"endColumn"`               // Column offset of the end of the stylesheet within the resource (zero based).
	LoadingFailed bool    `json:"loadingFailed,omitempty"` // If the style sheet was loaded from a network resource, this indicates when the resource failed to load
}

CSS stylesheet metainformation.

type CSSCSSSupports added in v2.2.5

type CSSCSSSupports struct {
	Text         string          `json:"text"`                   // Supports rule text.
	Active       bool            `json:"active"`                 // Whether the supports condition is satisfied.
	Range        *CSSSourceRange `json:"range,omitempty"`        // The associated rule header range in the enclosing stylesheet (if available).
	StyleSheetId string          `json:"styleSheetId,omitempty"` // Identifier of the stylesheet containing this object (if exists).
}

CSS Supports at-rule descriptor.

type CSSCSSTryRule added in v2.3.1

type CSSCSSTryRule struct {
	StyleSheetId string       `json:"styleSheetId,omitempty"` // The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
	Origin       string       `json:"origin"`                 // Parent stylesheet's origin. enum values: injected, user-agent, inspector, regular
	Style        *CSSCSSStyle `json:"style"`                  // Associated style declaration.
}

CSS try rule representation.

type CSSCollectClassNamesParams

type CSSCollectClassNamesParams struct {
	//
	StyleSheetId string `json:"styleSheetId"`
}

type CSSCreateStyleSheetParams

type CSSCreateStyleSheetParams struct {
	// Identifier of the frame where "via-inspector" stylesheet should be created.
	FrameId string `json:"frameId"`
}

type CSSFontFace

type CSSFontFace struct {
	FontFamily         string                  `json:"fontFamily"`                  // The font-family.
	FontStyle          string                  `json:"fontStyle"`                   // The font-style.
	FontVariant        string                  `json:"fontVariant"`                 // The font-variant.
	FontWeight         string                  `json:"fontWeight"`                  // The font-weight.
	FontStretch        string                  `json:"fontStretch"`                 // The font-stretch.
	FontDisplay        string                  `json:"fontDisplay"`                 // The font-display.
	UnicodeRange       string                  `json:"unicodeRange"`                // The unicode-range.
	Src                string                  `json:"src"`                         // The src.
	PlatformFontFamily string                  `json:"platformFontFamily"`          // The resolved platform font family
	FontVariationAxes  []*CSSFontVariationAxis `json:"fontVariationAxes,omitempty"` // Available variation settings (a.k.a. "axes").
}

Properties of a web font: https://www.w3.org/TR/2008/REC-CSS2-20080411/fonts.html#font-descriptions and additional information such as platformFontFamily and fontVariationAxes.

type CSSFontVariationAxis

type CSSFontVariationAxis struct {
	Tag          string  `json:"tag"`          // The font-variation-setting tag (a.k.a. "axis tag").
	Name         string  `json:"name"`         // Human-readable variation name in the default language (normally, "en").
	MinValue     float64 `json:"minValue"`     // The minimum value (inclusive) the font supports for this tag.
	MaxValue     float64 `json:"maxValue"`     // The maximum value (inclusive) the font supports for this tag.
	DefaultValue float64 `json:"defaultValue"` // The default value.
}

Information about font variation axes for variable fonts

type CSSFontsUpdatedEvent

type CSSFontsUpdatedEvent struct {
	Method string `json:"method"`
	Params struct {
		Font *CSSFontFace `json:"font,omitempty"` // The web font that has loaded.
	} `json:"Params,omitempty"`
}

Fires whenever a web font is updated. A non-empty font parameter indicates a successfully loaded web font.

type CSSForcePseudoStateParams

type CSSForcePseudoStateParams struct {
	// The element id for which to force the pseudo state.
	NodeId int `json:"nodeId"`
	// Element pseudo classes to force when computing the element's style.
	ForcedPseudoClasses []string `json:"forcedPseudoClasses"`
}

type CSSGetBackgroundColorsParams

type CSSGetBackgroundColorsParams struct {
	// Id of the node to get background colors for.
	NodeId int `json:"nodeId"`
}

type CSSGetComputedStyleForNodeParams

type CSSGetComputedStyleForNodeParams struct {
	//
	NodeId int `json:"nodeId"`
}

type CSSGetInlineStylesForNodeParams

type CSSGetInlineStylesForNodeParams struct {
	//
	NodeId int `json:"nodeId"`
}

type CSSGetLayersForNodeParams added in v2.2.5

type CSSGetLayersForNodeParams struct {
	//
	NodeId int `json:"nodeId"`
}

type CSSGetMatchedStylesForNodeParams

type CSSGetMatchedStylesForNodeParams struct {
	//
	NodeId int `json:"nodeId"`
}

type CSSGetPlatformFontsForNodeParams

type CSSGetPlatformFontsForNodeParams struct {
	//
	NodeId int `json:"nodeId"`
}

type CSSGetStyleSheetTextParams

type CSSGetStyleSheetTextParams struct {
	//
	StyleSheetId string `json:"styleSheetId"`
}

type CSSInheritedPseudoElementMatches added in v2.2.5

type CSSInheritedPseudoElementMatches struct {
	PseudoElements []*CSSPseudoElementMatches `json:"pseudoElements"` // Matches of pseudo styles from the pseudos of an ancestor node.
}

Inherited pseudo element matches from pseudos of an ancestor node.

type CSSInheritedStyleEntry

type CSSInheritedStyleEntry struct {
	InlineStyle     *CSSCSSStyle    `json:"inlineStyle,omitempty"` // The ancestor node's inline style, if any, in the style inheritance chain.
	MatchedCSSRules []*CSSRuleMatch `json:"matchedCSSRules"`       // Matches of CSS rules matching the ancestor node in the style inheritance chain.
}

Inherited CSS rule collection from ancestor node.

type CSSMediaQuery

type CSSMediaQuery struct {
	Expressions []*CSSMediaQueryExpression `json:"expressions"` // Array of media query expressions.
	Active      bool                       `json:"active"`      // Whether the media query condition is satisfied.
}

Media query descriptor.

type CSSMediaQueryExpression

type CSSMediaQueryExpression struct {
	Value          float64         `json:"value"`                    // Media query expression value.
	Unit           string          `json:"unit"`                     // Media query expression units.
	Feature        string          `json:"feature"`                  // Media query expression feature.
	ValueRange     *CSSSourceRange `json:"valueRange,omitempty"`     // The associated range of the value text in the enclosing stylesheet (if available).
	ComputedLength float64         `json:"computedLength,omitempty"` // Computed length of media query expression (if applicable).
}

Media query expression descriptor.

type CSSPlatformFontUsage

type CSSPlatformFontUsage struct {
	FamilyName   string  `json:"familyName"`   // Font's family name reported by platform.
	IsCustomFont bool    `json:"isCustomFont"` // Indicates if the font was downloaded or resolved locally.
	GlyphCount   float64 `json:"glyphCount"`   // Amount of glyphs that were rendered with this font.
}

Information about amount of glyphs that were rendered with given font.

type CSSPseudoElementMatches

type CSSPseudoElementMatches struct {
	PseudoType       string          `json:"pseudoType"`                 // Pseudo element type. enum values: first-line, first-letter, before, after, marker, backdrop, selection, target-text, spelling-error, grammar-error, highlight, first-line-inherited, scrollbar, scrollbar-thumb, scrollbar-button, scrollbar-track, scrollbar-track-piece, scrollbar-corner, resizer, input-list-button, view-transition, view-transition-group, view-transition-image-pair, view-transition-old, view-transition-new
	PseudoIdentifier string          `json:"pseudoIdentifier,omitempty"` // Pseudo element custom ident.
	Matches          []*CSSRuleMatch `json:"matches"`                    // Matches of CSS rules applicable to the pseudo style.
}

CSS rule collection for a single pseudo style.

type CSSRuleMatch

type CSSRuleMatch struct {
	Rule              *CSSCSSRule `json:"rule"`              // CSS rule in the match.
	MatchingSelectors []int       `json:"matchingSelectors"` // Matching selector indices in the rule's selectorList selectors (0-based).
}

Match data for a CSS rule.

type CSSRuleUsage

type CSSRuleUsage struct {
	StyleSheetId string  `json:"styleSheetId"` // The css style sheet identifier (absent for user agent stylesheet and user-specified stylesheet rules) this rule came from.
	StartOffset  float64 `json:"startOffset"`  // Offset of the start of the rule (including selector) from the beginning of the stylesheet.
	EndOffset    float64 `json:"endOffset"`    // Offset of the end of the rule body from the beginning of the stylesheet.
	Used         bool    `json:"used"`         // Indicates whether the rule was actually used by some element in the page.
}

CSS coverage information.

type CSSSelectorList

type CSSSelectorList struct {
	Selectors []*CSSValue `json:"selectors"` // Selectors in the list.
	Text      string      `json:"text"`      // Rule selector text.
}

Selector list data.

type CSSSetContainerQueryTextParams added in v2.2.4

type CSSSetContainerQueryTextParams struct {
	//
	StyleSheetId string `json:"styleSheetId"`
	//
	TheRange *CSSSourceRange `json:"range"`
	//
	Text string `json:"text"`
}

type CSSSetEffectivePropertyValueForNodeParams

type CSSSetEffectivePropertyValueForNodeParams struct {
	// The element id for which to set property.
	NodeId int `json:"nodeId"`
	//
	PropertyName string `json:"propertyName"`
	//
	Value string `json:"value"`
}

type CSSSetKeyframeKeyParams

type CSSSetKeyframeKeyParams struct {
	//
	StyleSheetId string `json:"styleSheetId"`
	//
	TheRange *CSSSourceRange `json:"range"`
	//
	KeyText string `json:"keyText"`
}

type CSSSetLocalFontsEnabledParams

type CSSSetLocalFontsEnabledParams struct {
	// Whether rendering of local fonts is enabled.
	Enabled bool `json:"enabled"`
}

type CSSSetMediaTextParams

type CSSSetMediaTextParams struct {
	//
	StyleSheetId string `json:"styleSheetId"`
	//
	TheRange *CSSSourceRange `json:"range"`
	//
	Text string `json:"text"`
}

type CSSSetRuleSelectorParams

type CSSSetRuleSelectorParams struct {
	//
	StyleSheetId string `json:"styleSheetId"`
	//
	TheRange *CSSSourceRange `json:"range"`
	//
	Selector string `json:"selector"`
}

type CSSSetScopeTextParams added in v2.2.6

type CSSSetScopeTextParams struct {
	//
	StyleSheetId string `json:"styleSheetId"`
	//
	TheRange *CSSSourceRange `json:"range"`
	//
	Text string `json:"text"`
}

type CSSSetStyleSheetTextParams

type CSSSetStyleSheetTextParams struct {
	//
	StyleSheetId string `json:"styleSheetId"`
	//
	Text string `json:"text"`
}

type CSSSetStyleTextsParams

type CSSSetStyleTextsParams struct {
	//
	Edits []*CSSStyleDeclarationEdit `json:"edits"`
}

type CSSSetSupportsTextParams added in v2.2.5

type CSSSetSupportsTextParams struct {
	//
	StyleSheetId string `json:"styleSheetId"`
	//
	TheRange *CSSSourceRange `json:"range"`
	//
	Text string `json:"text"`
}

type CSSShorthandEntry

type CSSShorthandEntry struct {
	Name      string `json:"name"`                // Shorthand name.
	Value     string `json:"value"`               // Shorthand value.
	Important bool   `json:"important,omitempty"` // Whether the property has "!important" annotation (implies `false` if absent).
}

No Description.

type CSSSourceRange

type CSSSourceRange struct {
	StartLine   int `json:"startLine"`   // Start line of range.
	StartColumn int `json:"startColumn"` // Start column of range (inclusive).
	EndLine     int `json:"endLine"`     // End line of range
	EndColumn   int `json:"endColumn"`   // End column of range (exclusive).
}

Text range within a resource. All numbers are zero-based.

type CSSStyleDeclarationEdit

type CSSStyleDeclarationEdit struct {
	StyleSheetId string          `json:"styleSheetId"` // The css style sheet identifier.
	Range        *CSSSourceRange `json:"range"`        // The range of the style text in the enclosing stylesheet.
	Text         string          `json:"text"`         // New style text.
}

A descriptor of operation to mutate style declaration text.

type CSSStyleSheetAddedEvent

type CSSStyleSheetAddedEvent struct {
	Method string `json:"method"`
	Params struct {
		Header *CSSCSSStyleSheetHeader `json:"header"` // Added stylesheet metainfo.
	} `json:"Params,omitempty"`
}

Fired whenever an active document stylesheet is added.

type CSSStyleSheetChangedEvent

type CSSStyleSheetChangedEvent struct {
	Method string `json:"method"`
	Params struct {
		StyleSheetId string `json:"styleSheetId"` //
	} `json:"Params,omitempty"`
}

Fired whenever a stylesheet is changed as a result of the client operation.

type CSSStyleSheetRemovedEvent

type CSSStyleSheetRemovedEvent struct {
	Method string `json:"method"`
	Params struct {
		StyleSheetId string `json:"styleSheetId"` // Identifier of the removed stylesheet.
	} `json:"Params,omitempty"`
}

Fired whenever an active document stylesheet is removed.

type CSSTrackComputedStyleUpdatesParams added in v2.0.5

type CSSTrackComputedStyleUpdatesParams struct {
	//
	PropertiesToTrack []*CSSCSSComputedStyleProperty `json:"propertiesToTrack"`
}

type CSSValue

type CSSValue struct {
	Text  string          `json:"text"`            // Value text.
	Range *CSSSourceRange `json:"range,omitempty"` // Value range in the underlying resource (if available).
}

Data for a simple selector (these are delimited by commas in a selector list).

type CacheStorage

type CacheStorage struct {
	// contains filtered or unexported fields
}

func NewCacheStorage

func NewCacheStorage(target gcdmessage.ChromeTargeter) *CacheStorage

func (*CacheStorage) DeleteCache

func (c *CacheStorage) DeleteCache(ctx context.Context, cacheId string) (*gcdmessage.ChromeResponse, error)

DeleteCache - Deletes a cache. cacheId - Id of cache for deletion.

func (*CacheStorage) DeleteCacheWithParams

DeleteCacheWithParams - Deletes a cache.

func (*CacheStorage) DeleteEntry

func (c *CacheStorage) DeleteEntry(ctx context.Context, cacheId string, request string) (*gcdmessage.ChromeResponse, error)

DeleteEntry - Deletes a cache entry. cacheId - Id of cache where the entry will be deleted. request - URL spec of the request.

func (*CacheStorage) DeleteEntryWithParams

DeleteEntryWithParams - Deletes a cache entry.

func (*CacheStorage) RequestCacheNames

func (c *CacheStorage) RequestCacheNames(ctx context.Context, securityOrigin string, storageKey string) ([]*CacheStorageCache, error)

RequestCacheNames - Requests cache names. securityOrigin - At least and at most one of securityOrigin, storageKey must be specified. Security origin. storageKey - Storage key. Returns - caches - Caches for the security origin.

func (*CacheStorage) RequestCacheNamesWithParams

func (c *CacheStorage) RequestCacheNamesWithParams(ctx context.Context, v *CacheStorageRequestCacheNamesParams) ([]*CacheStorageCache, error)

RequestCacheNamesWithParams - Requests cache names. Returns - caches - Caches for the security origin.

func (*CacheStorage) RequestCachedResponse

func (c *CacheStorage) RequestCachedResponse(ctx context.Context, cacheId string, requestURL string, requestHeaders []*CacheStorageHeader) (*CacheStorageCachedResponse, error)

RequestCachedResponse - Fetches cache entry. cacheId - Id of cache that contains the entry. requestURL - URL spec of the request. requestHeaders - headers of the request. Returns - response - Response read from the cache.

func (*CacheStorage) RequestCachedResponseWithParams

RequestCachedResponseWithParams - Fetches cache entry. Returns - response - Response read from the cache.

func (*CacheStorage) RequestEntries

func (c *CacheStorage) RequestEntries(ctx context.Context, cacheId string, skipCount int, pageSize int, pathFilter string) ([]*CacheStorageDataEntry, float64, error)

RequestEntries - Requests data from cache. cacheId - ID of cache to get entries from. skipCount - Number of records to skip. pageSize - Number of records to fetch. pathFilter - If present, only return the entries containing this substring in the path Returns - cacheDataEntries - Array of object store data entries. returnCount - Count of returned entries from this storage. If pathFilter is empty, it is the count of all entries from this storage.

func (*CacheStorage) RequestEntriesWithParams

RequestEntriesWithParams - Requests data from cache. Returns - cacheDataEntries - Array of object store data entries. returnCount - Count of returned entries from this storage. If pathFilter is empty, it is the count of all entries from this storage.

type CacheStorageCache

type CacheStorageCache struct {
	CacheId        string `json:"cacheId"`        // An opaque unique id of the cache.
	SecurityOrigin string `json:"securityOrigin"` // Security origin of the cache.
	StorageKey     string `json:"storageKey"`     // Storage key of the cache.
	CacheName      string `json:"cacheName"`      // The name of the cache.
}

Cache identifier.

type CacheStorageCachedResponse

type CacheStorageCachedResponse struct {
	Body string `json:"body"` // Entry content, base64-encoded. (Encoded as a base64 string when passed over JSON)
}

Cached response

type CacheStorageDataEntry

type CacheStorageDataEntry struct {
	RequestURL         string                `json:"requestURL"`         // Request URL.
	RequestMethod      string                `json:"requestMethod"`      // Request method.
	RequestHeaders     []*CacheStorageHeader `json:"requestHeaders"`     // Request headers
	ResponseTime       float64               `json:"responseTime"`       // Number of seconds since epoch.
	ResponseStatus     int                   `json:"responseStatus"`     // HTTP response status code.
	ResponseStatusText string                `json:"responseStatusText"` // HTTP response status text.
	ResponseType       string                `json:"responseType"`       // HTTP response type enum values: basic, cors, default, error, opaqueResponse, opaqueRedirect
	ResponseHeaders    []*CacheStorageHeader `json:"responseHeaders"`    // Response headers
}

Data entry.

type CacheStorageDeleteCacheParams

type CacheStorageDeleteCacheParams struct {
	// Id of cache for deletion.
	CacheId string `json:"cacheId"`
}

type CacheStorageDeleteEntryParams

type CacheStorageDeleteEntryParams struct {
	// Id of cache where the entry will be deleted.
	CacheId string `json:"cacheId"`
	// URL spec of the request.
	Request string `json:"request"`
}

type CacheStorageHeader

type CacheStorageHeader struct {
	Name  string `json:"name"`  //
	Value string `json:"value"` //
}

No Description.

type CacheStorageRequestCacheNamesParams

type CacheStorageRequestCacheNamesParams struct {
	// At least and at most one of securityOrigin, storageKey must be specified. Security origin.
	SecurityOrigin string `json:"securityOrigin,omitempty"`
	// Storage key.
	StorageKey string `json:"storageKey,omitempty"`
}

type CacheStorageRequestCachedResponseParams

type CacheStorageRequestCachedResponseParams struct {
	// Id of cache that contains the entry.
	CacheId string `json:"cacheId"`
	// URL spec of the request.
	RequestURL string `json:"requestURL"`
	// headers of the request.
	RequestHeaders []*CacheStorageHeader `json:"requestHeaders"`
}

type CacheStorageRequestEntriesParams

type CacheStorageRequestEntriesParams struct {
	// ID of cache to get entries from.
	CacheId string `json:"cacheId"`
	// Number of records to skip.
	SkipCount int `json:"skipCount,omitempty"`
	// Number of records to fetch.
	PageSize int `json:"pageSize,omitempty"`
	// If present, only return the entries containing this substring in the path
	PathFilter string `json:"pathFilter,omitempty"`
}

type Cast

type Cast struct {
	// contains filtered or unexported fields
}

func NewCast

func NewCast(target gcdmessage.ChromeTargeter) *Cast

func (*Cast) Disable

func (c *Cast) Disable(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Stops observing for sinks and issues.

func (*Cast) Enable

func (c *Cast) Enable(ctx context.Context, presentationUrl string) (*gcdmessage.ChromeResponse, error)

Enable - Starts observing for sinks that can be used for tab mirroring, and if set, sinks compatible with |presentationUrl| as well. When sinks are found, a |sinksUpdated| event is fired. Also starts observing for issue messages. When an issue is added or removed, an |issueUpdated| event is fired. presentationUrl -

func (*Cast) EnableWithParams

func (c *Cast) EnableWithParams(ctx context.Context, v *CastEnableParams) (*gcdmessage.ChromeResponse, error)

EnableWithParams - Starts observing for sinks that can be used for tab mirroring, and if set, sinks compatible with |presentationUrl| as well. When sinks are found, a |sinksUpdated| event is fired. Also starts observing for issue messages. When an issue is added or removed, an |issueUpdated| event is fired.

func (*Cast) SetSinkToUse

func (c *Cast) SetSinkToUse(ctx context.Context, sinkName string) (*gcdmessage.ChromeResponse, error)

SetSinkToUse - Sets a sink to be used when the web page requests the browser to choose a sink via Presentation API, Remote Playback API, or Cast SDK. sinkName -

func (*Cast) SetSinkToUseWithParams

func (c *Cast) SetSinkToUseWithParams(ctx context.Context, v *CastSetSinkToUseParams) (*gcdmessage.ChromeResponse, error)

SetSinkToUseWithParams - Sets a sink to be used when the web page requests the browser to choose a sink via Presentation API, Remote Playback API, or Cast SDK.

func (*Cast) StartDesktopMirroring added in v2.2.5

func (c *Cast) StartDesktopMirroring(ctx context.Context, sinkName string) (*gcdmessage.ChromeResponse, error)

StartDesktopMirroring - Starts mirroring the desktop to the sink. sinkName -

func (*Cast) StartDesktopMirroringWithParams added in v2.2.5

func (c *Cast) StartDesktopMirroringWithParams(ctx context.Context, v *CastStartDesktopMirroringParams) (*gcdmessage.ChromeResponse, error)

StartDesktopMirroringWithParams - Starts mirroring the desktop to the sink.

func (*Cast) StartTabMirroring

func (c *Cast) StartTabMirroring(ctx context.Context, sinkName string) (*gcdmessage.ChromeResponse, error)

StartTabMirroring - Starts mirroring the tab to the sink. sinkName -

func (*Cast) StartTabMirroringWithParams

func (c *Cast) StartTabMirroringWithParams(ctx context.Context, v *CastStartTabMirroringParams) (*gcdmessage.ChromeResponse, error)

StartTabMirroringWithParams - Starts mirroring the tab to the sink.

func (*Cast) StopCasting

func (c *Cast) StopCasting(ctx context.Context, sinkName string) (*gcdmessage.ChromeResponse, error)

StopCasting - Stops the active Cast session on the sink. sinkName -

func (*Cast) StopCastingWithParams

func (c *Cast) StopCastingWithParams(ctx context.Context, v *CastStopCastingParams) (*gcdmessage.ChromeResponse, error)

StopCastingWithParams - Stops the active Cast session on the sink.

type CastEnableParams

type CastEnableParams struct {
	//
	PresentationUrl string `json:"presentationUrl,omitempty"`
}

type CastIssueUpdatedEvent

type CastIssueUpdatedEvent struct {
	Method string `json:"method"`
	Params struct {
		IssueMessage string `json:"issueMessage"` //
	} `json:"Params,omitempty"`
}

This is fired whenever the outstanding issue/error message changes. |issueMessage| is empty if there is no issue.

type CastSetSinkToUseParams

type CastSetSinkToUseParams struct {
	//
	SinkName string `json:"sinkName"`
}

type CastSink

type CastSink struct {
	Name    string `json:"name"`              //
	Id      string `json:"id"`                //
	Session string `json:"session,omitempty"` // Text describing the current session. Present only if there is an active session on the sink.
}

No Description.

type CastSinksUpdatedEvent

type CastSinksUpdatedEvent struct {
	Method string `json:"method"`
	Params struct {
		Sinks []*CastSink `json:"sinks"` //
	} `json:"Params,omitempty"`
}

This is fired whenever the list of available sinks changes. A sink is a device or a software surface that you can cast to.

type CastStartDesktopMirroringParams added in v2.2.5

type CastStartDesktopMirroringParams struct {
	//
	SinkName string `json:"sinkName"`
}

type CastStartTabMirroringParams

type CastStartTabMirroringParams struct {
	//
	SinkName string `json:"sinkName"`
}

type CastStopCastingParams

type CastStopCastingParams struct {
	//
	SinkName string `json:"sinkName"`
}

type Console

type Console struct {
	// contains filtered or unexported fields
}

func NewConsole

func NewConsole(target gcdmessage.ChromeTargeter) *Console

func (*Console) ClearMessages

func (c *Console) ClearMessages(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Does nothing.

func (*Console) Disable

func (c *Console) Disable(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Disables console domain, prevents further console messages from being reported to the client.

func (*Console) Enable

Enables console domain, sends the messages collected so far to the client by means of the `messageAdded` notification.

type ConsoleConsoleMessage

type ConsoleConsoleMessage struct {
	Source string `json:"source"`           // Message source.
	Level  string `json:"level"`            // Message severity.
	Text   string `json:"text"`             // Message text.
	Url    string `json:"url,omitempty"`    // URL of the message origin.
	Line   int    `json:"line,omitempty"`   // Line number in the resource that generated this message (1-based).
	Column int    `json:"column,omitempty"` // Column number in the resource that generated this message (1-based).
}

Console message.

type ConsoleMessageAddedEvent

type ConsoleMessageAddedEvent struct {
	Method string `json:"method"`
	Params struct {
		Message *ConsoleConsoleMessage `json:"message"` // Console message that has been added.
	} `json:"Params,omitempty"`
}

Issued when new console message is added.

type DOM

type DOM struct {
	// contains filtered or unexported fields
}

func NewDOM

func NewDOM(target gcdmessage.ChromeTargeter) *DOM

func (*DOM) CollectClassNamesFromSubtree

func (c *DOM) CollectClassNamesFromSubtree(ctx context.Context, nodeId int) ([]string, error)

CollectClassNamesFromSubtree - Collects class names for the node with given id and all of it's child nodes. nodeId - Id of the node to collect class names. Returns - classNames - Class name list.

func (*DOM) CollectClassNamesFromSubtreeWithParams

func (c *DOM) CollectClassNamesFromSubtreeWithParams(ctx context.Context, v *DOMCollectClassNamesFromSubtreeParams) ([]string, error)

CollectClassNamesFromSubtreeWithParams - Collects class names for the node with given id and all of it's child nodes. Returns - classNames - Class name list.

func (*DOM) CopyTo

func (c *DOM) CopyTo(ctx context.Context, nodeId int, targetNodeId int, insertBeforeNodeId int) (int, error)

CopyTo - Creates a deep copy of the specified node and places it into the target container before the given anchor. nodeId - Id of the node to copy. targetNodeId - Id of the element to drop the copy into. insertBeforeNodeId - Drop the copy before this node (if absent, the copy becomes the last child of `targetNodeId`). Returns - nodeId - Id of the node clone.

func (*DOM) CopyToWithParams

func (c *DOM) CopyToWithParams(ctx context.Context, v *DOMCopyToParams) (int, error)

CopyToWithParams - Creates a deep copy of the specified node and places it into the target container before the given anchor. Returns - nodeId - Id of the node clone.

func (*DOM) DescribeNode

func (c *DOM) DescribeNode(ctx context.Context, nodeId int, backendNodeId int, objectId string, depth int, pierce bool) (*DOMNode, error)

DescribeNode - Describes node given its id, does not require domain to be enabled. Does not start tracking any objects, can be used for automation. nodeId - Identifier of the node. backendNodeId - Identifier of the backend node. objectId - JavaScript object id of the node wrapper. depth - The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0. pierce - Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false). Returns - node - Node description.

func (*DOM) DescribeNodeWithParams

func (c *DOM) DescribeNodeWithParams(ctx context.Context, v *DOMDescribeNodeParams) (*DOMNode, error)

DescribeNodeWithParams - Describes node given its id, does not require domain to be enabled. Does not start tracking any objects, can be used for automation. Returns - node - Node description.

func (*DOM) Disable

func (c *DOM) Disable(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Disables DOM agent for the given page.

func (*DOM) DiscardSearchResults

func (c *DOM) DiscardSearchResults(ctx context.Context, searchId string) (*gcdmessage.ChromeResponse, error)

DiscardSearchResults - Discards search results from the session with the given id. `getSearchResults` should no longer be called for that search. searchId - Unique search session identifier.

func (*DOM) DiscardSearchResultsWithParams

func (c *DOM) DiscardSearchResultsWithParams(ctx context.Context, v *DOMDiscardSearchResultsParams) (*gcdmessage.ChromeResponse, error)

DiscardSearchResultsWithParams - Discards search results from the session with the given id. `getSearchResults` should no longer be called for that search.

func (*DOM) Enable

func (c *DOM) Enable(ctx context.Context, includeWhitespace string) (*gcdmessage.ChromeResponse, error)

Enable - Enables DOM agent for the given page. includeWhitespace - Whether to include whitespaces in the children array of returned Nodes.

func (*DOM) EnableWithParams added in v2.2.5

func (c *DOM) EnableWithParams(ctx context.Context, v *DOMEnableParams) (*gcdmessage.ChromeResponse, error)

EnableWithParams - Enables DOM agent for the given page.

func (*DOM) Focus

func (c *DOM) Focus(ctx context.Context, nodeId int, backendNodeId int, objectId string) (*gcdmessage.ChromeResponse, error)

Focus - Focuses the given element. nodeId - Identifier of the node. backendNodeId - Identifier of the backend node. objectId - JavaScript object id of the node wrapper.

func (*DOM) FocusWithParams

func (c *DOM) FocusWithParams(ctx context.Context, v *DOMFocusParams) (*gcdmessage.ChromeResponse, error)

FocusWithParams - Focuses the given element.

func (*DOM) GetAttributes

func (c *DOM) GetAttributes(ctx context.Context, nodeId int) ([]string, error)

GetAttributes - Returns attributes for the specified node. nodeId - Id of the node to retrieve attibutes for. Returns - attributes - An interleaved array of node attribute names and values.

func (*DOM) GetAttributesWithParams

func (c *DOM) GetAttributesWithParams(ctx context.Context, v *DOMGetAttributesParams) ([]string, error)

GetAttributesWithParams - Returns attributes for the specified node. Returns - attributes - An interleaved array of node attribute names and values.

func (*DOM) GetBoxModel

func (c *DOM) GetBoxModel(ctx context.Context, nodeId int, backendNodeId int, objectId string) (*DOMBoxModel, error)

GetBoxModel - Returns boxes for the given node. nodeId - Identifier of the node. backendNodeId - Identifier of the backend node. objectId - JavaScript object id of the node wrapper. Returns - model - Box model for the node.

func (*DOM) GetBoxModelWithParams

func (c *DOM) GetBoxModelWithParams(ctx context.Context, v *DOMGetBoxModelParams) (*DOMBoxModel, error)

GetBoxModelWithParams - Returns boxes for the given node. Returns - model - Box model for the node.

func (*DOM) GetContainerForNode added in v2.2.4

func (c *DOM) GetContainerForNode(ctx context.Context, nodeId int, containerName string, physicalAxes string, logicalAxes string) (int, error)

GetContainerForNode - Returns the query container of the given node based on container query conditions: containerName, physical, and logical axes. If no axes are provided, the style container is returned, which is the direct parent or the closest element with a matching container-name. nodeId - containerName - physicalAxes - enum values: Horizontal, Vertical, Both logicalAxes - enum values: Inline, Block, Both Returns - nodeId - The container node for the given node, or null if not found.

func (*DOM) GetContainerForNodeWithParams added in v2.2.4

func (c *DOM) GetContainerForNodeWithParams(ctx context.Context, v *DOMGetContainerForNodeParams) (int, error)

GetContainerForNodeWithParams - Returns the query container of the given node based on container query conditions: containerName, physical, and logical axes. If no axes are provided, the style container is returned, which is the direct parent or the closest element with a matching container-name. Returns - nodeId - The container node for the given node, or null if not found.

func (*DOM) GetContentQuads

func (c *DOM) GetContentQuads(ctx context.Context, nodeId int, backendNodeId int, objectId string) ([][]float64, error)

GetContentQuads - Returns quads that describe node position on the page. This method might return multiple quads for inline nodes. nodeId - Identifier of the node. backendNodeId - Identifier of the backend node. objectId - JavaScript object id of the node wrapper. Returns - quads - Quads that describe node layout relative to viewport.

func (*DOM) GetContentQuadsWithParams

func (c *DOM) GetContentQuadsWithParams(ctx context.Context, v *DOMGetContentQuadsParams) ([][]float64, error)

GetContentQuadsWithParams - Returns quads that describe node position on the page. This method might return multiple quads for inline nodes. Returns - quads - Quads that describe node layout relative to viewport.

func (*DOM) GetDocument

func (c *DOM) GetDocument(ctx context.Context, depth int, pierce bool) (*DOMNode, error)

GetDocument - Returns the root DOM node (and optionally the subtree) to the caller. Implicitly enables the DOM domain events for the current target. depth - The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0. pierce - Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false). Returns - root - Resulting node.

func (*DOM) GetDocumentWithParams

func (c *DOM) GetDocumentWithParams(ctx context.Context, v *DOMGetDocumentParams) (*DOMNode, error)

GetDocumentWithParams - Returns the root DOM node (and optionally the subtree) to the caller. Implicitly enables the DOM domain events for the current target. Returns - root - Resulting node.

func (*DOM) GetFileInfo

func (c *DOM) GetFileInfo(ctx context.Context, objectId string) (string, error)

GetFileInfo - Returns file information for the given File wrapper. objectId - JavaScript object id of the node wrapper. Returns - path -

func (*DOM) GetFileInfoWithParams

func (c *DOM) GetFileInfoWithParams(ctx context.Context, v *DOMGetFileInfoParams) (string, error)

GetFileInfoWithParams - Returns file information for the given File wrapper. Returns - path -

func (*DOM) GetFlattenedDocument

func (c *DOM) GetFlattenedDocument(ctx context.Context, depth int, pierce bool) ([]*DOMNode, error)

GetFlattenedDocument - Returns the root DOM node (and optionally the subtree) to the caller. Deprecated, as it is not designed to work well with the rest of the DOM agent. Use DOMSnapshot.captureSnapshot instead. depth - The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0. pierce - Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false). Returns - nodes - Resulting node.

func (*DOM) GetFlattenedDocumentWithParams

func (c *DOM) GetFlattenedDocumentWithParams(ctx context.Context, v *DOMGetFlattenedDocumentParams) ([]*DOMNode, error)

GetFlattenedDocumentWithParams - Returns the root DOM node (and optionally the subtree) to the caller. Deprecated, as it is not designed to work well with the rest of the DOM agent. Use DOMSnapshot.captureSnapshot instead. Returns - nodes - Resulting node.

func (*DOM) GetFrameOwner

func (c *DOM) GetFrameOwner(ctx context.Context, frameId string) (int, int, error)

GetFrameOwner - Returns iframe node that owns iframe with the given domain. frameId - Returns - backendNodeId - Resulting node. nodeId - Id of the node at given coordinates, only when enabled and requested document.

func (*DOM) GetFrameOwnerWithParams

func (c *DOM) GetFrameOwnerWithParams(ctx context.Context, v *DOMGetFrameOwnerParams) (int, int, error)

GetFrameOwnerWithParams - Returns iframe node that owns iframe with the given domain. Returns - backendNodeId - Resulting node. nodeId - Id of the node at given coordinates, only when enabled and requested document.

func (*DOM) GetNodeForLocation

func (c *DOM) GetNodeForLocation(ctx context.Context, x int, y int, includeUserAgentShadowDOM bool, ignorePointerEventsNone bool) (int, string, int, error)

GetNodeForLocation - Returns node id at given location. Depending on whether DOM domain is enabled, nodeId is either returned or not. x - X coordinate. y - Y coordinate. includeUserAgentShadowDOM - False to skip to the nearest non-UA shadow root ancestor (default: false). ignorePointerEventsNone - Whether to ignore pointer-events: none on elements and hit test them. Returns - backendNodeId - Resulting node. frameId - Frame this node belongs to. nodeId - Id of the node at given coordinates, only when enabled and requested document.

func (*DOM) GetNodeForLocationWithParams

func (c *DOM) GetNodeForLocationWithParams(ctx context.Context, v *DOMGetNodeForLocationParams) (int, string, int, error)

GetNodeForLocationWithParams - Returns node id at given location. Depending on whether DOM domain is enabled, nodeId is either returned or not. Returns - backendNodeId - Resulting node. frameId - Frame this node belongs to. nodeId - Id of the node at given coordinates, only when enabled and requested document.

func (*DOM) GetNodeStackTraces

func (c *DOM) GetNodeStackTraces(ctx context.Context, nodeId int) (*RuntimeStackTrace, error)

GetNodeStackTraces - Gets stack traces associated with a Node. As of now, only provides stack trace for Node creation. nodeId - Id of the node to get stack traces for. Returns - creation - Creation stack trace, if available.

func (*DOM) GetNodeStackTracesWithParams

func (c *DOM) GetNodeStackTracesWithParams(ctx context.Context, v *DOMGetNodeStackTracesParams) (*RuntimeStackTrace, error)

GetNodeStackTracesWithParams - Gets stack traces associated with a Node. As of now, only provides stack trace for Node creation. Returns - creation - Creation stack trace, if available.

func (*DOM) GetNodesForSubtreeByStyle added in v2.0.6

func (c *DOM) GetNodesForSubtreeByStyle(ctx context.Context, nodeId int, computedStyles []*DOMCSSComputedStyleProperty, pierce bool) ([]int, error)

GetNodesForSubtreeByStyle - Finds nodes with a given computed style in a subtree. nodeId - Node ID pointing to the root of a subtree. computedStyles - The style to filter nodes by (includes nodes if any of properties matches). pierce - Whether or not iframes and shadow roots in the same target should be traversed when returning the results (default is false). Returns - nodeIds - Resulting nodes.

func (*DOM) GetNodesForSubtreeByStyleWithParams added in v2.0.6

func (c *DOM) GetNodesForSubtreeByStyleWithParams(ctx context.Context, v *DOMGetNodesForSubtreeByStyleParams) ([]int, error)

GetNodesForSubtreeByStyleWithParams - Finds nodes with a given computed style in a subtree. Returns - nodeIds - Resulting nodes.

func (*DOM) GetOuterHTML

func (c *DOM) GetOuterHTML(ctx context.Context, nodeId int, backendNodeId int, objectId string) (string, error)

GetOuterHTML - Returns node's HTML markup. nodeId - Identifier of the node. backendNodeId - Identifier of the backend node. objectId - JavaScript object id of the node wrapper. Returns - outerHTML - Outer HTML markup.

func (*DOM) GetOuterHTMLWithParams

func (c *DOM) GetOuterHTMLWithParams(ctx context.Context, v *DOMGetOuterHTMLParams) (string, error)

GetOuterHTMLWithParams - Returns node's HTML markup. Returns - outerHTML - Outer HTML markup.

func (*DOM) GetQueryingDescendantsForContainer added in v2.2.4

func (c *DOM) GetQueryingDescendantsForContainer(ctx context.Context, nodeId int) ([]int, error)

GetQueryingDescendantsForContainer - Returns the descendants of a container query container that have container queries against this container. nodeId - Id of the container node to find querying descendants from. Returns - nodeIds - Descendant nodes with container queries against the given container.

func (*DOM) GetQueryingDescendantsForContainerWithParams added in v2.2.4

func (c *DOM) GetQueryingDescendantsForContainerWithParams(ctx context.Context, v *DOMGetQueryingDescendantsForContainerParams) ([]int, error)

GetQueryingDescendantsForContainerWithParams - Returns the descendants of a container query container that have container queries against this container. Returns - nodeIds - Descendant nodes with container queries against the given container.

func (*DOM) GetRelayoutBoundary

func (c *DOM) GetRelayoutBoundary(ctx context.Context, nodeId int) (int, error)

GetRelayoutBoundary - Returns the id of the nearest ancestor that is a relayout boundary. nodeId - Id of the node. Returns - nodeId - Relayout boundary node id for the given node.

func (*DOM) GetRelayoutBoundaryWithParams

func (c *DOM) GetRelayoutBoundaryWithParams(ctx context.Context, v *DOMGetRelayoutBoundaryParams) (int, error)

GetRelayoutBoundaryWithParams - Returns the id of the nearest ancestor that is a relayout boundary. Returns - nodeId - Relayout boundary node id for the given node.

func (*DOM) GetSearchResults

func (c *DOM) GetSearchResults(ctx context.Context, searchId string, fromIndex int, toIndex int) ([]int, error)

GetSearchResults - Returns search results from given `fromIndex` to given `toIndex` from the search with the given identifier. searchId - Unique search session identifier. fromIndex - Start index of the search result to be returned. toIndex - End index of the search result to be returned. Returns - nodeIds - Ids of the search result nodes.

func (*DOM) GetSearchResultsWithParams

func (c *DOM) GetSearchResultsWithParams(ctx context.Context, v *DOMGetSearchResultsParams) ([]int, error)

GetSearchResultsWithParams - Returns search results from given `fromIndex` to given `toIndex` from the search with the given identifier. Returns - nodeIds - Ids of the search result nodes.

func (*DOM) GetTopLayerElements added in v2.2.6

func (c *DOM) GetTopLayerElements(ctx context.Context) ([]int, error)

GetTopLayerElements - Returns NodeIds of current top layer elements. Top layer is rendered closest to the user within a viewport, therefore its elements always appear on top of all other content. Returns - nodeIds - NodeIds of top layer elements

func (*DOM) HideHighlight

func (c *DOM) HideHighlight(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Hides any highlight.

func (*DOM) HighlightNode

func (c *DOM) HighlightNode(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Highlights DOM node.

func (*DOM) HighlightRect

func (c *DOM) HighlightRect(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Highlights given rectangle.

func (*DOM) MarkUndoableState

func (c *DOM) MarkUndoableState(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Marks last undoable state.

func (*DOM) MoveTo

func (c *DOM) MoveTo(ctx context.Context, nodeId int, targetNodeId int, insertBeforeNodeId int) (int, error)

MoveTo - Moves node into the new container, places it before the given anchor. nodeId - Id of the node to move. targetNodeId - Id of the element to drop the moved node into. insertBeforeNodeId - Drop node before this one (if absent, the moved node becomes the last child of `targetNodeId`). Returns - nodeId - New id of the moved node.

func (*DOM) MoveToWithParams

func (c *DOM) MoveToWithParams(ctx context.Context, v *DOMMoveToParams) (int, error)

MoveToWithParams - Moves node into the new container, places it before the given anchor. Returns - nodeId - New id of the moved node.

func (*DOM) PerformSearch

func (c *DOM) PerformSearch(ctx context.Context, query string, includeUserAgentShadowDOM bool) (string, int, error)

PerformSearch - Searches for a given string in the DOM tree. Use `getSearchResults` to access search results or `cancelSearch` to end this search session. query - Plain text or query selector or XPath search query. includeUserAgentShadowDOM - True to search in user agent shadow DOM. Returns - searchId - Unique search session identifier. resultCount - Number of search results.

func (*DOM) PerformSearchWithParams

func (c *DOM) PerformSearchWithParams(ctx context.Context, v *DOMPerformSearchParams) (string, int, error)

PerformSearchWithParams - Searches for a given string in the DOM tree. Use `getSearchResults` to access search results or `cancelSearch` to end this search session. Returns - searchId - Unique search session identifier. resultCount - Number of search results.

func (*DOM) PushNodeByPathToFrontend

func (c *DOM) PushNodeByPathToFrontend(ctx context.Context, path string) (int, error)

PushNodeByPathToFrontend - Requests that the node is sent to the caller given its path. // FIXME, use XPath path - Path to node in the proprietary format. Returns - nodeId - Id of the node for given path.

func (*DOM) PushNodeByPathToFrontendWithParams

func (c *DOM) PushNodeByPathToFrontendWithParams(ctx context.Context, v *DOMPushNodeByPathToFrontendParams) (int, error)

PushNodeByPathToFrontendWithParams - Requests that the node is sent to the caller given its path. // FIXME, use XPath Returns - nodeId - Id of the node for given path.

func (*DOM) PushNodesByBackendIdsToFrontend

func (c *DOM) PushNodesByBackendIdsToFrontend(ctx context.Context, backendNodeIds []int) ([]int, error)

PushNodesByBackendIdsToFrontend - Requests that a batch of nodes is sent to the caller given their backend node ids. backendNodeIds - The array of backend node ids. Returns - nodeIds - The array of ids of pushed nodes that correspond to the backend ids specified in backendNodeIds.

func (*DOM) PushNodesByBackendIdsToFrontendWithParams

func (c *DOM) PushNodesByBackendIdsToFrontendWithParams(ctx context.Context, v *DOMPushNodesByBackendIdsToFrontendParams) ([]int, error)

PushNodesByBackendIdsToFrontendWithParams - Requests that a batch of nodes is sent to the caller given their backend node ids. Returns - nodeIds - The array of ids of pushed nodes that correspond to the backend ids specified in backendNodeIds.

func (*DOM) QuerySelector

func (c *DOM) QuerySelector(ctx context.Context, nodeId int, selector string) (int, error)

QuerySelector - Executes `querySelector` on a given node. nodeId - Id of the node to query upon. selector - Selector string. Returns - nodeId - Query selector result.

func (*DOM) QuerySelectorAll

func (c *DOM) QuerySelectorAll(ctx context.Context, nodeId int, selector string) ([]int, error)

QuerySelectorAll - Executes `querySelectorAll` on a given node. nodeId - Id of the node to query upon. selector - Selector string. Returns - nodeIds - Query selector result.

func (*DOM) QuerySelectorAllWithParams

func (c *DOM) QuerySelectorAllWithParams(ctx context.Context, v *DOMQuerySelectorAllParams) ([]int, error)

QuerySelectorAllWithParams - Executes `querySelectorAll` on a given node. Returns - nodeIds - Query selector result.

func (*DOM) QuerySelectorWithParams

func (c *DOM) QuerySelectorWithParams(ctx context.Context, v *DOMQuerySelectorParams) (int, error)

QuerySelectorWithParams - Executes `querySelector` on a given node. Returns - nodeId - Query selector result.

func (*DOM) Redo

func (c *DOM) Redo(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Re-does the last undone action.

func (*DOM) RemoveAttribute

func (c *DOM) RemoveAttribute(ctx context.Context, nodeId int, name string) (*gcdmessage.ChromeResponse, error)

RemoveAttribute - Removes attribute with given name from an element with given id. nodeId - Id of the element to remove attribute from. name - Name of the attribute to remove.

func (*DOM) RemoveAttributeWithParams

func (c *DOM) RemoveAttributeWithParams(ctx context.Context, v *DOMRemoveAttributeParams) (*gcdmessage.ChromeResponse, error)

RemoveAttributeWithParams - Removes attribute with given name from an element with given id.

func (*DOM) RemoveNode

func (c *DOM) RemoveNode(ctx context.Context, nodeId int) (*gcdmessage.ChromeResponse, error)

RemoveNode - Removes node with given id. nodeId - Id of the node to remove.

func (*DOM) RemoveNodeWithParams

func (c *DOM) RemoveNodeWithParams(ctx context.Context, v *DOMRemoveNodeParams) (*gcdmessage.ChromeResponse, error)

RemoveNodeWithParams - Removes node with given id.

func (*DOM) RequestChildNodes

func (c *DOM) RequestChildNodes(ctx context.Context, nodeId int, depth int, pierce bool) (*gcdmessage.ChromeResponse, error)

RequestChildNodes - Requests that children of the node with given id are returned to the caller in form of `setChildNodes` events where not only immediate children are retrieved, but all children down to the specified depth. nodeId - Id of the node to get children for. depth - The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0. pierce - Whether or not iframes and shadow roots should be traversed when returning the sub-tree (default is false).

func (*DOM) RequestChildNodesWithParams

func (c *DOM) RequestChildNodesWithParams(ctx context.Context, v *DOMRequestChildNodesParams) (*gcdmessage.ChromeResponse, error)

RequestChildNodesWithParams - Requests that children of the node with given id are returned to the caller in form of `setChildNodes` events where not only immediate children are retrieved, but all children down to the specified depth.

func (*DOM) RequestNode

func (c *DOM) RequestNode(ctx context.Context, objectId string) (int, error)

RequestNode - Requests that the node is sent to the caller given the JavaScript node object reference. All nodes that form the path from the node to the root are also sent to the client as a series of `setChildNodes` notifications. objectId - JavaScript object id to convert into node. Returns - nodeId - Node id for given object.

func (*DOM) RequestNodeWithParams

func (c *DOM) RequestNodeWithParams(ctx context.Context, v *DOMRequestNodeParams) (int, error)

RequestNodeWithParams - Requests that the node is sent to the caller given the JavaScript node object reference. All nodes that form the path from the node to the root are also sent to the client as a series of `setChildNodes` notifications. Returns - nodeId - Node id for given object.

func (*DOM) ResolveNode

func (c *DOM) ResolveNode(ctx context.Context, nodeId int, backendNodeId int, objectGroup string, executionContextId int) (*RuntimeRemoteObject, error)

ResolveNode - Resolves the JavaScript node object for a given NodeId or BackendNodeId. nodeId - Id of the node to resolve. backendNodeId - Backend identifier of the node to resolve. objectGroup - Symbolic group name that can be used to release multiple objects. executionContextId - Execution context in which to resolve the node. Returns - object - JavaScript object wrapper for given node.

func (*DOM) ResolveNodeWithParams

func (c *DOM) ResolveNodeWithParams(ctx context.Context, v *DOMResolveNodeParams) (*RuntimeRemoteObject, error)

ResolveNodeWithParams - Resolves the JavaScript node object for a given NodeId or BackendNodeId. Returns - object - JavaScript object wrapper for given node.

func (*DOM) ScrollIntoViewIfNeeded

func (c *DOM) ScrollIntoViewIfNeeded(ctx context.Context, nodeId int, backendNodeId int, objectId string, rect *DOMRect) (*gcdmessage.ChromeResponse, error)

ScrollIntoViewIfNeeded - Scrolls the specified rect of the given node into view if not already visible. Note: exactly one between nodeId, backendNodeId and objectId should be passed to identify the node. nodeId - Identifier of the node. backendNodeId - Identifier of the backend node. objectId - JavaScript object id of the node wrapper. rect - The rect to be scrolled into view, relative to the node's border box, in CSS pixels. When omitted, center of the node will be used, similar to Element.scrollIntoView.

func (*DOM) ScrollIntoViewIfNeededWithParams

func (c *DOM) ScrollIntoViewIfNeededWithParams(ctx context.Context, v *DOMScrollIntoViewIfNeededParams) (*gcdmessage.ChromeResponse, error)

ScrollIntoViewIfNeededWithParams - Scrolls the specified rect of the given node into view if not already visible. Note: exactly one between nodeId, backendNodeId and objectId should be passed to identify the node.

func (*DOM) SetAttributeValue

func (c *DOM) SetAttributeValue(ctx context.Context, nodeId int, name string, value string) (*gcdmessage.ChromeResponse, error)

SetAttributeValue - Sets attribute for an element with given id. nodeId - Id of the element to set attribute for. name - Attribute name. value - Attribute value.

func (*DOM) SetAttributeValueWithParams

func (c *DOM) SetAttributeValueWithParams(ctx context.Context, v *DOMSetAttributeValueParams) (*gcdmessage.ChromeResponse, error)

SetAttributeValueWithParams - Sets attribute for an element with given id.

func (*DOM) SetAttributesAsText

func (c *DOM) SetAttributesAsText(ctx context.Context, nodeId int, text string, name string) (*gcdmessage.ChromeResponse, error)

SetAttributesAsText - Sets attributes on element with given id. This method is useful when user edits some existing attribute value and types in several attribute name/value pairs. nodeId - Id of the element to set attributes for. text - Text with a number of attributes. Will parse this text using HTML parser. name - Attribute name to replace with new attributes derived from text in case text parsed successfully.

func (*DOM) SetAttributesAsTextWithParams

func (c *DOM) SetAttributesAsTextWithParams(ctx context.Context, v *DOMSetAttributesAsTextParams) (*gcdmessage.ChromeResponse, error)

SetAttributesAsTextWithParams - Sets attributes on element with given id. This method is useful when user edits some existing attribute value and types in several attribute name/value pairs.

func (*DOM) SetFileInputFiles

func (c *DOM) SetFileInputFiles(ctx context.Context, files []string, nodeId int, backendNodeId int, objectId string) (*gcdmessage.ChromeResponse, error)

SetFileInputFiles - Sets files for the given file input element. files - Array of file paths to set. nodeId - Identifier of the node. backendNodeId - Identifier of the backend node. objectId - JavaScript object id of the node wrapper.

func (*DOM) SetFileInputFilesWithParams

func (c *DOM) SetFileInputFilesWithParams(ctx context.Context, v *DOMSetFileInputFilesParams) (*gcdmessage.ChromeResponse, error)

SetFileInputFilesWithParams - Sets files for the given file input element.

func (*DOM) SetInspectedNode

func (c *DOM) SetInspectedNode(ctx context.Context, nodeId int) (*gcdmessage.ChromeResponse, error)

SetInspectedNode - Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions). nodeId - DOM node id to be accessible by means of $x command line API.

func (*DOM) SetInspectedNodeWithParams

func (c *DOM) SetInspectedNodeWithParams(ctx context.Context, v *DOMSetInspectedNodeParams) (*gcdmessage.ChromeResponse, error)

SetInspectedNodeWithParams - Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).

func (*DOM) SetNodeName

func (c *DOM) SetNodeName(ctx context.Context, nodeId int, name string) (int, error)

SetNodeName - Sets node name for a node with given id. nodeId - Id of the node to set name for. name - New node's name. Returns - nodeId - New node's id.

func (*DOM) SetNodeNameWithParams

func (c *DOM) SetNodeNameWithParams(ctx context.Context, v *DOMSetNodeNameParams) (int, error)

SetNodeNameWithParams - Sets node name for a node with given id. Returns - nodeId - New node's id.

func (*DOM) SetNodeStackTracesEnabled

func (c *DOM) SetNodeStackTracesEnabled(ctx context.Context, enable bool) (*gcdmessage.ChromeResponse, error)

SetNodeStackTracesEnabled - Sets if stack traces should be captured for Nodes. See `Node.getNodeStackTraces`. Default is disabled. enable - Enable or disable.

func (*DOM) SetNodeStackTracesEnabledWithParams

func (c *DOM) SetNodeStackTracesEnabledWithParams(ctx context.Context, v *DOMSetNodeStackTracesEnabledParams) (*gcdmessage.ChromeResponse, error)

SetNodeStackTracesEnabledWithParams - Sets if stack traces should be captured for Nodes. See `Node.getNodeStackTraces`. Default is disabled.

func (*DOM) SetNodeValue

func (c *DOM) SetNodeValue(ctx context.Context, nodeId int, value string) (*gcdmessage.ChromeResponse, error)

SetNodeValue - Sets node value for a node with given id. nodeId - Id of the node to set value for. value - New node's value.

func (*DOM) SetNodeValueWithParams

func (c *DOM) SetNodeValueWithParams(ctx context.Context, v *DOMSetNodeValueParams) (*gcdmessage.ChromeResponse, error)

SetNodeValueWithParams - Sets node value for a node with given id.

func (*DOM) SetOuterHTML

func (c *DOM) SetOuterHTML(ctx context.Context, nodeId int, outerHTML string) (*gcdmessage.ChromeResponse, error)

SetOuterHTML - Sets node HTML markup, returns new node id. nodeId - Id of the node to set markup for. outerHTML - Outer HTML markup to set.

func (*DOM) SetOuterHTMLWithParams

func (c *DOM) SetOuterHTMLWithParams(ctx context.Context, v *DOMSetOuterHTMLParams) (*gcdmessage.ChromeResponse, error)

SetOuterHTMLWithParams - Sets node HTML markup, returns new node id.

func (*DOM) Undo

func (c *DOM) Undo(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Undoes the last performed action.

type DOMAttributeModifiedEvent

type DOMAttributeModifiedEvent struct {
	Method string `json:"method"`
	Params struct {
		NodeId int    `json:"nodeId"` // Id of the node that has changed.
		Name   string `json:"name"`   // Attribute name.
		Value  string `json:"value"`  // Attribute value.
	} `json:"Params,omitempty"`
}

Fired when `Element`'s attribute is modified.

type DOMAttributeRemovedEvent

type DOMAttributeRemovedEvent struct {
	Method string `json:"method"`
	Params struct {
		NodeId int    `json:"nodeId"` // Id of the node that has changed.
		Name   string `json:"name"`   // A ttribute name.
	} `json:"Params,omitempty"`
}

Fired when `Element`'s attribute is removed.

type DOMBackendNode

type DOMBackendNode struct {
	NodeType      int    `json:"nodeType"`      // `Node`'s nodeType.
	NodeName      string `json:"nodeName"`      // `Node`'s nodeName.
	BackendNodeId int    `json:"backendNodeId"` //
}

Backend node with a friendly name.

type DOMBoxModel

type DOMBoxModel struct {
	Content      []float64            `json:"content"`                // Content box
	Padding      []float64            `json:"padding"`                // Padding box
	Border       []float64            `json:"border"`                 // Border box
	Margin       []float64            `json:"margin"`                 // Margin box
	Width        int                  `json:"width"`                  // Node width
	Height       int                  `json:"height"`                 // Node height
	ShapeOutside *DOMShapeOutsideInfo `json:"shapeOutside,omitempty"` // Shape outside coordinates
}

Box model.

type DOMCSSComputedStyleProperty added in v2.0.6

type DOMCSSComputedStyleProperty struct {
	Name  string `json:"name"`  // Computed style property name.
	Value string `json:"value"` // Computed style property value.
}

No Description.

type DOMCharacterDataModifiedEvent

type DOMCharacterDataModifiedEvent struct {
	Method string `json:"method"`
	Params struct {
		NodeId        int    `json:"nodeId"`        // Id of the node that has changed.
		CharacterData string `json:"characterData"` // New text value.
	} `json:"Params,omitempty"`
}

Mirrors `DOMCharacterDataModified` event.

type DOMChildNodeCountUpdatedEvent

type DOMChildNodeCountUpdatedEvent struct {
	Method string `json:"method"`
	Params struct {
		NodeId         int `json:"nodeId"`         // Id of the node that has changed.
		ChildNodeCount int `json:"childNodeCount"` // New node count.
	} `json:"Params,omitempty"`
}

Fired when `Container`'s child node count has changed.

type DOMChildNodeInsertedEvent

type DOMChildNodeInsertedEvent struct {
	Method string `json:"method"`
	Params struct {
		ParentNodeId   int      `json:"parentNodeId"`   // Id of the node that has changed.
		PreviousNodeId int      `json:"previousNodeId"` // Id of the previous sibling.
		Node           *DOMNode `json:"node"`           // Inserted node data.
	} `json:"Params,omitempty"`
}

Mirrors `DOMNodeInserted` event.

type DOMChildNodeRemovedEvent

type DOMChildNodeRemovedEvent struct {
	Method string `json:"method"`
	Params struct {
		ParentNodeId int `json:"parentNodeId"` // Parent id.
		NodeId       int `json:"nodeId"`       // Id of the node that has been removed.
	} `json:"Params,omitempty"`
}

Mirrors `DOMNodeRemoved` event.

type DOMCollectClassNamesFromSubtreeParams

type DOMCollectClassNamesFromSubtreeParams struct {
	// Id of the node to collect class names.
	NodeId int `json:"nodeId"`
}

type DOMCopyToParams

type DOMCopyToParams struct {
	// Id of the node to copy.
	NodeId int `json:"nodeId"`
	// Id of the element to drop the copy into.
	TargetNodeId int `json:"targetNodeId"`
	// Drop the copy before this node (if absent, the copy becomes the last child of `targetNodeId`).
	InsertBeforeNodeId int `json:"insertBeforeNodeId,omitempty"`
}

type DOMDebugger

type DOMDebugger struct {
	// contains filtered or unexported fields
}

func NewDOMDebugger

func NewDOMDebugger(target gcdmessage.ChromeTargeter) *DOMDebugger

func (*DOMDebugger) GetEventListeners

func (c *DOMDebugger) GetEventListeners(ctx context.Context, objectId string, depth int, pierce bool) ([]*DOMDebuggerEventListener, error)

GetEventListeners - Returns event listeners of the given object. objectId - Identifier of the object to return listeners for. depth - The maximum depth at which Node children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0. pierce - Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false). Reports listeners for all contexts if pierce is enabled. Returns - listeners - Array of relevant listeners.

func (*DOMDebugger) GetEventListenersWithParams

func (c *DOMDebugger) GetEventListenersWithParams(ctx context.Context, v *DOMDebuggerGetEventListenersParams) ([]*DOMDebuggerEventListener, error)

GetEventListenersWithParams - Returns event listeners of the given object. Returns - listeners - Array of relevant listeners.

func (*DOMDebugger) RemoveDOMBreakpoint

func (c *DOMDebugger) RemoveDOMBreakpoint(ctx context.Context, nodeId int, theType string) (*gcdmessage.ChromeResponse, error)

RemoveDOMBreakpoint - Removes DOM breakpoint that was set using `setDOMBreakpoint`. nodeId - Identifier of the node to remove breakpoint from. type - Type of the breakpoint to remove. enum values: subtree-modified, attribute-modified, node-removed

func (*DOMDebugger) RemoveDOMBreakpointWithParams

func (c *DOMDebugger) RemoveDOMBreakpointWithParams(ctx context.Context, v *DOMDebuggerRemoveDOMBreakpointParams) (*gcdmessage.ChromeResponse, error)

RemoveDOMBreakpointWithParams - Removes DOM breakpoint that was set using `setDOMBreakpoint`.

func (*DOMDebugger) RemoveEventListenerBreakpoint

func (c *DOMDebugger) RemoveEventListenerBreakpoint(ctx context.Context, eventName string, targetName string) (*gcdmessage.ChromeResponse, error)

RemoveEventListenerBreakpoint - Removes breakpoint on particular DOM event. eventName - Event name. targetName - EventTarget interface name.

func (*DOMDebugger) RemoveEventListenerBreakpointWithParams

func (c *DOMDebugger) RemoveEventListenerBreakpointWithParams(ctx context.Context, v *DOMDebuggerRemoveEventListenerBreakpointParams) (*gcdmessage.ChromeResponse, error)

RemoveEventListenerBreakpointWithParams - Removes breakpoint on particular DOM event.

func (*DOMDebugger) RemoveInstrumentationBreakpoint

func (c *DOMDebugger) RemoveInstrumentationBreakpoint(ctx context.Context, eventName string) (*gcdmessage.ChromeResponse, error)

RemoveInstrumentationBreakpoint - Removes breakpoint on particular native event. eventName - Instrumentation name to stop on.

func (*DOMDebugger) RemoveInstrumentationBreakpointWithParams

func (c *DOMDebugger) RemoveInstrumentationBreakpointWithParams(ctx context.Context, v *DOMDebuggerRemoveInstrumentationBreakpointParams) (*gcdmessage.ChromeResponse, error)

RemoveInstrumentationBreakpointWithParams - Removes breakpoint on particular native event.

func (*DOMDebugger) RemoveXHRBreakpoint

func (c *DOMDebugger) RemoveXHRBreakpoint(ctx context.Context, url string) (*gcdmessage.ChromeResponse, error)

RemoveXHRBreakpoint - Removes breakpoint from XMLHttpRequest. url - Resource URL substring.

func (*DOMDebugger) RemoveXHRBreakpointWithParams

func (c *DOMDebugger) RemoveXHRBreakpointWithParams(ctx context.Context, v *DOMDebuggerRemoveXHRBreakpointParams) (*gcdmessage.ChromeResponse, error)

RemoveXHRBreakpointWithParams - Removes breakpoint from XMLHttpRequest.

func (*DOMDebugger) SetBreakOnCSPViolation added in v2.0.7

func (c *DOMDebugger) SetBreakOnCSPViolation(ctx context.Context, violationTypes []string) (*gcdmessage.ChromeResponse, error)

SetBreakOnCSPViolation - Sets breakpoint on particular CSP violations. violationTypes - CSP Violations to stop upon. enum values: trustedtype-sink-violation, trustedtype-policy-violation

func (*DOMDebugger) SetBreakOnCSPViolationWithParams added in v2.0.7

func (c *DOMDebugger) SetBreakOnCSPViolationWithParams(ctx context.Context, v *DOMDebuggerSetBreakOnCSPViolationParams) (*gcdmessage.ChromeResponse, error)

SetBreakOnCSPViolationWithParams - Sets breakpoint on particular CSP violations.

func (*DOMDebugger) SetDOMBreakpoint

func (c *DOMDebugger) SetDOMBreakpoint(ctx context.Context, nodeId int, theType string) (*gcdmessage.ChromeResponse, error)

SetDOMBreakpoint - Sets breakpoint on particular operation with DOM. nodeId - Identifier of the node to set breakpoint on. type - Type of the operation to stop upon. enum values: subtree-modified, attribute-modified, node-removed

func (*DOMDebugger) SetDOMBreakpointWithParams

func (c *DOMDebugger) SetDOMBreakpointWithParams(ctx context.Context, v *DOMDebuggerSetDOMBreakpointParams) (*gcdmessage.ChromeResponse, error)

SetDOMBreakpointWithParams - Sets breakpoint on particular operation with DOM.

func (*DOMDebugger) SetEventListenerBreakpoint

func (c *DOMDebugger) SetEventListenerBreakpoint(ctx context.Context, eventName string, targetName string) (*gcdmessage.ChromeResponse, error)

SetEventListenerBreakpoint - Sets breakpoint on particular DOM event. eventName - DOM Event name to stop on (any DOM event will do). targetName - EventTarget interface name to stop on. If equal to `"*"` or not provided, will stop on any EventTarget.

func (*DOMDebugger) SetEventListenerBreakpointWithParams

func (c *DOMDebugger) SetEventListenerBreakpointWithParams(ctx context.Context, v *DOMDebuggerSetEventListenerBreakpointParams) (*gcdmessage.ChromeResponse, error)

SetEventListenerBreakpointWithParams - Sets breakpoint on particular DOM event.

func (*DOMDebugger) SetInstrumentationBreakpoint

func (c *DOMDebugger) SetInstrumentationBreakpoint(ctx context.Context, eventName string) (*gcdmessage.ChromeResponse, error)

SetInstrumentationBreakpoint - Sets breakpoint on particular native event. eventName - Instrumentation name to stop on.

func (*DOMDebugger) SetInstrumentationBreakpointWithParams

func (c *DOMDebugger) SetInstrumentationBreakpointWithParams(ctx context.Context, v *DOMDebuggerSetInstrumentationBreakpointParams) (*gcdmessage.ChromeResponse, error)

SetInstrumentationBreakpointWithParams - Sets breakpoint on particular native event.

func (*DOMDebugger) SetXHRBreakpoint

func (c *DOMDebugger) SetXHRBreakpoint(ctx context.Context, url string) (*gcdmessage.ChromeResponse, error)

SetXHRBreakpoint - Sets breakpoint on XMLHttpRequest. url - Resource URL substring. All XHRs having this substring in the URL will get stopped upon.

func (*DOMDebugger) SetXHRBreakpointWithParams

func (c *DOMDebugger) SetXHRBreakpointWithParams(ctx context.Context, v *DOMDebuggerSetXHRBreakpointParams) (*gcdmessage.ChromeResponse, error)

SetXHRBreakpointWithParams - Sets breakpoint on XMLHttpRequest.

type DOMDebuggerEventListener

type DOMDebuggerEventListener struct {
	Type            string               `json:"type"`                      // `EventListener`'s type.
	UseCapture      bool                 `json:"useCapture"`                // `EventListener`'s useCapture.
	Passive         bool                 `json:"passive"`                   // `EventListener`'s passive flag.
	Once            bool                 `json:"once"`                      // `EventListener`'s once flag.
	ScriptId        string               `json:"scriptId"`                  // Script id of the handler code.
	LineNumber      int                  `json:"lineNumber"`                // Line number in the script (0-based).
	ColumnNumber    int                  `json:"columnNumber"`              // Column number in the script (0-based).
	Handler         *RuntimeRemoteObject `json:"handler,omitempty"`         // Event handler function value.
	OriginalHandler *RuntimeRemoteObject `json:"originalHandler,omitempty"` // Event original handler function value.
	BackendNodeId   int                  `json:"backendNodeId,omitempty"`   // Node the listener is added to (if any).
}

Object event listener.

type DOMDebuggerGetEventListenersParams

type DOMDebuggerGetEventListenersParams struct {
	// Identifier of the object to return listeners for.
	ObjectId string `json:"objectId"`
	// The maximum depth at which Node children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.
	Depth int `json:"depth,omitempty"`
	// Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false). Reports listeners for all contexts if pierce is enabled.
	Pierce bool `json:"pierce,omitempty"`
}

type DOMDebuggerRemoveDOMBreakpointParams

type DOMDebuggerRemoveDOMBreakpointParams struct {
	// Identifier of the node to remove breakpoint from.
	NodeId int `json:"nodeId"`
	// Type of the breakpoint to remove. enum values: subtree-modified, attribute-modified, node-removed
	TheType string `json:"type"`
}

type DOMDebuggerRemoveEventListenerBreakpointParams

type DOMDebuggerRemoveEventListenerBreakpointParams struct {
	// Event name.
	EventName string `json:"eventName"`
	// EventTarget interface name.
	TargetName string `json:"targetName,omitempty"`
}

type DOMDebuggerRemoveInstrumentationBreakpointParams

type DOMDebuggerRemoveInstrumentationBreakpointParams struct {
	// Instrumentation name to stop on.
	EventName string `json:"eventName"`
}

type DOMDebuggerRemoveXHRBreakpointParams

type DOMDebuggerRemoveXHRBreakpointParams struct {
	// Resource URL substring.
	Url string `json:"url"`
}

type DOMDebuggerSetBreakOnCSPViolationParams added in v2.0.7

type DOMDebuggerSetBreakOnCSPViolationParams struct {
	// CSP Violations to stop upon. enum values: trustedtype-sink-violation, trustedtype-policy-violation
	ViolationTypes []string `json:"violationTypes"`
}

type DOMDebuggerSetDOMBreakpointParams

type DOMDebuggerSetDOMBreakpointParams struct {
	// Identifier of the node to set breakpoint on.
	NodeId int `json:"nodeId"`
	// Type of the operation to stop upon. enum values: subtree-modified, attribute-modified, node-removed
	TheType string `json:"type"`
}

type DOMDebuggerSetEventListenerBreakpointParams

type DOMDebuggerSetEventListenerBreakpointParams struct {
	// DOM Event name to stop on (any DOM event will do).
	EventName string `json:"eventName"`
	// EventTarget interface name to stop on. If equal to `"*"` or not provided, will stop on any EventTarget.
	TargetName string `json:"targetName,omitempty"`
}

type DOMDebuggerSetInstrumentationBreakpointParams

type DOMDebuggerSetInstrumentationBreakpointParams struct {
	// Instrumentation name to stop on.
	EventName string `json:"eventName"`
}

type DOMDebuggerSetXHRBreakpointParams

type DOMDebuggerSetXHRBreakpointParams struct {
	// Resource URL substring. All XHRs having this substring in the URL will get stopped upon.
	Url string `json:"url"`
}

type DOMDescribeNodeParams

type DOMDescribeNodeParams struct {
	// Identifier of the node.
	NodeId int `json:"nodeId,omitempty"`
	// Identifier of the backend node.
	BackendNodeId int `json:"backendNodeId,omitempty"`
	// JavaScript object id of the node wrapper.
	ObjectId string `json:"objectId,omitempty"`
	// The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.
	Depth int `json:"depth,omitempty"`
	// Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false).
	Pierce bool `json:"pierce,omitempty"`
}

type DOMDiscardSearchResultsParams

type DOMDiscardSearchResultsParams struct {
	// Unique search session identifier.
	SearchId string `json:"searchId"`
}

type DOMDistributedNodesUpdatedEvent

type DOMDistributedNodesUpdatedEvent struct {
	Method string `json:"method"`
	Params struct {
		InsertionPointId int               `json:"insertionPointId"` // Insertion point where distributed nodes were updated.
		DistributedNodes []*DOMBackendNode `json:"distributedNodes"` // Distributed nodes for given insertion point.
	} `json:"Params,omitempty"`
}

Called when distribution is changed.

type DOMEnableParams added in v2.2.5

type DOMEnableParams struct {
	// Whether to include whitespaces in the children array of returned Nodes.
	IncludeWhitespace string `json:"includeWhitespace,omitempty"`
}

type DOMFocusParams

type DOMFocusParams struct {
	// Identifier of the node.
	NodeId int `json:"nodeId,omitempty"`
	// Identifier of the backend node.
	BackendNodeId int `json:"backendNodeId,omitempty"`
	// JavaScript object id of the node wrapper.
	ObjectId string `json:"objectId,omitempty"`
}

type DOMGetAttributesParams

type DOMGetAttributesParams struct {
	// Id of the node to retrieve attibutes for.
	NodeId int `json:"nodeId"`
}

type DOMGetBoxModelParams

type DOMGetBoxModelParams struct {
	// Identifier of the node.
	NodeId int `json:"nodeId,omitempty"`
	// Identifier of the backend node.
	BackendNodeId int `json:"backendNodeId,omitempty"`
	// JavaScript object id of the node wrapper.
	ObjectId string `json:"objectId,omitempty"`
}

type DOMGetContainerForNodeParams added in v2.2.4

type DOMGetContainerForNodeParams struct {
	//
	NodeId int `json:"nodeId"`
	//
	ContainerName string `json:"containerName,omitempty"`
	//  enum values: Horizontal, Vertical, Both
	PhysicalAxes string `json:"physicalAxes,omitempty"`
	//  enum values: Inline, Block, Both
	LogicalAxes string `json:"logicalAxes,omitempty"`
}

type DOMGetContentQuadsParams

type DOMGetContentQuadsParams struct {
	// Identifier of the node.
	NodeId int `json:"nodeId,omitempty"`
	// Identifier of the backend node.
	BackendNodeId int `json:"backendNodeId,omitempty"`
	// JavaScript object id of the node wrapper.
	ObjectId string `json:"objectId,omitempty"`
}

type DOMGetDocumentParams

type DOMGetDocumentParams struct {
	// The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.
	Depth int `json:"depth,omitempty"`
	// Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false).
	Pierce bool `json:"pierce,omitempty"`
}

type DOMGetFileInfoParams

type DOMGetFileInfoParams struct {
	// JavaScript object id of the node wrapper.
	ObjectId string `json:"objectId"`
}

type DOMGetFlattenedDocumentParams

type DOMGetFlattenedDocumentParams struct {
	// The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.
	Depth int `json:"depth,omitempty"`
	// Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false).
	Pierce bool `json:"pierce,omitempty"`
}

type DOMGetFrameOwnerParams

type DOMGetFrameOwnerParams struct {
	//
	FrameId string `json:"frameId"`
}

type DOMGetNodeForLocationParams

type DOMGetNodeForLocationParams struct {
	// X coordinate.
	X int `json:"x"`
	// Y coordinate.
	Y int `json:"y"`
	// False to skip to the nearest non-UA shadow root ancestor (default: false).
	IncludeUserAgentShadowDOM bool `json:"includeUserAgentShadowDOM,omitempty"`
	// Whether to ignore pointer-events: none on elements and hit test them.
	IgnorePointerEventsNone bool `json:"ignorePointerEventsNone,omitempty"`
}

type DOMGetNodeStackTracesParams

type DOMGetNodeStackTracesParams struct {
	// Id of the node to get stack traces for.
	NodeId int `json:"nodeId"`
}

type DOMGetNodesForSubtreeByStyleParams added in v2.0.6

type DOMGetNodesForSubtreeByStyleParams struct {
	// Node ID pointing to the root of a subtree.
	NodeId int `json:"nodeId"`
	// The style to filter nodes by (includes nodes if any of properties matches).
	ComputedStyles []*DOMCSSComputedStyleProperty `json:"computedStyles"`
	// Whether or not iframes and shadow roots in the same target should be traversed when returning the results (default is false).
	Pierce bool `json:"pierce,omitempty"`
}

type DOMGetOuterHTMLParams

type DOMGetOuterHTMLParams struct {
	// Identifier of the node.
	NodeId int `json:"nodeId,omitempty"`
	// Identifier of the backend node.
	BackendNodeId int `json:"backendNodeId,omitempty"`
	// JavaScript object id of the node wrapper.
	ObjectId string `json:"objectId,omitempty"`
}

type DOMGetQueryingDescendantsForContainerParams added in v2.2.4

type DOMGetQueryingDescendantsForContainerParams struct {
	// Id of the container node to find querying descendants from.
	NodeId int `json:"nodeId"`
}

type DOMGetRelayoutBoundaryParams

type DOMGetRelayoutBoundaryParams struct {
	// Id of the node.
	NodeId int `json:"nodeId"`
}

type DOMGetSearchResultsParams

type DOMGetSearchResultsParams struct {
	// Unique search session identifier.
	SearchId string `json:"searchId"`
	// Start index of the search result to be returned.
	FromIndex int `json:"fromIndex"`
	// End index of the search result to be returned.
	ToIndex int `json:"toIndex"`
}

type DOMInlineStyleInvalidatedEvent

type DOMInlineStyleInvalidatedEvent struct {
	Method string `json:"method"`
	Params struct {
		NodeIds []int `json:"nodeIds"` // Ids of the nodes for which the inline styles have been invalidated.
	} `json:"Params,omitempty"`
}

Fired when `Element`'s inline style is modified via a CSS property modification.

type DOMMoveToParams

type DOMMoveToParams struct {
	// Id of the node to move.
	NodeId int `json:"nodeId"`
	// Id of the element to drop the moved node into.
	TargetNodeId int `json:"targetNodeId"`
	// Drop node before this one (if absent, the moved node becomes the last child of `targetNodeId`).
	InsertBeforeNodeId int `json:"insertBeforeNodeId,omitempty"`
}

type DOMNode

type DOMNode struct {
	NodeId            int               `json:"nodeId"`                      // Node identifier that is passed into the rest of the DOM messages as the `nodeId`. Backend will only push node with given `id` once. It is aware of all requested nodes and will only fire DOM events for nodes known to the client.
	ParentId          int               `json:"parentId,omitempty"`          // The id of the parent node if any.
	BackendNodeId     int               `json:"backendNodeId"`               // The BackendNodeId for this node.
	NodeType          int               `json:"nodeType"`                    // `Node`'s nodeType.
	NodeName          string            `json:"nodeName"`                    // `Node`'s nodeName.
	LocalName         string            `json:"localName"`                   // `Node`'s localName.
	NodeValue         string            `json:"nodeValue"`                   // `Node`'s nodeValue.
	ChildNodeCount    int               `json:"childNodeCount,omitempty"`    // Child count for `Container` nodes.
	Children          []*DOMNode        `json:"children,omitempty"`          // Child nodes of this node when requested with children.
	Attributes        []string          `json:"attributes,omitempty"`        // Attributes of the `Element` node in the form of flat array `[name1, value1, name2, value2]`.
	DocumentURL       string            `json:"documentURL,omitempty"`       // Document URL that `Document` or `FrameOwner` node points to.
	BaseURL           string            `json:"baseURL,omitempty"`           // Base URL that `Document` or `FrameOwner` node uses for URL completion.
	PublicId          string            `json:"publicId,omitempty"`          // `DocumentType`'s publicId.
	SystemId          string            `json:"systemId,omitempty"`          // `DocumentType`'s systemId.
	InternalSubset    string            `json:"internalSubset,omitempty"`    // `DocumentType`'s internalSubset.
	XmlVersion        string            `json:"xmlVersion,omitempty"`        // `Document`'s XML version in case of XML documents.
	Name              string            `json:"name,omitempty"`              // `Attr`'s name.
	Value             string            `json:"value,omitempty"`             // `Attr`'s value.
	PseudoType        string            `json:"pseudoType,omitempty"`        // Pseudo element type for this node. enum values: first-line, first-letter, before, after, marker, backdrop, selection, target-text, spelling-error, grammar-error, highlight, first-line-inherited, scrollbar, scrollbar-thumb, scrollbar-button, scrollbar-track, scrollbar-track-piece, scrollbar-corner, resizer, input-list-button, view-transition, view-transition-group, view-transition-image-pair, view-transition-old, view-transition-new
	PseudoIdentifier  string            `json:"pseudoIdentifier,omitempty"`  // Pseudo element identifier for this node. Only present if there is a valid pseudoType.
	ShadowRootType    string            `json:"shadowRootType,omitempty"`    // Shadow root type. enum values: user-agent, open, closed
	FrameId           string            `json:"frameId,omitempty"`           // Frame ID for frame owner elements.
	ContentDocument   *DOMNode          `json:"contentDocument,omitempty"`   // Content document for frame owner elements.
	ShadowRoots       []*DOMNode        `json:"shadowRoots,omitempty"`       // Shadow root list for given element host.
	TemplateContent   *DOMNode          `json:"templateContent,omitempty"`   // Content document fragment for template elements.
	PseudoElements    []*DOMNode        `json:"pseudoElements,omitempty"`    // Pseudo elements associated with this node.
	ImportedDocument  *DOMNode          `json:"importedDocument,omitempty"`  // Deprecated, as the HTML Imports API has been removed (crbug.com/937746). This property used to return the imported document for the HTMLImport links. The property is always undefined now.
	DistributedNodes  []*DOMBackendNode `json:"distributedNodes,omitempty"`  // Distributed nodes for given insertion point.
	IsSVG             bool              `json:"isSVG,omitempty"`             // Whether the node is SVG.
	CompatibilityMode string            `json:"compatibilityMode,omitempty"` //  enum values: QuirksMode, LimitedQuirksMode, NoQuirksMode
	AssignedSlot      *DOMBackendNode   `json:"assignedSlot,omitempty"`      //
}

DOM interaction is implemented in terms of mirror objects that represent the actual DOM nodes. DOMNode is a base node mirror type.

type DOMPerformSearchParams

type DOMPerformSearchParams struct {
	// Plain text or query selector or XPath search query.
	Query string `json:"query"`
	// True to search in user agent shadow DOM.
	IncludeUserAgentShadowDOM bool `json:"includeUserAgentShadowDOM,omitempty"`
}

type DOMPseudoElementAddedEvent

type DOMPseudoElementAddedEvent struct {
	Method string `json:"method"`
	Params struct {
		ParentId      int      `json:"parentId"`      // Pseudo element's parent element id.
		PseudoElement *DOMNode `json:"pseudoElement"` // The added pseudo element.
	} `json:"Params,omitempty"`
}

Called when a pseudo element is added to an element.

type DOMPseudoElementRemovedEvent

type DOMPseudoElementRemovedEvent struct {
	Method string `json:"method"`
	Params struct {
		ParentId        int `json:"parentId"`        // Pseudo element's parent element id.
		PseudoElementId int `json:"pseudoElementId"` // The removed pseudo element id.
	} `json:"Params,omitempty"`
}

Called when a pseudo element is removed from an element.

type DOMPushNodeByPathToFrontendParams

type DOMPushNodeByPathToFrontendParams struct {
	// Path to node in the proprietary format.
	Path string `json:"path"`
}

type DOMPushNodesByBackendIdsToFrontendParams

type DOMPushNodesByBackendIdsToFrontendParams struct {
	// The array of backend node ids.
	BackendNodeIds []int `json:"backendNodeIds"`
}

type DOMQuerySelectorAllParams

type DOMQuerySelectorAllParams struct {
	// Id of the node to query upon.
	NodeId int `json:"nodeId"`
	// Selector string.
	Selector string `json:"selector"`
}

type DOMQuerySelectorParams

type DOMQuerySelectorParams struct {
	// Id of the node to query upon.
	NodeId int `json:"nodeId"`
	// Selector string.
	Selector string `json:"selector"`
}

type DOMRGBA

type DOMRGBA struct {
	R int     `json:"r"`           // The red component, in the [0-255] range.
	G int     `json:"g"`           // The green component, in the [0-255] range.
	B int     `json:"b"`           // The blue component, in the [0-255] range.
	A float64 `json:"a,omitempty"` // The alpha component, in the [0-1] range (default: 1).
}

A structure holding an RGBA color.

type DOMRect

type DOMRect struct {
	X      float64 `json:"x"`      // X coordinate
	Y      float64 `json:"y"`      // Y coordinate
	Width  float64 `json:"width"`  // Rectangle width
	Height float64 `json:"height"` // Rectangle height
}

Rectangle.

type DOMRemoveAttributeParams

type DOMRemoveAttributeParams struct {
	// Id of the element to remove attribute from.
	NodeId int `json:"nodeId"`
	// Name of the attribute to remove.
	Name string `json:"name"`
}

type DOMRemoveNodeParams

type DOMRemoveNodeParams struct {
	// Id of the node to remove.
	NodeId int `json:"nodeId"`
}

type DOMRequestChildNodesParams

type DOMRequestChildNodesParams struct {
	// Id of the node to get children for.
	NodeId int `json:"nodeId"`
	// The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.
	Depth int `json:"depth,omitempty"`
	// Whether or not iframes and shadow roots should be traversed when returning the sub-tree (default is false).
	Pierce bool `json:"pierce,omitempty"`
}

type DOMRequestNodeParams

type DOMRequestNodeParams struct {
	// JavaScript object id to convert into node.
	ObjectId string `json:"objectId"`
}

type DOMResolveNodeParams

type DOMResolveNodeParams struct {
	// Id of the node to resolve.
	NodeId int `json:"nodeId,omitempty"`
	// Backend identifier of the node to resolve.
	BackendNodeId int `json:"backendNodeId,omitempty"`
	// Symbolic group name that can be used to release multiple objects.
	ObjectGroup string `json:"objectGroup,omitempty"`
	// Execution context in which to resolve the node.
	ExecutionContextId int `json:"executionContextId,omitempty"`
}

type DOMScrollIntoViewIfNeededParams

type DOMScrollIntoViewIfNeededParams struct {
	// Identifier of the node.
	NodeId int `json:"nodeId,omitempty"`
	// Identifier of the backend node.
	BackendNodeId int `json:"backendNodeId,omitempty"`
	// JavaScript object id of the node wrapper.
	ObjectId string `json:"objectId,omitempty"`
	// The rect to be scrolled into view, relative to the node's border box, in CSS pixels. When omitted, center of the node will be used, similar to Element.scrollIntoView.
	Rect *DOMRect `json:"rect,omitempty"`
}

type DOMSetAttributeValueParams

type DOMSetAttributeValueParams struct {
	// Id of the element to set attribute for.
	NodeId int `json:"nodeId"`
	// Attribute name.
	Name string `json:"name"`
	// Attribute value.
	Value string `json:"value"`
}

type DOMSetAttributesAsTextParams

type DOMSetAttributesAsTextParams struct {
	// Id of the element to set attributes for.
	NodeId int `json:"nodeId"`
	// Text with a number of attributes. Will parse this text using HTML parser.
	Text string `json:"text"`
	// Attribute name to replace with new attributes derived from text in case text parsed successfully.
	Name string `json:"name,omitempty"`
}

type DOMSetChildNodesEvent

type DOMSetChildNodesEvent struct {
	Method string `json:"method"`
	Params struct {
		ParentId int        `json:"parentId"` // Parent node id to populate with children.
		Nodes    []*DOMNode `json:"nodes"`    // Child nodes array.
	} `json:"Params,omitempty"`
}

Fired when backend wants to provide client with the missing DOM structure. This happens upon most of the calls requesting node ids.

type DOMSetFileInputFilesParams

type DOMSetFileInputFilesParams struct {
	// Array of file paths to set.
	Files []string `json:"files"`
	// Identifier of the node.
	NodeId int `json:"nodeId,omitempty"`
	// Identifier of the backend node.
	BackendNodeId int `json:"backendNodeId,omitempty"`
	// JavaScript object id of the node wrapper.
	ObjectId string `json:"objectId,omitempty"`
}

type DOMSetInspectedNodeParams

type DOMSetInspectedNodeParams struct {
	// DOM node id to be accessible by means of $x command line API.
	NodeId int `json:"nodeId"`
}

type DOMSetNodeNameParams

type DOMSetNodeNameParams struct {
	// Id of the node to set name for.
	NodeId int `json:"nodeId"`
	// New node's name.
	Name string `json:"name"`
}

type DOMSetNodeStackTracesEnabledParams

type DOMSetNodeStackTracesEnabledParams struct {
	// Enable or disable.
	Enable bool `json:"enable"`
}

type DOMSetNodeValueParams

type DOMSetNodeValueParams struct {
	// Id of the node to set value for.
	NodeId int `json:"nodeId"`
	// New node's value.
	Value string `json:"value"`
}

type DOMSetOuterHTMLParams

type DOMSetOuterHTMLParams struct {
	// Id of the node to set markup for.
	NodeId int `json:"nodeId"`
	// Outer HTML markup to set.
	OuterHTML string `json:"outerHTML"`
}

type DOMShadowRootPoppedEvent

type DOMShadowRootPoppedEvent struct {
	Method string `json:"method"`
	Params struct {
		HostId int `json:"hostId"` // Host element id.
		RootId int `json:"rootId"` // Shadow root id.
	} `json:"Params,omitempty"`
}

Called when shadow root is popped from the element.

type DOMShadowRootPushedEvent

type DOMShadowRootPushedEvent struct {
	Method string `json:"method"`
	Params struct {
		HostId int      `json:"hostId"` // Host element id.
		Root   *DOMNode `json:"root"`   // Shadow root.
	} `json:"Params,omitempty"`
}

Called when shadow root is pushed into the element.

type DOMShapeOutsideInfo

type DOMShapeOutsideInfo struct {
	Bounds      []float64     `json:"bounds"`      // Shape bounds
	Shape       []interface{} `json:"shape"`       // Shape coordinate details
	MarginShape []interface{} `json:"marginShape"` // Margin shape bounds
}

CSS Shape Outside details.

type DOMSnapshot

type DOMSnapshot struct {
	// contains filtered or unexported fields
}

func NewDOMSnapshot

func NewDOMSnapshot(target gcdmessage.ChromeTargeter) *DOMSnapshot

func (*DOMSnapshot) CaptureSnapshot

func (c *DOMSnapshot) CaptureSnapshot(ctx context.Context, computedStyles []string, includePaintOrder bool, includeDOMRects bool, includeBlendedBackgroundColors bool, includeTextColorOpacities bool) ([]*DOMSnapshotDocumentSnapshot, []string, error)

CaptureSnapshot - Returns a document snapshot, including the full DOM tree of the root node (including iframes, template contents, and imported documents) in a flattened array, as well as layout and white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is flattened. computedStyles - Whitelist of computed styles to return. includePaintOrder - Whether to include layout object paint orders into the snapshot. includeDOMRects - Whether to include DOM rectangles (offsetRects, clientRects, scrollRects) into the snapshot includeBlendedBackgroundColors - Whether to include blended background colors in the snapshot (default: false). Blended background color is achieved by blending background colors of all elements that overlap with the current element. includeTextColorOpacities - Whether to include text color opacity in the snapshot (default: false). An element might have the opacity property set that affects the text color of the element. The final text color opacity is computed based on the opacity of all overlapping elements. Returns - documents - The nodes in the DOM tree. The DOMNode at index 0 corresponds to the root document. strings - Shared string table that all string properties refer to with indexes.

func (*DOMSnapshot) CaptureSnapshotWithParams

CaptureSnapshotWithParams - Returns a document snapshot, including the full DOM tree of the root node (including iframes, template contents, and imported documents) in a flattened array, as well as layout and white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is flattened. Returns - documents - The nodes in the DOM tree. The DOMNode at index 0 corresponds to the root document. strings - Shared string table that all string properties refer to with indexes.

func (*DOMSnapshot) Disable

Disables DOM snapshot agent for the given page.

func (*DOMSnapshot) Enable

Enables DOM snapshot agent for the given page.

func (*DOMSnapshot) GetSnapshot

func (c *DOMSnapshot) GetSnapshot(ctx context.Context, computedStyleWhitelist []string, includeEventListeners bool, includePaintOrder bool, includeUserAgentShadowTree bool) ([]*DOMSnapshotDOMNode, []*DOMSnapshotLayoutTreeNode, []*DOMSnapshotComputedStyle, error)

GetSnapshot - Returns a document snapshot, including the full DOM tree of the root node (including iframes, template contents, and imported documents) in a flattened array, as well as layout and white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is flattened. computedStyleWhitelist - Whitelist of computed styles to return. includeEventListeners - Whether or not to retrieve details of DOM listeners (default false). includePaintOrder - Whether to determine and include the paint order index of LayoutTreeNodes (default false). includeUserAgentShadowTree - Whether to include UA shadow tree in the snapshot (default false). Returns - domNodes - The nodes in the DOM tree. The DOMNode at index 0 corresponds to the root document. layoutTreeNodes - The nodes in the layout tree. computedStyles - Whitelisted ComputedStyle properties for each node in the layout tree.

func (*DOMSnapshot) GetSnapshotWithParams

GetSnapshotWithParams - Returns a document snapshot, including the full DOM tree of the root node (including iframes, template contents, and imported documents) in a flattened array, as well as layout and white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is flattened. Returns - domNodes - The nodes in the DOM tree. The DOMNode at index 0 corresponds to the root document. layoutTreeNodes - The nodes in the layout tree. computedStyles - Whitelisted ComputedStyle properties for each node in the layout tree.

type DOMSnapshotCaptureSnapshotParams

type DOMSnapshotCaptureSnapshotParams struct {
	// Whitelist of computed styles to return.
	ComputedStyles []string `json:"computedStyles"`
	// Whether to include layout object paint orders into the snapshot.
	IncludePaintOrder bool `json:"includePaintOrder,omitempty"`
	// Whether to include DOM rectangles (offsetRects, clientRects, scrollRects) into the snapshot
	IncludeDOMRects bool `json:"includeDOMRects,omitempty"`
	// Whether to include blended background colors in the snapshot (default: false). Blended background color is achieved by blending background colors of all elements that overlap with the current element.
	IncludeBlendedBackgroundColors bool `json:"includeBlendedBackgroundColors,omitempty"`
	// Whether to include text color opacity in the snapshot (default: false). An element might have the opacity property set that affects the text color of the element. The final text color opacity is computed based on the opacity of all overlapping elements.
	IncludeTextColorOpacities bool `json:"includeTextColorOpacities,omitempty"`
}

type DOMSnapshotComputedStyle

type DOMSnapshotComputedStyle struct {
	Properties []*DOMSnapshotNameValue `json:"properties"` // Name/value pairs of computed style properties.
}

A subset of the full ComputedStyle as defined by the request whitelist.

type DOMSnapshotDOMNode

type DOMSnapshotDOMNode struct {
	NodeType             int                         `json:"nodeType"`                       // `Node`'s nodeType.
	NodeName             string                      `json:"nodeName"`                       // `Node`'s nodeName.
	NodeValue            string                      `json:"nodeValue"`                      // `Node`'s nodeValue.
	TextValue            string                      `json:"textValue,omitempty"`            // Only set for textarea elements, contains the text value.
	InputValue           string                      `json:"inputValue,omitempty"`           // Only set for input elements, contains the input's associated text value.
	InputChecked         bool                        `json:"inputChecked,omitempty"`         // Only set for radio and checkbox input elements, indicates if the element has been checked
	OptionSelected       bool                        `json:"optionSelected,omitempty"`       // Only set for option elements, indicates if the element has been selected
	BackendNodeId        int                         `json:"backendNodeId"`                  // `Node`'s id, corresponds to DOM.Node.backendNodeId.
	ChildNodeIndexes     []int                       `json:"childNodeIndexes,omitempty"`     // The indexes of the node's child nodes in the `domNodes` array returned by `getSnapshot`, if any.
	Attributes           []*DOMSnapshotNameValue     `json:"attributes,omitempty"`           // Attributes of an `Element` node.
	PseudoElementIndexes []int                       `json:"pseudoElementIndexes,omitempty"` // Indexes of pseudo elements associated with this node in the `domNodes` array returned by `getSnapshot`, if any.
	LayoutNodeIndex      int                         `json:"layoutNodeIndex,omitempty"`      // The index of the node's related layout tree node in the `layoutTreeNodes` array returned by `getSnapshot`, if any.
	DocumentURL          string                      `json:"documentURL,omitempty"`          // Document URL that `Document` or `FrameOwner` node points to.
	BaseURL              string                      `json:"baseURL,omitempty"`              // Base URL that `Document` or `FrameOwner` node uses for URL completion.
	ContentLanguage      string                      `json:"contentLanguage,omitempty"`      // Only set for documents, contains the document's content language.
	DocumentEncoding     string                      `json:"documentEncoding,omitempty"`     // Only set for documents, contains the document's character set encoding.
	PublicId             string                      `json:"publicId,omitempty"`             // `DocumentType` node's publicId.
	SystemId             string                      `json:"systemId,omitempty"`             // `DocumentType` node's systemId.
	FrameId              string                      `json:"frameId,omitempty"`              // Frame ID for frame owner elements and also for the document node.
	ContentDocumentIndex int                         `json:"contentDocumentIndex,omitempty"` // The index of a frame owner element's content document in the `domNodes` array returned by `getSnapshot`, if any.
	PseudoType           string                      `json:"pseudoType,omitempty"`           // Type of a pseudo element node. enum values: first-line, first-letter, before, after, marker, backdrop, selection, target-text, spelling-error, grammar-error, highlight, first-line-inherited, scrollbar, scrollbar-thumb, scrollbar-button, scrollbar-track, scrollbar-track-piece, scrollbar-corner, resizer, input-list-button, view-transition, view-transition-group, view-transition-image-pair, view-transition-old, view-transition-new
	ShadowRootType       string                      `json:"shadowRootType,omitempty"`       // Shadow root type. enum values: user-agent, open, closed
	IsClickable          bool                        `json:"isClickable,omitempty"`          // Whether this DOM node responds to mouse clicks. This includes nodes that have had click event listeners attached via JavaScript as well as anchor tags that naturally navigate when clicked.
	EventListeners       []*DOMDebuggerEventListener `json:"eventListeners,omitempty"`       // Details of the node's event listeners, if any.
	CurrentSourceURL     string                      `json:"currentSourceURL,omitempty"`     // The selected url for nodes with a srcset attribute.
	OriginURL            string                      `json:"originURL,omitempty"`            // The url of the script (if any) that generates this node.
	ScrollOffsetX        float64                     `json:"scrollOffsetX,omitempty"`        // Scroll offsets, set when this node is a Document.
	ScrollOffsetY        float64                     `json:"scrollOffsetY,omitempty"`        //
}

A Node in the DOM tree.

type DOMSnapshotDocumentSnapshot

type DOMSnapshotDocumentSnapshot struct {
	DocumentURL     int                            `json:"documentURL"`             // Document URL that `Document` or `FrameOwner` node points to.
	Title           int                            `json:"title"`                   // Document title.
	BaseURL         int                            `json:"baseURL"`                 // Base URL that `Document` or `FrameOwner` node uses for URL completion.
	ContentLanguage int                            `json:"contentLanguage"`         // Contains the document's content language.
	EncodingName    int                            `json:"encodingName"`            // Contains the document's character set encoding.
	PublicId        int                            `json:"publicId"`                // `DocumentType` node's publicId.
	SystemId        int                            `json:"systemId"`                // `DocumentType` node's systemId.
	FrameId         int                            `json:"frameId"`                 // Frame ID for frame owner elements and also for the document node.
	Nodes           *DOMSnapshotNodeTreeSnapshot   `json:"nodes"`                   // A table with dom nodes.
	Layout          *DOMSnapshotLayoutTreeSnapshot `json:"layout"`                  // The nodes in the layout tree.
	TextBoxes       *DOMSnapshotTextBoxSnapshot    `json:"textBoxes"`               // The post-layout inline text nodes.
	ScrollOffsetX   float64                        `json:"scrollOffsetX,omitempty"` // Horizontal scroll offset.
	ScrollOffsetY   float64                        `json:"scrollOffsetY,omitempty"` // Vertical scroll offset.
	ContentWidth    float64                        `json:"contentWidth,omitempty"`  // Document content width.
	ContentHeight   float64                        `json:"contentHeight,omitempty"` // Document content height.
}

Document snapshot.

type DOMSnapshotGetSnapshotParams

type DOMSnapshotGetSnapshotParams struct {
	// Whitelist of computed styles to return.
	ComputedStyleWhitelist []string `json:"computedStyleWhitelist"`
	// Whether or not to retrieve details of DOM listeners (default false).
	IncludeEventListeners bool `json:"includeEventListeners,omitempty"`
	// Whether to determine and include the paint order index of LayoutTreeNodes (default false).
	IncludePaintOrder bool `json:"includePaintOrder,omitempty"`
	// Whether to include UA shadow tree in the snapshot (default false).
	IncludeUserAgentShadowTree bool `json:"includeUserAgentShadowTree,omitempty"`
}

type DOMSnapshotInlineTextBox

type DOMSnapshotInlineTextBox struct {
	BoundingBox         *DOMRect `json:"boundingBox"`         // The bounding box in document coordinates. Note that scroll offset of the document is ignored.
	StartCharacterIndex int      `json:"startCharacterIndex"` // The starting index in characters, for this post layout textbox substring. Characters that would be represented as a surrogate pair in UTF-16 have length 2.
	NumCharacters       int      `json:"numCharacters"`       // The number of characters in this post layout textbox substring. Characters that would be represented as a surrogate pair in UTF-16 have length 2.
}

Details of post layout rendered text positions. The exact layout should not be regarded as stable and may change between versions.

type DOMSnapshotLayoutTreeNode

type DOMSnapshotLayoutTreeNode struct {
	DomNodeIndex      int                         `json:"domNodeIndex"`                // The index of the related DOM node in the `domNodes` array returned by `getSnapshot`.
	BoundingBox       *DOMRect                    `json:"boundingBox"`                 // The bounding box in document coordinates. Note that scroll offset of the document is ignored.
	LayoutText        string                      `json:"layoutText,omitempty"`        // Contents of the LayoutText, if any.
	InlineTextNodes   []*DOMSnapshotInlineTextBox `json:"inlineTextNodes,omitempty"`   // The post-layout inline text nodes, if any.
	StyleIndex        int                         `json:"styleIndex,omitempty"`        // Index into the `computedStyles` array returned by `getSnapshot`.
	PaintOrder        int                         `json:"paintOrder,omitempty"`        // Global paint order index, which is determined by the stacking order of the nodes. Nodes that are painted together will have the same index. Only provided if includePaintOrder in getSnapshot was true.
	IsStackingContext bool                        `json:"isStackingContext,omitempty"` // Set to true to indicate the element begins a new stacking context.
}

Details of an element in the DOM tree with a LayoutObject.

type DOMSnapshotLayoutTreeSnapshot

type DOMSnapshotLayoutTreeSnapshot struct {
	NodeIndex               []int                       `json:"nodeIndex"`                         // Index of the corresponding node in the `NodeTreeSnapshot` array returned by `captureSnapshot`.
	Styles                  [][]int                     `json:"styles"`                            // Array of indexes specifying computed style strings, filtered according to the `computedStyles` parameter passed to `captureSnapshot`.
	Bounds                  [][]float64                 `json:"bounds"`                            // The absolute position bounding box.
	Text                    []int                       `json:"text"`                              // Contents of the LayoutText, if any.
	StackingContexts        *DOMSnapshotRareBooleanData `json:"stackingContexts"`                  // Stacking context information.
	PaintOrders             []int                       `json:"paintOrders,omitempty"`             // Global paint order index, which is determined by the stacking order of the nodes. Nodes that are painted together will have the same index. Only provided if includePaintOrder in captureSnapshot was true.
	OffsetRects             [][]float64                 `json:"offsetRects,omitempty"`             // The offset rect of nodes. Only available when includeDOMRects is set to true
	ScrollRects             [][]float64                 `json:"scrollRects,omitempty"`             // The scroll rect of nodes. Only available when includeDOMRects is set to true
	ClientRects             [][]float64                 `json:"clientRects,omitempty"`             // The client rect of nodes. Only available when includeDOMRects is set to true
	BlendedBackgroundColors []int                       `json:"blendedBackgroundColors,omitempty"` // The list of background colors that are blended with colors of overlapping elements.
	TextColorOpacities      []float64                   `json:"textColorOpacities,omitempty"`      // The list of computed text opacities.
}

Table of details of an element in the DOM tree with a LayoutObject.

type DOMSnapshotNameValue

type DOMSnapshotNameValue struct {
	Name  string `json:"name"`  // Attribute/property name.
	Value string `json:"value"` // Attribute/property value.
}

A name/value pair.

type DOMSnapshotNodeTreeSnapshot

type DOMSnapshotNodeTreeSnapshot struct {
	ParentIndex          []int                       `json:"parentIndex,omitempty"`          // Parent node index.
	NodeType             []int                       `json:"nodeType,omitempty"`             // `Node`'s nodeType.
	ShadowRootType       *DOMSnapshotRareStringData  `json:"shadowRootType,omitempty"`       // Type of the shadow root the `Node` is in. String values are equal to the `ShadowRootType` enum.
	NodeName             []int                       `json:"nodeName,omitempty"`             // `Node`'s nodeName.
	NodeValue            []int                       `json:"nodeValue,omitempty"`            // `Node`'s nodeValue.
	BackendNodeId        []int                       `json:"backendNodeId,omitempty"`        // `Node`'s id, corresponds to DOM.Node.backendNodeId.
	Attributes           [][]int                     `json:"attributes,omitempty"`           // Attributes of an `Element` node. Flatten name, value pairs.
	TextValue            *DOMSnapshotRareStringData  `json:"textValue,omitempty"`            // Only set for textarea elements, contains the text value.
	InputValue           *DOMSnapshotRareStringData  `json:"inputValue,omitempty"`           // Only set for input elements, contains the input's associated text value.
	InputChecked         *DOMSnapshotRareBooleanData `json:"inputChecked,omitempty"`         // Only set for radio and checkbox input elements, indicates if the element has been checked
	OptionSelected       *DOMSnapshotRareBooleanData `json:"optionSelected,omitempty"`       // Only set for option elements, indicates if the element has been selected
	ContentDocumentIndex *DOMSnapshotRareIntegerData `json:"contentDocumentIndex,omitempty"` // The index of the document in the list of the snapshot documents.
	PseudoType           *DOMSnapshotRareStringData  `json:"pseudoType,omitempty"`           // Type of a pseudo element node.
	PseudoIdentifier     *DOMSnapshotRareStringData  `json:"pseudoIdentifier,omitempty"`     // Pseudo element identifier for this node. Only present if there is a valid pseudoType.
	IsClickable          *DOMSnapshotRareBooleanData `json:"isClickable,omitempty"`          // Whether this DOM node responds to mouse clicks. This includes nodes that have had click event listeners attached via JavaScript as well as anchor tags that naturally navigate when clicked.
	CurrentSourceURL     *DOMSnapshotRareStringData  `json:"currentSourceURL,omitempty"`     // The selected url for nodes with a srcset attribute.
	OriginURL            *DOMSnapshotRareStringData  `json:"originURL,omitempty"`            // The url of the script (if any) that generates this node.
}

Table containing nodes.

type DOMSnapshotRareBooleanData

type DOMSnapshotRareBooleanData struct {
	Index []int `json:"index"` //
}

No Description.

type DOMSnapshotRareIntegerData

type DOMSnapshotRareIntegerData struct {
	Index []int `json:"index"` //
	Value []int `json:"value"` //
}

No Description.

type DOMSnapshotRareStringData

type DOMSnapshotRareStringData struct {
	Index []int `json:"index"` //
	Value []int `json:"value"` //
}

Data that is only present on rare nodes.

type DOMSnapshotTextBoxSnapshot

type DOMSnapshotTextBoxSnapshot struct {
	LayoutIndex []int       `json:"layoutIndex"` // Index of the layout tree node that owns this box collection.
	Bounds      [][]float64 `json:"bounds"`      // The absolute position bounding box.
	Start       []int       `json:"start"`       // The starting index in characters, for this post layout textbox substring. Characters that would be represented as a surrogate pair in UTF-16 have length 2.
	Length      []int       `json:"length"`      // The number of characters in this post layout textbox substring. Characters that would be represented as a surrogate pair in UTF-16 have length 2.
}

Table of details of the post layout rendered text positions. The exact layout should not be regarded as stable and may change between versions.

type DOMStorage

type DOMStorage struct {
	// contains filtered or unexported fields
}

func NewDOMStorage

func NewDOMStorage(target gcdmessage.ChromeTargeter) *DOMStorage

func (*DOMStorage) Clear

Clear - storageId -

func (*DOMStorage) ClearWithParams

ClearWithParams -

func (*DOMStorage) Disable

Disables storage tracking, prevents storage events from being sent to the client.

func (*DOMStorage) Enable

Enables storage tracking, storage events will now be delivered to the client.

func (*DOMStorage) GetDOMStorageItems

func (c *DOMStorage) GetDOMStorageItems(ctx context.Context, storageId *DOMStorageStorageId) ([][]string, error)

GetDOMStorageItems - storageId - Returns - entries -

func (*DOMStorage) GetDOMStorageItemsWithParams

func (c *DOMStorage) GetDOMStorageItemsWithParams(ctx context.Context, v *DOMStorageGetDOMStorageItemsParams) ([][]string, error)

GetDOMStorageItemsWithParams - Returns - entries -

func (*DOMStorage) RemoveDOMStorageItem

func (c *DOMStorage) RemoveDOMStorageItem(ctx context.Context, storageId *DOMStorageStorageId, key string) (*gcdmessage.ChromeResponse, error)

RemoveDOMStorageItem - storageId - key -

func (*DOMStorage) RemoveDOMStorageItemWithParams

func (c *DOMStorage) RemoveDOMStorageItemWithParams(ctx context.Context, v *DOMStorageRemoveDOMStorageItemParams) (*gcdmessage.ChromeResponse, error)

RemoveDOMStorageItemWithParams -

func (*DOMStorage) SetDOMStorageItem

func (c *DOMStorage) SetDOMStorageItem(ctx context.Context, storageId *DOMStorageStorageId, key string, value string) (*gcdmessage.ChromeResponse, error)

SetDOMStorageItem - storageId - key - value -

func (*DOMStorage) SetDOMStorageItemWithParams

func (c *DOMStorage) SetDOMStorageItemWithParams(ctx context.Context, v *DOMStorageSetDOMStorageItemParams) (*gcdmessage.ChromeResponse, error)

SetDOMStorageItemWithParams -

type DOMStorageClearParams

type DOMStorageClearParams struct {
	//
	StorageId *DOMStorageStorageId `json:"storageId"`
}

type DOMStorageDomStorageItemAddedEvent

type DOMStorageDomStorageItemAddedEvent struct {
	Method string `json:"method"`
	Params struct {
		StorageId *DOMStorageStorageId `json:"storageId"` //
		Key       string               `json:"key"`       //
		NewValue  string               `json:"newValue"`  //
	} `json:"Params,omitempty"`
}

type DOMStorageDomStorageItemRemovedEvent

type DOMStorageDomStorageItemRemovedEvent struct {
	Method string `json:"method"`
	Params struct {
		StorageId *DOMStorageStorageId `json:"storageId"` //
		Key       string               `json:"key"`       //
	} `json:"Params,omitempty"`
}

type DOMStorageDomStorageItemUpdatedEvent

type DOMStorageDomStorageItemUpdatedEvent struct {
	Method string `json:"method"`
	Params struct {
		StorageId *DOMStorageStorageId `json:"storageId"` //
		Key       string               `json:"key"`       //
		OldValue  string               `json:"oldValue"`  //
		NewValue  string               `json:"newValue"`  //
	} `json:"Params,omitempty"`
}

type DOMStorageDomStorageItemsClearedEvent

type DOMStorageDomStorageItemsClearedEvent struct {
	Method string `json:"method"`
	Params struct {
		StorageId *DOMStorageStorageId `json:"storageId"` //
	} `json:"Params,omitempty"`
}

type DOMStorageGetDOMStorageItemsParams

type DOMStorageGetDOMStorageItemsParams struct {
	//
	StorageId *DOMStorageStorageId `json:"storageId"`
}

type DOMStorageRemoveDOMStorageItemParams

type DOMStorageRemoveDOMStorageItemParams struct {
	//
	StorageId *DOMStorageStorageId `json:"storageId"`
	//
	Key string `json:"key"`
}

type DOMStorageSetDOMStorageItemParams

type DOMStorageSetDOMStorageItemParams struct {
	//
	StorageId *DOMStorageStorageId `json:"storageId"`
	//
	Key string `json:"key"`
	//
	Value string `json:"value"`
}

type DOMStorageStorageId

type DOMStorageStorageId struct {
	SecurityOrigin string `json:"securityOrigin,omitempty"` // Security origin for the storage.
	StorageKey     string `json:"storageKey,omitempty"`     // Represents a key by which DOM Storage keys its CachedStorageAreas
	IsLocalStorage bool   `json:"isLocalStorage"`           // Whether the storage is local storage (not session storage).
}

DOM Storage identifier.

type Database

type Database struct {
	// contains filtered or unexported fields
}

func NewDatabase

func NewDatabase(target gcdmessage.ChromeTargeter) *Database

func (*Database) Disable

func (c *Database) Disable(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Disables database tracking, prevents database events from being sent to the client.

func (*Database) Enable

Enables database tracking, database events will now be delivered to the client.

func (*Database) ExecuteSQL

func (c *Database) ExecuteSQL(ctx context.Context, databaseId string, query string) ([]string, []interface{}, *DatabaseError, error)

ExecuteSQL - databaseId - query - Returns - columnNames - values - sqlError -

func (*Database) ExecuteSQLWithParams

func (c *Database) ExecuteSQLWithParams(ctx context.Context, v *DatabaseExecuteSQLParams) ([]string, []interface{}, *DatabaseError, error)

ExecuteSQLWithParams - Returns - columnNames - values - sqlError -

func (*Database) GetDatabaseTableNames

func (c *Database) GetDatabaseTableNames(ctx context.Context, databaseId string) ([]string, error)

GetDatabaseTableNames - databaseId - Returns - tableNames -

func (*Database) GetDatabaseTableNamesWithParams

func (c *Database) GetDatabaseTableNamesWithParams(ctx context.Context, v *DatabaseGetDatabaseTableNamesParams) ([]string, error)

GetDatabaseTableNamesWithParams - Returns - tableNames -

type DatabaseAddDatabaseEvent

type DatabaseAddDatabaseEvent struct {
	Method string `json:"method"`
	Params struct {
		Database *DatabaseDatabase `json:"database"` //
	} `json:"Params,omitempty"`
}

type DatabaseDatabase

type DatabaseDatabase struct {
	Id      string `json:"id"`      // Database ID.
	Domain  string `json:"domain"`  // Database domain.
	Name    string `json:"name"`    // Database name.
	Version string `json:"version"` // Database version.
}

Database object.

type DatabaseError

type DatabaseError struct {
	Message string `json:"message"` // Error message.
	Code    int    `json:"code"`    // Error code.
}

Database error.

type DatabaseExecuteSQLParams

type DatabaseExecuteSQLParams struct {
	//
	DatabaseId string `json:"databaseId"`
	//
	Query string `json:"query"`
}

type DatabaseGetDatabaseTableNamesParams

type DatabaseGetDatabaseTableNamesParams struct {
	//
	DatabaseId string `json:"databaseId"`
}

type Debugger

type Debugger struct {
	// contains filtered or unexported fields
}

func NewDebugger

func NewDebugger(target gcdmessage.ChromeTargeter) *Debugger

func (*Debugger) ContinueToLocation

func (c *Debugger) ContinueToLocation(ctx context.Context, location *DebuggerLocation, targetCallFrames string) (*gcdmessage.ChromeResponse, error)

ContinueToLocation - Continues execution until specific location is reached. location - Location to continue to. targetCallFrames -

func (*Debugger) ContinueToLocationWithParams

func (c *Debugger) ContinueToLocationWithParams(ctx context.Context, v *DebuggerContinueToLocationParams) (*gcdmessage.ChromeResponse, error)

ContinueToLocationWithParams - Continues execution until specific location is reached.

func (*Debugger) Disable

func (c *Debugger) Disable(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Disables debugger for given page.

func (*Debugger) DisassembleWasmModule added in v2.2.6

func (c *Debugger) DisassembleWasmModule(ctx context.Context, scriptId string) (string, int, []int, *DebuggerWasmDisassemblyChunk, error)

DisassembleWasmModule - scriptId - Id of the script to disassemble Returns - streamId - For large modules, return a stream from which additional chunks of disassembly can be read successively. totalNumberOfLines - The total number of lines in the disassembly text. functionBodyOffsets - The offsets of all function bodies, in the format [start1, end1, start2, end2, ...] where all ends are exclusive. chunk - The first chunk of disassembly.

func (*Debugger) DisassembleWasmModuleWithParams added in v2.2.6

func (c *Debugger) DisassembleWasmModuleWithParams(ctx context.Context, v *DebuggerDisassembleWasmModuleParams) (string, int, []int, *DebuggerWasmDisassemblyChunk, error)

DisassembleWasmModuleWithParams - Returns - streamId - For large modules, return a stream from which additional chunks of disassembly can be read successively. totalNumberOfLines - The total number of lines in the disassembly text. functionBodyOffsets - The offsets of all function bodies, in the format [start1, end1, start2, end2, ...] where all ends are exclusive. chunk - The first chunk of disassembly.

func (*Debugger) Enable

func (c *Debugger) Enable(ctx context.Context, maxScriptsCacheSize float64) (string, error)

Enable - Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received. maxScriptsCacheSize - The maximum size in bytes of collected scripts (not referenced by other heap objects) the debugger can hold. Puts no limit if parameter is omitted. Returns - debuggerId - Unique identifier of the debugger.

func (*Debugger) EnableWithParams

func (c *Debugger) EnableWithParams(ctx context.Context, v *DebuggerEnableParams) (string, error)

EnableWithParams - Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received. Returns - debuggerId - Unique identifier of the debugger.

func (*Debugger) EvaluateOnCallFrame

func (c *Debugger) EvaluateOnCallFrame(ctx context.Context, callFrameId string, expression string, objectGroup string, includeCommandLineAPI bool, silent bool, returnByValue bool, generatePreview bool, throwOnSideEffect bool, timeout float64) (*RuntimeRemoteObject, *RuntimeExceptionDetails, error)

EvaluateOnCallFrame - Evaluates expression on a given call frame. callFrameId - Call frame identifier to evaluate on. expression - Expression to evaluate. objectGroup - String object group name to put result into (allows rapid releasing resulting object handles using `releaseObjectGroup`). includeCommandLineAPI - Specifies whether command line API should be available to the evaluated expression, defaults to false. silent - In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides `setPauseOnException` state. returnByValue - Whether the result is expected to be a JSON object that should be sent by value. generatePreview - Whether preview should be generated for the result. throwOnSideEffect - Whether to throw an exception if side effect cannot be ruled out during evaluation. timeout - Terminate execution after timing out (number of milliseconds). Returns - result - Object wrapper for the evaluation result. exceptionDetails - Exception details.

func (*Debugger) EvaluateOnCallFrameWithParams

EvaluateOnCallFrameWithParams - Evaluates expression on a given call frame. Returns - result - Object wrapper for the evaluation result. exceptionDetails - Exception details.

func (*Debugger) GetPossibleBreakpoints

func (c *Debugger) GetPossibleBreakpoints(ctx context.Context, start *DebuggerLocation, end *DebuggerLocation, restrictToFunction bool) ([]*DebuggerBreakLocation, error)

GetPossibleBreakpoints - Returns possible locations for breakpoint. scriptId in start and end range locations should be the same. start - Start of range to search possible breakpoint locations in. end - End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range. restrictToFunction - Only consider locations which are in the same (non-nested) function as start. Returns - locations - List of the possible breakpoint locations.

func (*Debugger) GetPossibleBreakpointsWithParams

func (c *Debugger) GetPossibleBreakpointsWithParams(ctx context.Context, v *DebuggerGetPossibleBreakpointsParams) ([]*DebuggerBreakLocation, error)

GetPossibleBreakpointsWithParams - Returns possible locations for breakpoint. scriptId in start and end range locations should be the same. Returns - locations - List of the possible breakpoint locations.

func (*Debugger) GetScriptSource

func (c *Debugger) GetScriptSource(ctx context.Context, scriptId string) (string, string, error)

GetScriptSource - Returns source for the script with given id. scriptId - Id of the script to get source for. Returns - scriptSource - Script source (empty in case of Wasm bytecode). bytecode - Wasm bytecode. (Encoded as a base64 string when passed over JSON)

func (*Debugger) GetScriptSourceWithParams

func (c *Debugger) GetScriptSourceWithParams(ctx context.Context, v *DebuggerGetScriptSourceParams) (string, string, error)

GetScriptSourceWithParams - Returns source for the script with given id. Returns - scriptSource - Script source (empty in case of Wasm bytecode). bytecode - Wasm bytecode. (Encoded as a base64 string when passed over JSON)

func (*Debugger) GetStackTrace

func (c *Debugger) GetStackTrace(ctx context.Context, stackTraceId *RuntimeStackTraceId) (*RuntimeStackTrace, error)

GetStackTrace - Returns stack trace with given `stackTraceId`. stackTraceId - Returns - stackTrace -

func (*Debugger) GetStackTraceWithParams

func (c *Debugger) GetStackTraceWithParams(ctx context.Context, v *DebuggerGetStackTraceParams) (*RuntimeStackTrace, error)

GetStackTraceWithParams - Returns stack trace with given `stackTraceId`. Returns - stackTrace -

func (*Debugger) GetWasmBytecode

func (c *Debugger) GetWasmBytecode(ctx context.Context, scriptId string) (string, error)

GetWasmBytecode - This command is deprecated. Use getScriptSource instead. scriptId - Id of the Wasm script to get source for. Returns - bytecode - Script source. (Encoded as a base64 string when passed over JSON)

func (*Debugger) GetWasmBytecodeWithParams

func (c *Debugger) GetWasmBytecodeWithParams(ctx context.Context, v *DebuggerGetWasmBytecodeParams) (string, error)

GetWasmBytecodeWithParams - This command is deprecated. Use getScriptSource instead. Returns - bytecode - Script source. (Encoded as a base64 string when passed over JSON)

func (*Debugger) NextWasmDisassemblyChunk added in v2.2.6

func (c *Debugger) NextWasmDisassemblyChunk(ctx context.Context, streamId string) (*DebuggerWasmDisassemblyChunk, error)

NextWasmDisassemblyChunk - Disassemble the next chunk of lines for the module corresponding to the stream. If disassembly is complete, this API will invalidate the streamId and return an empty chunk. Any subsequent calls for the now invalid stream will return errors. streamId - Returns - chunk - The next chunk of disassembly.

func (*Debugger) NextWasmDisassemblyChunkWithParams added in v2.2.6

func (c *Debugger) NextWasmDisassemblyChunkWithParams(ctx context.Context, v *DebuggerNextWasmDisassemblyChunkParams) (*DebuggerWasmDisassemblyChunk, error)

NextWasmDisassemblyChunkWithParams - Disassemble the next chunk of lines for the module corresponding to the stream. If disassembly is complete, this API will invalidate the streamId and return an empty chunk. Any subsequent calls for the now invalid stream will return errors. Returns - chunk - The next chunk of disassembly.

func (*Debugger) Pause

Stops on the next JavaScript statement.

func (*Debugger) PauseOnAsyncCall

func (c *Debugger) PauseOnAsyncCall(ctx context.Context, parentStackTraceId *RuntimeStackTraceId) (*gcdmessage.ChromeResponse, error)

PauseOnAsyncCall - parentStackTraceId - Debugger will pause when async call with given stack trace is started.

func (*Debugger) PauseOnAsyncCallWithParams

func (c *Debugger) PauseOnAsyncCallWithParams(ctx context.Context, v *DebuggerPauseOnAsyncCallParams) (*gcdmessage.ChromeResponse, error)

PauseOnAsyncCallWithParams -

func (*Debugger) RemoveBreakpoint

func (c *Debugger) RemoveBreakpoint(ctx context.Context, breakpointId string) (*gcdmessage.ChromeResponse, error)

RemoveBreakpoint - Removes JavaScript breakpoint. breakpointId -

func (*Debugger) RemoveBreakpointWithParams

func (c *Debugger) RemoveBreakpointWithParams(ctx context.Context, v *DebuggerRemoveBreakpointParams) (*gcdmessage.ChromeResponse, error)

RemoveBreakpointWithParams - Removes JavaScript breakpoint.

func (*Debugger) RestartFrame

func (c *Debugger) RestartFrame(ctx context.Context, callFrameId string, mode string) ([]*DebuggerCallFrame, *RuntimeStackTrace, *RuntimeStackTraceId, error)

RestartFrame - Restarts particular call frame from the beginning. The old, deprecated behavior of `restartFrame` is to stay paused and allow further CDP commands after a restart was scheduled. This can cause problems with restarting, so we now continue execution immediatly after it has been scheduled until we reach the beginning of the restarted frame. To stay back-wards compatible, `restartFrame` now expects a `mode` parameter to be present. If the `mode` parameter is missing, `restartFrame` errors out. The various return values are deprecated and `callFrames` is always empty. Use the call frames from the `Debugger#paused` events instead, that fires once V8 pauses at the beginning of the restarted function. callFrameId - Call frame identifier to evaluate on. mode - The `mode` parameter must be present and set to 'StepInto', otherwise `restartFrame` will error out. Returns - callFrames - New stack trace. asyncStackTrace - Async stack trace, if any. asyncStackTraceId - Async stack trace, if any.

func (*Debugger) RestartFrameWithParams

RestartFrameWithParams - Restarts particular call frame from the beginning. The old, deprecated behavior of `restartFrame` is to stay paused and allow further CDP commands after a restart was scheduled. This can cause problems with restarting, so we now continue execution immediatly after it has been scheduled until we reach the beginning of the restarted frame. To stay back-wards compatible, `restartFrame` now expects a `mode` parameter to be present. If the `mode` parameter is missing, `restartFrame` errors out. The various return values are deprecated and `callFrames` is always empty. Use the call frames from the `Debugger#paused` events instead, that fires once V8 pauses at the beginning of the restarted function. Returns - callFrames - New stack trace. asyncStackTrace - Async stack trace, if any. asyncStackTraceId - Async stack trace, if any.

func (*Debugger) Resume

func (c *Debugger) Resume(ctx context.Context, terminateOnResume bool) (*gcdmessage.ChromeResponse, error)

Resume - Resumes JavaScript execution. terminateOnResume - Set to true to terminate execution upon resuming execution. In contrast to Runtime.terminateExecution, this will allows to execute further JavaScript (i.e. via evaluation) until execution of the paused code is actually resumed, at which point termination is triggered. If execution is currently not paused, this parameter has no effect.

func (*Debugger) ResumeWithParams

func (c *Debugger) ResumeWithParams(ctx context.Context, v *DebuggerResumeParams) (*gcdmessage.ChromeResponse, error)

ResumeWithParams - Resumes JavaScript execution.

func (*Debugger) SearchInContent

func (c *Debugger) SearchInContent(ctx context.Context, scriptId string, query string, caseSensitive bool, isRegex bool) ([]*DebuggerSearchMatch, error)

SearchInContent - Searches for given string in script content. scriptId - Id of the script to search in. query - String to search for. caseSensitive - If true, search is case sensitive. isRegex - If true, treats string parameter as regex. Returns - result - List of search matches.

func (*Debugger) SearchInContentWithParams

func (c *Debugger) SearchInContentWithParams(ctx context.Context, v *DebuggerSearchInContentParams) ([]*DebuggerSearchMatch, error)

SearchInContentWithParams - Searches for given string in script content. Returns - result - List of search matches.

func (*Debugger) SetAsyncCallStackDepth

func (c *Debugger) SetAsyncCallStackDepth(ctx context.Context, maxDepth int) (*gcdmessage.ChromeResponse, error)

SetAsyncCallStackDepth - Enables or disables async call stacks tracking. maxDepth - Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async call stacks (default).

func (*Debugger) SetAsyncCallStackDepthWithParams

func (c *Debugger) SetAsyncCallStackDepthWithParams(ctx context.Context, v *DebuggerSetAsyncCallStackDepthParams) (*gcdmessage.ChromeResponse, error)

SetAsyncCallStackDepthWithParams - Enables or disables async call stacks tracking.

func (*Debugger) SetBlackboxPatterns

func (c *Debugger) SetBlackboxPatterns(ctx context.Context, patterns []string) (*gcdmessage.ChromeResponse, error)

SetBlackboxPatterns - Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. patterns - Array of regexps that will be used to check script url for blackbox state.

func (*Debugger) SetBlackboxPatternsWithParams

func (c *Debugger) SetBlackboxPatternsWithParams(ctx context.Context, v *DebuggerSetBlackboxPatternsParams) (*gcdmessage.ChromeResponse, error)

SetBlackboxPatternsWithParams - Replace previous blackbox patterns with passed ones. Forces backend to skip stepping/pausing in scripts with url matching one of the patterns. VM will try to leave blackboxed script by performing 'step in' several times, finally resorting to 'step out' if unsuccessful.

func (*Debugger) SetBlackboxedRanges

func (c *Debugger) SetBlackboxedRanges(ctx context.Context, scriptId string, positions []*DebuggerScriptPosition) (*gcdmessage.ChromeResponse, error)

SetBlackboxedRanges - Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted. scriptId - Id of the script. positions -

func (*Debugger) SetBlackboxedRangesWithParams

func (c *Debugger) SetBlackboxedRangesWithParams(ctx context.Context, v *DebuggerSetBlackboxedRangesParams) (*gcdmessage.ChromeResponse, error)

SetBlackboxedRangesWithParams - Makes backend skip steps in the script in blackboxed ranges. VM will try leave blacklisted scripts by performing 'step in' several times, finally resorting to 'step out' if unsuccessful. Positions array contains positions where blackbox state is changed. First interval isn't blackboxed. Array should be sorted.

func (*Debugger) SetBreakpoint

func (c *Debugger) SetBreakpoint(ctx context.Context, location *DebuggerLocation, condition string) (string, *DebuggerLocation, error)

SetBreakpoint - Sets JavaScript breakpoint at a given location. location - Location to set breakpoint in. condition - Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true. Returns - breakpointId - Id of the created breakpoint for further reference. actualLocation - Location this breakpoint resolved into.

func (*Debugger) SetBreakpointByUrl

func (c *Debugger) SetBreakpointByUrl(ctx context.Context, lineNumber int, url string, urlRegex string, scriptHash string, columnNumber int, condition string) (string, []*DebuggerLocation, error)

SetBreakpointByUrl - Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in `locations` property. Further matching script parsing will result in subsequent `breakpointResolved` events issued. This logical breakpoint will survive page reloads. lineNumber - Line number to set breakpoint at. url - URL of the resources to set breakpoint on. urlRegex - Regex pattern for the URLs of the resources to set breakpoints on. Either `url` or `urlRegex` must be specified. scriptHash - Script hash of the resources to set breakpoint on. columnNumber - Offset in the line to set breakpoint at. condition - Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true. Returns - breakpointId - Id of the created breakpoint for further reference. locations - List of the locations this breakpoint resolved into upon addition.

func (*Debugger) SetBreakpointByUrlWithParams

func (c *Debugger) SetBreakpointByUrlWithParams(ctx context.Context, v *DebuggerSetBreakpointByUrlParams) (string, []*DebuggerLocation, error)

SetBreakpointByUrlWithParams - Sets JavaScript breakpoint at given location specified either by URL or URL regex. Once this command is issued, all existing parsed scripts will have breakpoints resolved and returned in `locations` property. Further matching script parsing will result in subsequent `breakpointResolved` events issued. This logical breakpoint will survive page reloads. Returns - breakpointId - Id of the created breakpoint for further reference. locations - List of the locations this breakpoint resolved into upon addition.

func (*Debugger) SetBreakpointOnFunctionCall

func (c *Debugger) SetBreakpointOnFunctionCall(ctx context.Context, objectId string, condition string) (string, error)

SetBreakpointOnFunctionCall - Sets JavaScript breakpoint before each call to the given function. If another function was created from the same source as a given one, calling it will also trigger the breakpoint. objectId - Function object id. condition - Expression to use as a breakpoint condition. When specified, debugger will stop on the breakpoint if this expression evaluates to true. Returns - breakpointId - Id of the created breakpoint for further reference.

func (*Debugger) SetBreakpointOnFunctionCallWithParams

func (c *Debugger) SetBreakpointOnFunctionCallWithParams(ctx context.Context, v *DebuggerSetBreakpointOnFunctionCallParams) (string, error)

SetBreakpointOnFunctionCallWithParams - Sets JavaScript breakpoint before each call to the given function. If another function was created from the same source as a given one, calling it will also trigger the breakpoint. Returns - breakpointId - Id of the created breakpoint for further reference.

func (*Debugger) SetBreakpointWithParams

func (c *Debugger) SetBreakpointWithParams(ctx context.Context, v *DebuggerSetBreakpointParams) (string, *DebuggerLocation, error)

SetBreakpointWithParams - Sets JavaScript breakpoint at a given location. Returns - breakpointId - Id of the created breakpoint for further reference. actualLocation - Location this breakpoint resolved into.

func (*Debugger) SetBreakpointsActive

func (c *Debugger) SetBreakpointsActive(ctx context.Context, active bool) (*gcdmessage.ChromeResponse, error)

SetBreakpointsActive - Activates / deactivates all breakpoints on the page. active - New value for breakpoints active state.

func (*Debugger) SetBreakpointsActiveWithParams

func (c *Debugger) SetBreakpointsActiveWithParams(ctx context.Context, v *DebuggerSetBreakpointsActiveParams) (*gcdmessage.ChromeResponse, error)

SetBreakpointsActiveWithParams - Activates / deactivates all breakpoints on the page.

func (*Debugger) SetInstrumentationBreakpoint

func (c *Debugger) SetInstrumentationBreakpoint(ctx context.Context, instrumentation string) (string, error)

SetInstrumentationBreakpoint - Sets instrumentation breakpoint. instrumentation - Instrumentation name. Returns - breakpointId - Id of the created breakpoint for further reference.

func (*Debugger) SetInstrumentationBreakpointWithParams

func (c *Debugger) SetInstrumentationBreakpointWithParams(ctx context.Context, v *DebuggerSetInstrumentationBreakpointParams) (string, error)

SetInstrumentationBreakpointWithParams - Sets instrumentation breakpoint. Returns - breakpointId - Id of the created breakpoint for further reference.

func (*Debugger) SetPauseOnExceptions

func (c *Debugger) SetPauseOnExceptions(ctx context.Context, state string) (*gcdmessage.ChromeResponse, error)

SetPauseOnExceptions - Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions, or caught exceptions, no exceptions. Initial pause on exceptions state is `none`. state - Pause on exceptions mode.

func (*Debugger) SetPauseOnExceptionsWithParams

func (c *Debugger) SetPauseOnExceptionsWithParams(ctx context.Context, v *DebuggerSetPauseOnExceptionsParams) (*gcdmessage.ChromeResponse, error)

SetPauseOnExceptionsWithParams - Defines pause on exceptions state. Can be set to stop on all exceptions, uncaught exceptions, or caught exceptions, no exceptions. Initial pause on exceptions state is `none`.

func (*Debugger) SetReturnValue

func (c *Debugger) SetReturnValue(ctx context.Context, newValue *RuntimeCallArgument) (*gcdmessage.ChromeResponse, error)

SetReturnValue - Changes return value in top frame. Available only at return break position. newValue - New return value.

func (*Debugger) SetReturnValueWithParams

func (c *Debugger) SetReturnValueWithParams(ctx context.Context, v *DebuggerSetReturnValueParams) (*gcdmessage.ChromeResponse, error)

SetReturnValueWithParams - Changes return value in top frame. Available only at return break position.

func (*Debugger) SetScriptSource

func (c *Debugger) SetScriptSource(ctx context.Context, scriptId string, scriptSource string, dryRun bool, allowTopFrameEditing bool) ([]*DebuggerCallFrame, bool, *RuntimeStackTrace, *RuntimeStackTraceId, string, *RuntimeExceptionDetails, error)

SetScriptSource - Edits JavaScript source live. In general, functions that are currently on the stack can not be edited with a single exception: If the edited function is the top-most stack frame and that is the only activation of that function on the stack. In this case the live edit will be successful and a `Debugger.restartFrame` for the top-most function is automatically triggered. scriptId - Id of the script to edit. scriptSource - New content of the script. dryRun - If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code. allowTopFrameEditing - If true, then `scriptSource` is allowed to change the function on top of the stack as long as the top-most stack frame is the only activation of that function. Returns - callFrames - New stack trace in case editing has happened while VM was stopped. stackChanged - Whether current call stack was modified after applying the changes. asyncStackTrace - Async stack trace, if any. asyncStackTraceId - Async stack trace, if any. status - Whether the operation was successful or not. Only `Ok` denotes a successful live edit while the other enum variants denote why the live edit failed. exceptionDetails - Exception details if any. Only present when `status` is `CompileError`.

func (*Debugger) SetScriptSourceWithParams

SetScriptSourceWithParams - Edits JavaScript source live. In general, functions that are currently on the stack can not be edited with a single exception: If the edited function is the top-most stack frame and that is the only activation of that function on the stack. In this case the live edit will be successful and a `Debugger.restartFrame` for the top-most function is automatically triggered. Returns - callFrames - New stack trace in case editing has happened while VM was stopped. stackChanged - Whether current call stack was modified after applying the changes. asyncStackTrace - Async stack trace, if any. asyncStackTraceId - Async stack trace, if any. status - Whether the operation was successful or not. Only `Ok` denotes a successful live edit while the other enum variants denote why the live edit failed. exceptionDetails - Exception details if any. Only present when `status` is `CompileError`.

func (*Debugger) SetSkipAllPauses

func (c *Debugger) SetSkipAllPauses(ctx context.Context, skip bool) (*gcdmessage.ChromeResponse, error)

SetSkipAllPauses - Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc). skip - New value for skip pauses state.

func (*Debugger) SetSkipAllPausesWithParams

func (c *Debugger) SetSkipAllPausesWithParams(ctx context.Context, v *DebuggerSetSkipAllPausesParams) (*gcdmessage.ChromeResponse, error)

SetSkipAllPausesWithParams - Makes page not interrupt on any pauses (breakpoint, exception, dom exception etc).

func (*Debugger) SetVariableValue

func (c *Debugger) SetVariableValue(ctx context.Context, scopeNumber int, variableName string, newValue *RuntimeCallArgument, callFrameId string) (*gcdmessage.ChromeResponse, error)

SetVariableValue - Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually. scopeNumber - 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually. variableName - Variable name. newValue - New variable value. callFrameId - Id of callframe that holds variable.

func (*Debugger) SetVariableValueWithParams

func (c *Debugger) SetVariableValueWithParams(ctx context.Context, v *DebuggerSetVariableValueParams) (*gcdmessage.ChromeResponse, error)

SetVariableValueWithParams - Changes value of variable in a callframe. Object-based scopes are not supported and must be mutated manually.

func (*Debugger) StepInto

func (c *Debugger) StepInto(ctx context.Context, breakOnAsyncCall bool, skipList []*DebuggerLocationRange) (*gcdmessage.ChromeResponse, error)

StepInto - Steps into the function call. breakOnAsyncCall - Debugger will pause on the execution of the first async task which was scheduled before next pause. skipList - The skipList specifies location ranges that should be skipped on step into.

func (*Debugger) StepIntoWithParams

func (c *Debugger) StepIntoWithParams(ctx context.Context, v *DebuggerStepIntoParams) (*gcdmessage.ChromeResponse, error)

StepIntoWithParams - Steps into the function call.

func (*Debugger) StepOut

func (c *Debugger) StepOut(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Steps out of the function call.

func (*Debugger) StepOver

func (c *Debugger) StepOver(ctx context.Context, skipList []*DebuggerLocationRange) (*gcdmessage.ChromeResponse, error)

StepOver - Steps over the statement. skipList - The skipList specifies location ranges that should be skipped on step over.

func (*Debugger) StepOverWithParams added in v2.0.5

func (c *Debugger) StepOverWithParams(ctx context.Context, v *DebuggerStepOverParams) (*gcdmessage.ChromeResponse, error)

StepOverWithParams - Steps over the statement.

type DebuggerBreakLocation

type DebuggerBreakLocation struct {
	ScriptId     string `json:"scriptId"`               // Script identifier as reported in the `Debugger.scriptParsed`.
	LineNumber   int    `json:"lineNumber"`             // Line number in the script (0-based).
	ColumnNumber int    `json:"columnNumber,omitempty"` // Column number in the script (0-based).
	Type         string `json:"type,omitempty"`         //
}

No Description.

type DebuggerBreakpointResolvedEvent

type DebuggerBreakpointResolvedEvent struct {
	Method string `json:"method"`
	Params struct {
		BreakpointId string            `json:"breakpointId"` // Breakpoint unique identifier.
		Location     *DebuggerLocation `json:"location"`     // Actual breakpoint location.
	} `json:"Params,omitempty"`
}

Fired when breakpoint is resolved to an actual script and location.

type DebuggerCallFrame

type DebuggerCallFrame struct {
	CallFrameId      string               `json:"callFrameId"`                // Call frame identifier. This identifier is only valid while the virtual machine is paused.
	FunctionName     string               `json:"functionName"`               // Name of the JavaScript function called on this call frame.
	FunctionLocation *DebuggerLocation    `json:"functionLocation,omitempty"` // Location in the source code.
	Location         *DebuggerLocation    `json:"location"`                   // Location in the source code.
	Url              string               `json:"url"`                        // JavaScript script name or url. Deprecated in favor of using the `location.scriptId` to resolve the URL via a previously sent `Debugger.scriptParsed` event.
	ScopeChain       []*DebuggerScope     `json:"scopeChain"`                 // Scope chain for this call frame.
	This             *RuntimeRemoteObject `json:"this"`                       // `this` object for this call frame.
	ReturnValue      *RuntimeRemoteObject `json:"returnValue,omitempty"`      // The value being returned, if the function is at return point.
	CanBeRestarted   bool                 `json:"canBeRestarted,omitempty"`   // Valid only while the VM is paused and indicates whether this frame can be restarted or not. Note that a `true` value here does not guarantee that Debugger#restartFrame with this CallFrameId will be successful, but it is very likely.
}

JavaScript call frame. Array of call frames form the call stack.

type DebuggerContinueToLocationParams

type DebuggerContinueToLocationParams struct {
	// Location to continue to.
	Location *DebuggerLocation `json:"location"`
	//
	TargetCallFrames string `json:"targetCallFrames,omitempty"`
}

type DebuggerDebugSymbols

type DebuggerDebugSymbols struct {
	Type        string `json:"type"`                  // Type of the debug symbols.
	ExternalURL string `json:"externalURL,omitempty"` // URL of the external symbol source.
}

Debug symbols available for a wasm script.

type DebuggerDisassembleWasmModuleParams added in v2.2.6

type DebuggerDisassembleWasmModuleParams struct {
	// Id of the script to disassemble
	ScriptId string `json:"scriptId"`
}

type DebuggerEnableParams

type DebuggerEnableParams struct {
	// The maximum size in bytes of collected scripts (not referenced by other heap objects) the debugger can hold. Puts no limit if parameter is omitted.
	MaxScriptsCacheSize float64 `json:"maxScriptsCacheSize,omitempty"`
}

type DebuggerEvaluateOnCallFrameParams

type DebuggerEvaluateOnCallFrameParams struct {
	// Call frame identifier to evaluate on.
	CallFrameId string `json:"callFrameId"`
	// Expression to evaluate.
	Expression string `json:"expression"`
	// String object group name to put result into (allows rapid releasing resulting object handles using `releaseObjectGroup`).
	ObjectGroup string `json:"objectGroup,omitempty"`
	// Specifies whether command line API should be available to the evaluated expression, defaults to false.
	IncludeCommandLineAPI bool `json:"includeCommandLineAPI,omitempty"`
	// In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides `setPauseOnException` state.
	Silent bool `json:"silent,omitempty"`
	// Whether the result is expected to be a JSON object that should be sent by value.
	ReturnByValue bool `json:"returnByValue,omitempty"`
	// Whether preview should be generated for the result.
	GeneratePreview bool `json:"generatePreview,omitempty"`
	// Whether to throw an exception if side effect cannot be ruled out during evaluation.
	ThrowOnSideEffect bool `json:"throwOnSideEffect,omitempty"`
	// Terminate execution after timing out (number of milliseconds).
	Timeout float64 `json:"timeout,omitempty"`
}

type DebuggerGetPossibleBreakpointsParams

type DebuggerGetPossibleBreakpointsParams struct {
	// Start of range to search possible breakpoint locations in.
	Start *DebuggerLocation `json:"start"`
	// End of range to search possible breakpoint locations in (excluding). When not specified, end of scripts is used as end of range.
	End *DebuggerLocation `json:"end,omitempty"`
	// Only consider locations which are in the same (non-nested) function as start.
	RestrictToFunction bool `json:"restrictToFunction,omitempty"`
}

type DebuggerGetScriptSourceParams

type DebuggerGetScriptSourceParams struct {
	// Id of the script to get source for.
	ScriptId string `json:"scriptId"`
}

type DebuggerGetStackTraceParams

type DebuggerGetStackTraceParams struct {
	//
	StackTraceId *RuntimeStackTraceId `json:"stackTraceId"`
}

type DebuggerGetWasmBytecodeParams

type DebuggerGetWasmBytecodeParams struct {
	// Id of the Wasm script to get source for.
	ScriptId string `json:"scriptId"`
}

type DebuggerLocation

type DebuggerLocation struct {
	ScriptId     string `json:"scriptId"`               // Script identifier as reported in the `Debugger.scriptParsed`.
	LineNumber   int    `json:"lineNumber"`             // Line number in the script (0-based).
	ColumnNumber int    `json:"columnNumber,omitempty"` // Column number in the script (0-based).
}

Location in the source code.

type DebuggerLocationRange added in v2.0.5

type DebuggerLocationRange struct {
	ScriptId string                  `json:"scriptId"` //
	Start    *DebuggerScriptPosition `json:"start"`    //
	End      *DebuggerScriptPosition `json:"end"`      //
}

Location range within one script.

type DebuggerNextWasmDisassemblyChunkParams added in v2.2.6

type DebuggerNextWasmDisassemblyChunkParams struct {
	//
	StreamId string `json:"streamId"`
}

type DebuggerPauseOnAsyncCallParams

type DebuggerPauseOnAsyncCallParams struct {
	// Debugger will pause when async call with given stack trace is started.
	ParentStackTraceId *RuntimeStackTraceId `json:"parentStackTraceId"`
}

type DebuggerPausedEvent

type DebuggerPausedEvent struct {
	Method string `json:"method"`
	Params struct {
		CallFrames            []*DebuggerCallFrame   `json:"callFrames"`                      // Call stack the virtual machine stopped on.
		Reason                string                 `json:"reason"`                          // Pause reason.
		Data                  map[string]interface{} `json:"data,omitempty"`                  // Object containing break-specific auxiliary properties.
		HitBreakpoints        []string               `json:"hitBreakpoints,omitempty"`        // Hit breakpoints IDs
		AsyncStackTrace       *RuntimeStackTrace     `json:"asyncStackTrace,omitempty"`       // Async stack trace, if any.
		AsyncStackTraceId     *RuntimeStackTraceId   `json:"asyncStackTraceId,omitempty"`     // Async stack trace, if any.
		AsyncCallStackTraceId *RuntimeStackTraceId   `json:"asyncCallStackTraceId,omitempty"` // Never present, will be removed.
	} `json:"Params,omitempty"`
}

Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria.

type DebuggerRemoveBreakpointParams

type DebuggerRemoveBreakpointParams struct {
	//
	BreakpointId string `json:"breakpointId"`
}

type DebuggerRestartFrameParams

type DebuggerRestartFrameParams struct {
	// Call frame identifier to evaluate on.
	CallFrameId string `json:"callFrameId"`
	// The `mode` parameter must be present and set to 'StepInto', otherwise `restartFrame` will error out.
	Mode string `json:"mode,omitempty"`
}

type DebuggerResumeParams

type DebuggerResumeParams struct {
	// Set to true to terminate execution upon resuming execution. In contrast to Runtime.terminateExecution, this will allows to execute further JavaScript (i.e. via evaluation) until execution of the paused code is actually resumed, at which point termination is triggered. If execution is currently not paused, this parameter has no effect.
	TerminateOnResume bool `json:"terminateOnResume,omitempty"`
}

type DebuggerScope

type DebuggerScope struct {
	Type          string               `json:"type"`                    // Scope type.
	Object        *RuntimeRemoteObject `json:"object"`                  // Object representing the scope. For `global` and `with` scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties.
	Name          string               `json:"name,omitempty"`          //
	StartLocation *DebuggerLocation    `json:"startLocation,omitempty"` // Location in the source code where scope starts
	EndLocation   *DebuggerLocation    `json:"endLocation,omitempty"`   // Location in the source code where scope ends
}

Scope description.

type DebuggerScriptFailedToParseEvent

type DebuggerScriptFailedToParseEvent struct {
	Method string `json:"method"`
	Params struct {
		ScriptId                string                 `json:"scriptId"`                          // Identifier of the script parsed.
		Url                     string                 `json:"url"`                               // URL or name of the script parsed (if any).
		StartLine               int                    `json:"startLine"`                         // Line offset of the script within the resource with given URL (for script tags).
		StartColumn             int                    `json:"startColumn"`                       // Column offset of the script within the resource with given URL.
		EndLine                 int                    `json:"endLine"`                           // Last line of the script.
		EndColumn               int                    `json:"endColumn"`                         // Length of the last line of the script.
		ExecutionContextId      int                    `json:"executionContextId"`                // Specifies script creation context.
		Hash                    string                 `json:"hash"`                              // Content hash of the script, SHA-256.
		ExecutionContextAuxData map[string]interface{} `json:"executionContextAuxData,omitempty"` // Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'|'isolated'|'worker', frameId: string}
		SourceMapURL            string                 `json:"sourceMapURL,omitempty"`            // URL of source map associated with script (if any).
		HasSourceURL            bool                   `json:"hasSourceURL,omitempty"`            // True, if this script has sourceURL.
		IsModule                bool                   `json:"isModule,omitempty"`                // True, if this script is ES6 module.
		Length                  int                    `json:"length,omitempty"`                  // This script length.
		StackTrace              *RuntimeStackTrace     `json:"stackTrace,omitempty"`              // JavaScript top stack frame of where the script parsed event was triggered if available.
		CodeOffset              int                    `json:"codeOffset,omitempty"`              // If the scriptLanguage is WebAssembly, the code section offset in the module.
		ScriptLanguage          string                 `json:"scriptLanguage,omitempty"`          // The language of the script. enum values: JavaScript, WebAssembly
		EmbedderName            string                 `json:"embedderName,omitempty"`            // The name the embedder supplied for this script.
	} `json:"Params,omitempty"`
}

Fired when virtual machine fails to parse the script.

type DebuggerScriptParsedEvent

type DebuggerScriptParsedEvent struct {
	Method string `json:"method"`
	Params struct {
		ScriptId                string                 `json:"scriptId"`                          // Identifier of the script parsed.
		Url                     string                 `json:"url"`                               // URL or name of the script parsed (if any).
		StartLine               int                    `json:"startLine"`                         // Line offset of the script within the resource with given URL (for script tags).
		StartColumn             int                    `json:"startColumn"`                       // Column offset of the script within the resource with given URL.
		EndLine                 int                    `json:"endLine"`                           // Last line of the script.
		EndColumn               int                    `json:"endColumn"`                         // Length of the last line of the script.
		ExecutionContextId      int                    `json:"executionContextId"`                // Specifies script creation context.
		Hash                    string                 `json:"hash"`                              // Content hash of the script, SHA-256.
		ExecutionContextAuxData map[string]interface{} `json:"executionContextAuxData,omitempty"` // Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'|'isolated'|'worker', frameId: string}
		IsLiveEdit              bool                   `json:"isLiveEdit,omitempty"`              // True, if this script is generated as a result of the live edit operation.
		SourceMapURL            string                 `json:"sourceMapURL,omitempty"`            // URL of source map associated with script (if any).
		HasSourceURL            bool                   `json:"hasSourceURL,omitempty"`            // True, if this script has sourceURL.
		IsModule                bool                   `json:"isModule,omitempty"`                // True, if this script is ES6 module.
		Length                  int                    `json:"length,omitempty"`                  // This script length.
		StackTrace              *RuntimeStackTrace     `json:"stackTrace,omitempty"`              // JavaScript top stack frame of where the script parsed event was triggered if available.
		CodeOffset              int                    `json:"codeOffset,omitempty"`              // If the scriptLanguage is WebAssembly, the code section offset in the module.
		ScriptLanguage          string                 `json:"scriptLanguage,omitempty"`          // The language of the script. enum values: JavaScript, WebAssembly
		DebugSymbols            *DebuggerDebugSymbols  `json:"debugSymbols,omitempty"`            // If the scriptLanguage is WebASsembly, the source of debug symbols for the module.
		EmbedderName            string                 `json:"embedderName,omitempty"`            // The name the embedder supplied for this script.
	} `json:"Params,omitempty"`
}

Fired when virtual machine parses script. This event is also fired for all known and uncollected scripts upon enabling debugger.

type DebuggerScriptPosition

type DebuggerScriptPosition struct {
	LineNumber   int `json:"lineNumber"`   //
	ColumnNumber int `json:"columnNumber"` //
}

Location in the source code.

type DebuggerSearchInContentParams

type DebuggerSearchInContentParams struct {
	// Id of the script to search in.
	ScriptId string `json:"scriptId"`
	// String to search for.
	Query string `json:"query"`
	// If true, search is case sensitive.
	CaseSensitive bool `json:"caseSensitive,omitempty"`
	// If true, treats string parameter as regex.
	IsRegex bool `json:"isRegex,omitempty"`
}

type DebuggerSearchMatch

type DebuggerSearchMatch struct {
	LineNumber  float64 `json:"lineNumber"`  // Line number in resource content.
	LineContent string  `json:"lineContent"` // Line with match content.
}

Search match for resource.

type DebuggerSetAsyncCallStackDepthParams

type DebuggerSetAsyncCallStackDepthParams struct {
	// Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async call stacks (default).
	MaxDepth int `json:"maxDepth"`
}

type DebuggerSetBlackboxPatternsParams

type DebuggerSetBlackboxPatternsParams struct {
	// Array of regexps that will be used to check script url for blackbox state.
	Patterns []string `json:"patterns"`
}

type DebuggerSetBlackboxedRangesParams

type DebuggerSetBlackboxedRangesParams struct {
	// Id of the script.
	ScriptId string `json:"scriptId"`
	//
	Positions []*DebuggerScriptPosition `json:"positions"`
}

type DebuggerSetBreakpointByUrlParams

type DebuggerSetBreakpointByUrlParams struct {
	// Line number to set breakpoint at.
	LineNumber int `json:"lineNumber"`
	// URL of the resources to set breakpoint on.
	Url string `json:"url,omitempty"`
	// Regex pattern for the URLs of the resources to set breakpoints on. Either `url` or `urlRegex` must be specified.
	UrlRegex string `json:"urlRegex,omitempty"`
	// Script hash of the resources to set breakpoint on.
	ScriptHash string `json:"scriptHash,omitempty"`
	// Offset in the line to set breakpoint at.
	ColumnNumber int `json:"columnNumber,omitempty"`
	// Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.
	Condition string `json:"condition,omitempty"`
}

type DebuggerSetBreakpointOnFunctionCallParams

type DebuggerSetBreakpointOnFunctionCallParams struct {
	// Function object id.
	ObjectId string `json:"objectId"`
	// Expression to use as a breakpoint condition. When specified, debugger will stop on the breakpoint if this expression evaluates to true.
	Condition string `json:"condition,omitempty"`
}

type DebuggerSetBreakpointParams

type DebuggerSetBreakpointParams struct {
	// Location to set breakpoint in.
	Location *DebuggerLocation `json:"location"`
	// Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true.
	Condition string `json:"condition,omitempty"`
}

type DebuggerSetBreakpointsActiveParams

type DebuggerSetBreakpointsActiveParams struct {
	// New value for breakpoints active state.
	Active bool `json:"active"`
}

type DebuggerSetInstrumentationBreakpointParams

type DebuggerSetInstrumentationBreakpointParams struct {
	// Instrumentation name.
	Instrumentation string `json:"instrumentation"`
}

type DebuggerSetPauseOnExceptionsParams

type DebuggerSetPauseOnExceptionsParams struct {
	// Pause on exceptions mode.
	State string `json:"state"`
}

type DebuggerSetReturnValueParams

type DebuggerSetReturnValueParams struct {
	// New return value.
	NewValue *RuntimeCallArgument `json:"newValue"`
}

type DebuggerSetScriptSourceParams

type DebuggerSetScriptSourceParams struct {
	// Id of the script to edit.
	ScriptId string `json:"scriptId"`
	// New content of the script.
	ScriptSource string `json:"scriptSource"`
	// If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code.
	DryRun bool `json:"dryRun,omitempty"`
	// If true, then `scriptSource` is allowed to change the function on top of the stack as long as the top-most stack frame is the only activation of that function.
	AllowTopFrameEditing bool `json:"allowTopFrameEditing,omitempty"`
}

type DebuggerSetSkipAllPausesParams

type DebuggerSetSkipAllPausesParams struct {
	// New value for skip pauses state.
	Skip bool `json:"skip"`
}

type DebuggerSetVariableValueParams

type DebuggerSetVariableValueParams struct {
	// 0-based number of scope as was listed in scope chain. Only 'local', 'closure' and 'catch' scope types are allowed. Other scopes could be manipulated manually.
	ScopeNumber int `json:"scopeNumber"`
	// Variable name.
	VariableName string `json:"variableName"`
	// New variable value.
	NewValue *RuntimeCallArgument `json:"newValue"`
	// Id of callframe that holds variable.
	CallFrameId string `json:"callFrameId"`
}

type DebuggerStepIntoParams

type DebuggerStepIntoParams struct {
	// Debugger will pause on the execution of the first async task which was scheduled before next pause.
	BreakOnAsyncCall bool `json:"breakOnAsyncCall,omitempty"`
	// The skipList specifies location ranges that should be skipped on step into.
	SkipList []*DebuggerLocationRange `json:"skipList,omitempty"`
}

type DebuggerStepOverParams added in v2.0.5

type DebuggerStepOverParams struct {
	// The skipList specifies location ranges that should be skipped on step over.
	SkipList []*DebuggerLocationRange `json:"skipList,omitempty"`
}

type DebuggerWasmDisassemblyChunk added in v2.2.6

type DebuggerWasmDisassemblyChunk struct {
	Lines           []string `json:"lines"`           // The next chunk of disassembled lines.
	BytecodeOffsets []int    `json:"bytecodeOffsets"` // The bytecode offsets describing the start of each line.
}

No Description.

type DeviceAccess added in v2.3.0

type DeviceAccess struct {
	// contains filtered or unexported fields
}

func NewDeviceAccess added in v2.3.0

func NewDeviceAccess(target gcdmessage.ChromeTargeter) *DeviceAccess

func (*DeviceAccess) CancelPrompt added in v2.3.0

func (c *DeviceAccess) CancelPrompt(ctx context.Context, id string) (*gcdmessage.ChromeResponse, error)

CancelPrompt - Cancel a prompt in response to a DeviceAccess.deviceRequestPrompted event. id -

func (*DeviceAccess) CancelPromptWithParams added in v2.3.0

CancelPromptWithParams - Cancel a prompt in response to a DeviceAccess.deviceRequestPrompted event.

func (*DeviceAccess) Disable added in v2.3.0

Disable events in this domain.

func (*DeviceAccess) Enable added in v2.3.0

Enable events in this domain.

func (*DeviceAccess) SelectPrompt added in v2.3.0

func (c *DeviceAccess) SelectPrompt(ctx context.Context, id string, deviceId string) (*gcdmessage.ChromeResponse, error)

SelectPrompt - Select a device in response to a DeviceAccess.deviceRequestPrompted event. id - deviceId -

func (*DeviceAccess) SelectPromptWithParams added in v2.3.0

SelectPromptWithParams - Select a device in response to a DeviceAccess.deviceRequestPrompted event.

type DeviceAccessCancelPromptParams added in v2.3.0

type DeviceAccessCancelPromptParams struct {
	//
	Id string `json:"id"`
}

type DeviceAccessDeviceRequestPromptedEvent added in v2.3.0

type DeviceAccessDeviceRequestPromptedEvent struct {
	Method string `json:"method"`
	Params struct {
		Id      string                      `json:"id"`      //
		Devices []*DeviceAccessPromptDevice `json:"devices"` //
	} `json:"Params,omitempty"`
}

A device request opened a user prompt to select a device. Respond with the selectPrompt or cancelPrompt command.

type DeviceAccessPromptDevice added in v2.3.0

type DeviceAccessPromptDevice struct {
	Id   string `json:"id"`   //
	Name string `json:"name"` // Display name as it appears in a device request user prompt.
}

Device information displayed in a user prompt to select a device.

type DeviceAccessSelectPromptParams added in v2.3.0

type DeviceAccessSelectPromptParams struct {
	//
	Id string `json:"id"`
	//
	DeviceId string `json:"deviceId"`
}

type DeviceOrientation

type DeviceOrientation struct {
	// contains filtered or unexported fields
}

func NewDeviceOrientation

func NewDeviceOrientation(target gcdmessage.ChromeTargeter) *DeviceOrientation

func (*DeviceOrientation) ClearDeviceOrientationOverride

func (c *DeviceOrientation) ClearDeviceOrientationOverride(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Clears the overridden Device Orientation.

func (*DeviceOrientation) SetDeviceOrientationOverride

func (c *DeviceOrientation) SetDeviceOrientationOverride(ctx context.Context, alpha float64, beta float64, gamma float64) (*gcdmessage.ChromeResponse, error)

SetDeviceOrientationOverride - Overrides the Device Orientation. alpha - Mock alpha beta - Mock beta gamma - Mock gamma

func (*DeviceOrientation) SetDeviceOrientationOverrideWithParams

SetDeviceOrientationOverrideWithParams - Overrides the Device Orientation.

type DeviceOrientationSetDeviceOrientationOverrideParams

type DeviceOrientationSetDeviceOrientationOverrideParams struct {
	// Mock alpha
	Alpha float64 `json:"alpha"`
	// Mock beta
	Beta float64 `json:"beta"`
	// Mock gamma
	Gamma float64 `json:"gamma"`
}

type Emulation

type Emulation struct {
	// contains filtered or unexported fields
}

func NewEmulation

func NewEmulation(target gcdmessage.ChromeTargeter) *Emulation

func (*Emulation) CanEmulate

func (c *Emulation) CanEmulate(ctx context.Context) (bool, error)

CanEmulate - Tells whether emulation is supported. Returns - result - True if emulation is supported.

func (*Emulation) ClearDeviceMetricsOverride

func (c *Emulation) ClearDeviceMetricsOverride(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Clears the overridden device metrics.

func (*Emulation) ClearGeolocationOverride

func (c *Emulation) ClearGeolocationOverride(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Clears the overridden Geolocation Position and Error.

func (*Emulation) ClearIdleOverride added in v2.0.5

func (c *Emulation) ClearIdleOverride(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Clears Idle state overrides.

func (*Emulation) ResetPageScaleFactor

func (c *Emulation) ResetPageScaleFactor(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Requests that page scale factor is reset to initial values.

func (*Emulation) SetAutoDarkModeOverride added in v2.2.4

func (c *Emulation) SetAutoDarkModeOverride(ctx context.Context, enabled bool) (*gcdmessage.ChromeResponse, error)

SetAutoDarkModeOverride - Automatically render all web contents using a dark theme. enabled - Whether to enable or disable automatic dark mode. If not specified, any existing override will be cleared.

func (*Emulation) SetAutoDarkModeOverrideWithParams added in v2.2.4

func (c *Emulation) SetAutoDarkModeOverrideWithParams(ctx context.Context, v *EmulationSetAutoDarkModeOverrideParams) (*gcdmessage.ChromeResponse, error)

SetAutoDarkModeOverrideWithParams - Automatically render all web contents using a dark theme.

func (*Emulation) SetAutomationOverride added in v2.2.5

func (c *Emulation) SetAutomationOverride(ctx context.Context, enabled bool) (*gcdmessage.ChromeResponse, error)

SetAutomationOverride - Allows overriding the automation flag. enabled - Whether the override should be enabled.

func (*Emulation) SetAutomationOverrideWithParams added in v2.2.5

func (c *Emulation) SetAutomationOverrideWithParams(ctx context.Context, v *EmulationSetAutomationOverrideParams) (*gcdmessage.ChromeResponse, error)

SetAutomationOverrideWithParams - Allows overriding the automation flag.

func (*Emulation) SetCPUThrottlingRate

func (c *Emulation) SetCPUThrottlingRate(ctx context.Context, rate float64) (*gcdmessage.ChromeResponse, error)

SetCPUThrottlingRate - Enables CPU throttling to emulate slow CPUs. rate - Throttling rate as a slowdown factor (1 is no throttle, 2 is 2x slowdown, etc).

func (*Emulation) SetCPUThrottlingRateWithParams

func (c *Emulation) SetCPUThrottlingRateWithParams(ctx context.Context, v *EmulationSetCPUThrottlingRateParams) (*gcdmessage.ChromeResponse, error)

SetCPUThrottlingRateWithParams - Enables CPU throttling to emulate slow CPUs.

func (*Emulation) SetDefaultBackgroundColorOverride

func (c *Emulation) SetDefaultBackgroundColorOverride(ctx context.Context, color *DOMRGBA) (*gcdmessage.ChromeResponse, error)

SetDefaultBackgroundColorOverride - Sets or clears an override of the default background color of the frame. This override is used if the content does not specify one. color - RGBA of the default background color. If not specified, any existing override will be cleared.

func (*Emulation) SetDefaultBackgroundColorOverrideWithParams

func (c *Emulation) SetDefaultBackgroundColorOverrideWithParams(ctx context.Context, v *EmulationSetDefaultBackgroundColorOverrideParams) (*gcdmessage.ChromeResponse, error)

SetDefaultBackgroundColorOverrideWithParams - Sets or clears an override of the default background color of the frame. This override is used if the content does not specify one.

func (*Emulation) SetDeviceMetricsOverride

func (c *Emulation) SetDeviceMetricsOverride(ctx context.Context, width int, height int, deviceScaleFactor float64, mobile bool, scale float64, screenWidth int, screenHeight int, positionX int, positionY int, dontSetVisibleSize bool, screenOrientation *EmulationScreenOrientation, viewport *PageViewport, displayFeature *EmulationDisplayFeature) (*gcdmessage.ChromeResponse, error)

SetDeviceMetricsOverride - Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media query results). width - Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override. height - Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override. deviceScaleFactor - Overriding device scale factor value. 0 disables the override. mobile - Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more. scale - Scale to apply to resulting view image. screenWidth - Overriding screen width value in pixels (minimum 0, maximum 10000000). screenHeight - Overriding screen height value in pixels (minimum 0, maximum 10000000). positionX - Overriding view X position on screen in pixels (minimum 0, maximum 10000000). positionY - Overriding view Y position on screen in pixels (minimum 0, maximum 10000000). dontSetVisibleSize - Do not set visible view size, rely upon explicit setVisibleSize call. screenOrientation - Screen orientation override. viewport - If set, the visible area of the page will be overridden to this viewport. This viewport change is not observed by the page, e.g. viewport-relative elements do not change positions. displayFeature - If set, the display feature of a multi-segment screen. If not set, multi-segment support is turned-off.

func (*Emulation) SetDeviceMetricsOverrideWithParams

func (c *Emulation) SetDeviceMetricsOverrideWithParams(ctx context.Context, v *EmulationSetDeviceMetricsOverrideParams) (*gcdmessage.ChromeResponse, error)

SetDeviceMetricsOverrideWithParams - Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media query results).

func (*Emulation) SetDisabledImageTypes added in v2.0.7

func (c *Emulation) SetDisabledImageTypes(ctx context.Context, imageTypes []string) (*gcdmessage.ChromeResponse, error)

SetDisabledImageTypes - imageTypes - Image types to disable. enum values: avif, webp

func (*Emulation) SetDisabledImageTypesWithParams added in v2.0.7

func (c *Emulation) SetDisabledImageTypesWithParams(ctx context.Context, v *EmulationSetDisabledImageTypesParams) (*gcdmessage.ChromeResponse, error)

SetDisabledImageTypesWithParams -

func (*Emulation) SetDocumentCookieDisabled

func (c *Emulation) SetDocumentCookieDisabled(ctx context.Context, disabled bool) (*gcdmessage.ChromeResponse, error)

SetDocumentCookieDisabled - disabled - Whether document.coookie API should be disabled.

func (*Emulation) SetDocumentCookieDisabledWithParams

func (c *Emulation) SetDocumentCookieDisabledWithParams(ctx context.Context, v *EmulationSetDocumentCookieDisabledParams) (*gcdmessage.ChromeResponse, error)

SetDocumentCookieDisabledWithParams -

func (*Emulation) SetEmitTouchEventsForMouse

func (c *Emulation) SetEmitTouchEventsForMouse(ctx context.Context, enabled bool, configuration string) (*gcdmessage.ChromeResponse, error)

SetEmitTouchEventsForMouse - enabled - Whether touch emulation based on mouse input should be enabled. configuration - Touch/gesture events configuration. Default: current platform.

func (*Emulation) SetEmitTouchEventsForMouseWithParams

func (c *Emulation) SetEmitTouchEventsForMouseWithParams(ctx context.Context, v *EmulationSetEmitTouchEventsForMouseParams) (*gcdmessage.ChromeResponse, error)

SetEmitTouchEventsForMouseWithParams -

func (*Emulation) SetEmulatedMedia

func (c *Emulation) SetEmulatedMedia(ctx context.Context, media string, features []*EmulationMediaFeature) (*gcdmessage.ChromeResponse, error)

SetEmulatedMedia - Emulates the given media type or media feature for CSS media queries. media - Media type to emulate. Empty string disables the override. features - Media features to emulate.

func (*Emulation) SetEmulatedMediaWithParams

func (c *Emulation) SetEmulatedMediaWithParams(ctx context.Context, v *EmulationSetEmulatedMediaParams) (*gcdmessage.ChromeResponse, error)

SetEmulatedMediaWithParams - Emulates the given media type or media feature for CSS media queries.

func (*Emulation) SetEmulatedVisionDeficiency

func (c *Emulation) SetEmulatedVisionDeficiency(ctx context.Context, theType string) (*gcdmessage.ChromeResponse, error)

SetEmulatedVisionDeficiency - Emulates the given vision deficiency. type - Vision deficiency to emulate. Order: best-effort emulations come first, followed by any physiologically accurate emulations for medically recognized color vision deficiencies.

func (*Emulation) SetEmulatedVisionDeficiencyWithParams

func (c *Emulation) SetEmulatedVisionDeficiencyWithParams(ctx context.Context, v *EmulationSetEmulatedVisionDeficiencyParams) (*gcdmessage.ChromeResponse, error)

SetEmulatedVisionDeficiencyWithParams - Emulates the given vision deficiency.

func (*Emulation) SetFocusEmulationEnabled

func (c *Emulation) SetFocusEmulationEnabled(ctx context.Context, enabled bool) (*gcdmessage.ChromeResponse, error)

SetFocusEmulationEnabled - Enables or disables simulating a focused and active page. enabled - Whether to enable to disable focus emulation.

func (*Emulation) SetFocusEmulationEnabledWithParams

func (c *Emulation) SetFocusEmulationEnabledWithParams(ctx context.Context, v *EmulationSetFocusEmulationEnabledParams) (*gcdmessage.ChromeResponse, error)

SetFocusEmulationEnabledWithParams - Enables or disables simulating a focused and active page.

func (*Emulation) SetGeolocationOverride

func (c *Emulation) SetGeolocationOverride(ctx context.Context, latitude float64, longitude float64, accuracy float64) (*gcdmessage.ChromeResponse, error)

SetGeolocationOverride - Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable. latitude - Mock latitude longitude - Mock longitude accuracy - Mock accuracy

func (*Emulation) SetGeolocationOverrideWithParams

func (c *Emulation) SetGeolocationOverrideWithParams(ctx context.Context, v *EmulationSetGeolocationOverrideParams) (*gcdmessage.ChromeResponse, error)

SetGeolocationOverrideWithParams - Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable.

func (*Emulation) SetHardwareConcurrencyOverride added in v2.2.6

func (c *Emulation) SetHardwareConcurrencyOverride(ctx context.Context, hardwareConcurrency int) (*gcdmessage.ChromeResponse, error)

SetHardwareConcurrencyOverride - hardwareConcurrency - Hardware concurrency to report

func (*Emulation) SetHardwareConcurrencyOverrideWithParams added in v2.2.6

func (c *Emulation) SetHardwareConcurrencyOverrideWithParams(ctx context.Context, v *EmulationSetHardwareConcurrencyOverrideParams) (*gcdmessage.ChromeResponse, error)

SetHardwareConcurrencyOverrideWithParams -

func (*Emulation) SetIdleOverride added in v2.0.5

func (c *Emulation) SetIdleOverride(ctx context.Context, isUserActive bool, isScreenUnlocked bool) (*gcdmessage.ChromeResponse, error)

SetIdleOverride - Overrides the Idle state. isUserActive - Mock isUserActive isScreenUnlocked - Mock isScreenUnlocked

func (*Emulation) SetIdleOverrideWithParams added in v2.0.5

func (c *Emulation) SetIdleOverrideWithParams(ctx context.Context, v *EmulationSetIdleOverrideParams) (*gcdmessage.ChromeResponse, error)

SetIdleOverrideWithParams - Overrides the Idle state.

func (*Emulation) SetLocaleOverride

func (c *Emulation) SetLocaleOverride(ctx context.Context, locale string) (*gcdmessage.ChromeResponse, error)

SetLocaleOverride - Overrides default host system locale with the specified one. locale - ICU style C locale (e.g. "en_US"). If not specified or empty, disables the override and restores default host system locale.

func (*Emulation) SetLocaleOverrideWithParams

func (c *Emulation) SetLocaleOverrideWithParams(ctx context.Context, v *EmulationSetLocaleOverrideParams) (*gcdmessage.ChromeResponse, error)

SetLocaleOverrideWithParams - Overrides default host system locale with the specified one.

func (*Emulation) SetNavigatorOverrides

func (c *Emulation) SetNavigatorOverrides(ctx context.Context, platform string) (*gcdmessage.ChromeResponse, error)

SetNavigatorOverrides - Overrides value returned by the javascript navigator object. platform - The platform navigator.platform should return.

func (*Emulation) SetNavigatorOverridesWithParams

func (c *Emulation) SetNavigatorOverridesWithParams(ctx context.Context, v *EmulationSetNavigatorOverridesParams) (*gcdmessage.ChromeResponse, error)

SetNavigatorOverridesWithParams - Overrides value returned by the javascript navigator object.

func (*Emulation) SetPageScaleFactor

func (c *Emulation) SetPageScaleFactor(ctx context.Context, pageScaleFactor float64) (*gcdmessage.ChromeResponse, error)

SetPageScaleFactor - Sets a specified page scale factor. pageScaleFactor - Page scale factor.

func (*Emulation) SetPageScaleFactorWithParams

func (c *Emulation) SetPageScaleFactorWithParams(ctx context.Context, v *EmulationSetPageScaleFactorParams) (*gcdmessage.ChromeResponse, error)

SetPageScaleFactorWithParams - Sets a specified page scale factor.

func (*Emulation) SetScriptExecutionDisabled

func (c *Emulation) SetScriptExecutionDisabled(ctx context.Context, value bool) (*gcdmessage.ChromeResponse, error)

SetScriptExecutionDisabled - Switches script execution in the page. value - Whether script execution should be disabled in the page.

func (*Emulation) SetScriptExecutionDisabledWithParams

func (c *Emulation) SetScriptExecutionDisabledWithParams(ctx context.Context, v *EmulationSetScriptExecutionDisabledParams) (*gcdmessage.ChromeResponse, error)

SetScriptExecutionDisabledWithParams - Switches script execution in the page.

func (*Emulation) SetScrollbarsHidden

func (c *Emulation) SetScrollbarsHidden(ctx context.Context, hidden bool) (*gcdmessage.ChromeResponse, error)

SetScrollbarsHidden - hidden - Whether scrollbars should be always hidden.

func (*Emulation) SetScrollbarsHiddenWithParams

func (c *Emulation) SetScrollbarsHiddenWithParams(ctx context.Context, v *EmulationSetScrollbarsHiddenParams) (*gcdmessage.ChromeResponse, error)

SetScrollbarsHiddenWithParams -

func (*Emulation) SetTimezoneOverride

func (c *Emulation) SetTimezoneOverride(ctx context.Context, timezoneId string) (*gcdmessage.ChromeResponse, error)

SetTimezoneOverride - Overrides default host system timezone with the specified one. timezoneId - The timezone identifier. If empty, disables the override and restores default host system timezone.

func (*Emulation) SetTimezoneOverrideWithParams

func (c *Emulation) SetTimezoneOverrideWithParams(ctx context.Context, v *EmulationSetTimezoneOverrideParams) (*gcdmessage.ChromeResponse, error)

SetTimezoneOverrideWithParams - Overrides default host system timezone with the specified one.

func (*Emulation) SetTouchEmulationEnabled

func (c *Emulation) SetTouchEmulationEnabled(ctx context.Context, enabled bool, maxTouchPoints int) (*gcdmessage.ChromeResponse, error)

SetTouchEmulationEnabled - Enables touch on platforms which do not support them. enabled - Whether the touch event emulation should be enabled. maxTouchPoints - Maximum touch points supported. Defaults to one.

func (*Emulation) SetTouchEmulationEnabledWithParams

func (c *Emulation) SetTouchEmulationEnabledWithParams(ctx context.Context, v *EmulationSetTouchEmulationEnabledParams) (*gcdmessage.ChromeResponse, error)

SetTouchEmulationEnabledWithParams - Enables touch on platforms which do not support them.

func (*Emulation) SetUserAgentOverride

func (c *Emulation) SetUserAgentOverride(ctx context.Context, userAgent string, acceptLanguage string, platform string, userAgentMetadata *EmulationUserAgentMetadata) (*gcdmessage.ChromeResponse, error)

SetUserAgentOverride - Allows overriding user agent with the given string. userAgent - User agent to use. acceptLanguage - Browser langugage to emulate. platform - The platform navigator.platform should return. userAgentMetadata - To be sent in Sec-CH-UA-* headers and returned in navigator.userAgentData

func (*Emulation) SetUserAgentOverrideWithParams

func (c *Emulation) SetUserAgentOverrideWithParams(ctx context.Context, v *EmulationSetUserAgentOverrideParams) (*gcdmessage.ChromeResponse, error)

SetUserAgentOverrideWithParams - Allows overriding user agent with the given string.

func (*Emulation) SetVirtualTimePolicy

func (c *Emulation) SetVirtualTimePolicy(ctx context.Context, policy string, budget float64, maxVirtualTimeTaskStarvationCount int, initialVirtualTime float64) (float64, error)

SetVirtualTimePolicy - Turns on virtual time for all frames (replacing real-time with a synthetic time source) and sets the current virtual time policy. Note this supersedes any previous time budget. policy - enum values: advance, pause, pauseIfNetworkFetchesPending budget - If set, after this many virtual milliseconds have elapsed virtual time will be paused and a virtualTimeBudgetExpired event is sent. maxVirtualTimeTaskStarvationCount - If set this specifies the maximum number of tasks that can be run before virtual is forced forwards to prevent deadlock. initialVirtualTime - If set, base::Time::Now will be overridden to initially return this value. Returns - virtualTimeTicksBase - Absolute timestamp at which virtual time was first enabled (up time in milliseconds).

func (*Emulation) SetVirtualTimePolicyWithParams

func (c *Emulation) SetVirtualTimePolicyWithParams(ctx context.Context, v *EmulationSetVirtualTimePolicyParams) (float64, error)

SetVirtualTimePolicyWithParams - Turns on virtual time for all frames (replacing real-time with a synthetic time source) and sets the current virtual time policy. Note this supersedes any previous time budget. Returns - virtualTimeTicksBase - Absolute timestamp at which virtual time was first enabled (up time in milliseconds).

func (*Emulation) SetVisibleSize

func (c *Emulation) SetVisibleSize(ctx context.Context, width int, height int) (*gcdmessage.ChromeResponse, error)

SetVisibleSize - Resizes the frame/viewport of the page. Note that this does not affect the frame's container (e.g. browser window). Can be used to produce screenshots of the specified size. Not supported on Android. width - Frame width (DIP). height - Frame height (DIP).

func (*Emulation) SetVisibleSizeWithParams

func (c *Emulation) SetVisibleSizeWithParams(ctx context.Context, v *EmulationSetVisibleSizeParams) (*gcdmessage.ChromeResponse, error)

SetVisibleSizeWithParams - Resizes the frame/viewport of the page. Note that this does not affect the frame's container (e.g. browser window). Can be used to produce screenshots of the specified size. Not supported on Android.

type EmulationDisplayFeature

type EmulationDisplayFeature struct {
	Orientation string `json:"orientation"` // Orientation of a display feature in relation to screen
	Offset      int    `json:"offset"`      // The offset from the screen origin in either the x (for vertical orientation) or y (for horizontal orientation) direction.
	MaskLength  int    `json:"maskLength"`  // A display feature may mask content such that it is not physically displayed - this length along with the offset describes this area. A display feature that only splits content will have a 0 mask_length.
}

No Description.

type EmulationMediaFeature

type EmulationMediaFeature struct {
	Name  string `json:"name"`  //
	Value string `json:"value"` //
}

No Description.

type EmulationScreenOrientation

type EmulationScreenOrientation struct {
	Type  string `json:"type"`  // Orientation type.
	Angle int    `json:"angle"` // Orientation angle.
}

Screen orientation.

type EmulationSetAutoDarkModeOverrideParams added in v2.2.4

type EmulationSetAutoDarkModeOverrideParams struct {
	// Whether to enable or disable automatic dark mode. If not specified, any existing override will be cleared.
	Enabled bool `json:"enabled,omitempty"`
}

type EmulationSetAutomationOverrideParams added in v2.2.5

type EmulationSetAutomationOverrideParams struct {
	// Whether the override should be enabled.
	Enabled bool `json:"enabled"`
}

type EmulationSetCPUThrottlingRateParams

type EmulationSetCPUThrottlingRateParams struct {
	// Throttling rate as a slowdown factor (1 is no throttle, 2 is 2x slowdown, etc).
	Rate float64 `json:"rate"`
}

type EmulationSetDefaultBackgroundColorOverrideParams

type EmulationSetDefaultBackgroundColorOverrideParams struct {
	// RGBA of the default background color. If not specified, any existing override will be cleared.
	Color *DOMRGBA `json:"color,omitempty"`
}

type EmulationSetDeviceMetricsOverrideParams

type EmulationSetDeviceMetricsOverrideParams struct {
	// Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.
	Width int `json:"width"`
	// Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override.
	Height int `json:"height"`
	// Overriding device scale factor value. 0 disables the override.
	DeviceScaleFactor float64 `json:"deviceScaleFactor"`
	// Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more.
	Mobile bool `json:"mobile"`
	// Scale to apply to resulting view image.
	Scale float64 `json:"scale,omitempty"`
	// Overriding screen width value in pixels (minimum 0, maximum 10000000).
	ScreenWidth int `json:"screenWidth,omitempty"`
	// Overriding screen height value in pixels (minimum 0, maximum 10000000).
	ScreenHeight int `json:"screenHeight,omitempty"`
	// Overriding view X position on screen in pixels (minimum 0, maximum 10000000).
	PositionX int `json:"positionX,omitempty"`
	// Overriding view Y position on screen in pixels (minimum 0, maximum 10000000).
	PositionY int `json:"positionY,omitempty"`
	// Do not set visible view size, rely upon explicit setVisibleSize call.
	DontSetVisibleSize bool `json:"dontSetVisibleSize,omitempty"`
	// Screen orientation override.
	ScreenOrientation *EmulationScreenOrientation `json:"screenOrientation,omitempty"`
	// If set, the visible area of the page will be overridden to this viewport. This viewport change is not observed by the page, e.g. viewport-relative elements do not change positions.
	Viewport *PageViewport `json:"viewport,omitempty"`
	// If set, the display feature of a multi-segment screen. If not set, multi-segment support is turned-off.
	DisplayFeature *EmulationDisplayFeature `json:"displayFeature,omitempty"`
}

type EmulationSetDisabledImageTypesParams added in v2.0.7

type EmulationSetDisabledImageTypesParams struct {
	// Image types to disable. enum values: avif, webp
	ImageTypes []string `json:"imageTypes"`
}

type EmulationSetDocumentCookieDisabledParams

type EmulationSetDocumentCookieDisabledParams struct {
	// Whether document.coookie API should be disabled.
	Disabled bool `json:"disabled"`
}

type EmulationSetEmitTouchEventsForMouseParams

type EmulationSetEmitTouchEventsForMouseParams struct {
	// Whether touch emulation based on mouse input should be enabled.
	Enabled bool `json:"enabled"`
	// Touch/gesture events configuration. Default: current platform.
	Configuration string `json:"configuration,omitempty"`
}

type EmulationSetEmulatedMediaParams

type EmulationSetEmulatedMediaParams struct {
	// Media type to emulate. Empty string disables the override.
	Media string `json:"media,omitempty"`
	// Media features to emulate.
	Features []*EmulationMediaFeature `json:"features,omitempty"`
}

type EmulationSetEmulatedVisionDeficiencyParams

type EmulationSetEmulatedVisionDeficiencyParams struct {
	// Vision deficiency to emulate. Order: best-effort emulations come first, followed by any physiologically accurate emulations for medically recognized color vision deficiencies.
	TheType string `json:"type"`
}

type EmulationSetFocusEmulationEnabledParams

type EmulationSetFocusEmulationEnabledParams struct {
	// Whether to enable to disable focus emulation.
	Enabled bool `json:"enabled"`
}

type EmulationSetGeolocationOverrideParams

type EmulationSetGeolocationOverrideParams struct {
	// Mock latitude
	Latitude float64 `json:"latitude,omitempty"`
	// Mock longitude
	Longitude float64 `json:"longitude,omitempty"`
	// Mock accuracy
	Accuracy float64 `json:"accuracy,omitempty"`
}

type EmulationSetHardwareConcurrencyOverrideParams added in v2.2.6

type EmulationSetHardwareConcurrencyOverrideParams struct {
	// Hardware concurrency to report
	HardwareConcurrency int `json:"hardwareConcurrency"`
}

type EmulationSetIdleOverrideParams added in v2.0.5

type EmulationSetIdleOverrideParams struct {
	// Mock isUserActive
	IsUserActive bool `json:"isUserActive"`
	// Mock isScreenUnlocked
	IsScreenUnlocked bool `json:"isScreenUnlocked"`
}

type EmulationSetLocaleOverrideParams

type EmulationSetLocaleOverrideParams struct {
	// ICU style C locale (e.g. "en_US"). If not specified or empty, disables the override and restores default host system locale.
	Locale string `json:"locale,omitempty"`
}

type EmulationSetNavigatorOverridesParams

type EmulationSetNavigatorOverridesParams struct {
	// The platform navigator.platform should return.
	Platform string `json:"platform"`
}

type EmulationSetPageScaleFactorParams

type EmulationSetPageScaleFactorParams struct {
	// Page scale factor.
	PageScaleFactor float64 `json:"pageScaleFactor"`
}

type EmulationSetScriptExecutionDisabledParams

type EmulationSetScriptExecutionDisabledParams struct {
	// Whether script execution should be disabled in the page.
	Value bool `json:"value"`
}

type EmulationSetScrollbarsHiddenParams

type EmulationSetScrollbarsHiddenParams struct {
	// Whether scrollbars should be always hidden.
	Hidden bool `json:"hidden"`
}

type EmulationSetTimezoneOverrideParams

type EmulationSetTimezoneOverrideParams struct {
	// The timezone identifier. If empty, disables the override and restores default host system timezone.
	TimezoneId string `json:"timezoneId"`
}

type EmulationSetTouchEmulationEnabledParams

type EmulationSetTouchEmulationEnabledParams struct {
	// Whether the touch event emulation should be enabled.
	Enabled bool `json:"enabled"`
	// Maximum touch points supported. Defaults to one.
	MaxTouchPoints int `json:"maxTouchPoints,omitempty"`
}

type EmulationSetUserAgentOverrideParams

type EmulationSetUserAgentOverrideParams struct {
	// User agent to use.
	UserAgent string `json:"userAgent"`
	// Browser langugage to emulate.
	AcceptLanguage string `json:"acceptLanguage,omitempty"`
	// The platform navigator.platform should return.
	Platform string `json:"platform,omitempty"`
	// To be sent in Sec-CH-UA-* headers and returned in navigator.userAgentData
	UserAgentMetadata *EmulationUserAgentMetadata `json:"userAgentMetadata,omitempty"`
}

type EmulationSetVirtualTimePolicyParams

type EmulationSetVirtualTimePolicyParams struct {
	//  enum values: advance, pause, pauseIfNetworkFetchesPending
	Policy string `json:"policy"`
	// If set, after this many virtual milliseconds have elapsed virtual time will be paused and a virtualTimeBudgetExpired event is sent.
	Budget float64 `json:"budget,omitempty"`
	// If set this specifies the maximum number of tasks that can be run before virtual is forced forwards to prevent deadlock.
	MaxVirtualTimeTaskStarvationCount int `json:"maxVirtualTimeTaskStarvationCount,omitempty"`
	// If set, base::Time::Now will be overridden to initially return this value.
	InitialVirtualTime float64 `json:"initialVirtualTime,omitempty"`
}

type EmulationSetVisibleSizeParams

type EmulationSetVisibleSizeParams struct {
	// Frame width (DIP).
	Width int `json:"width"`
	// Frame height (DIP).
	Height int `json:"height"`
}

type EmulationUserAgentBrandVersion

type EmulationUserAgentBrandVersion struct {
	Brand   string `json:"brand"`   //
	Version string `json:"version"` //
}

Used to specify User Agent Cient Hints to emulate. See https://wicg.github.io/ua-client-hints

type EmulationUserAgentMetadata

type EmulationUserAgentMetadata struct {
	Brands          []*EmulationUserAgentBrandVersion `json:"brands,omitempty"`          // Brands appearing in Sec-CH-UA.
	FullVersionList []*EmulationUserAgentBrandVersion `json:"fullVersionList,omitempty"` // Brands appearing in Sec-CH-UA-Full-Version-List.
	FullVersion     string                            `json:"fullVersion,omitempty"`     //
	Platform        string                            `json:"platform"`                  //
	PlatformVersion string                            `json:"platformVersion"`           //
	Architecture    string                            `json:"architecture"`              //
	Model           string                            `json:"model"`                     //
	Mobile          bool                              `json:"mobile"`                    //
	Bitness         string                            `json:"bitness,omitempty"`         //
	Wow64           bool                              `json:"wow64,omitempty"`           //
}

Used to specify User Agent Cient Hints to emulate. See https://wicg.github.io/ua-client-hints Missing optional values will be filled in by the target with what it would normally use.

type EventBreakpoints added in v2.2.4

type EventBreakpoints struct {
	// contains filtered or unexported fields
}

func NewEventBreakpoints added in v2.2.4

func NewEventBreakpoints(target gcdmessage.ChromeTargeter) *EventBreakpoints

func (*EventBreakpoints) RemoveInstrumentationBreakpoint added in v2.2.4

func (c *EventBreakpoints) RemoveInstrumentationBreakpoint(ctx context.Context, eventName string) (*gcdmessage.ChromeResponse, error)

RemoveInstrumentationBreakpoint - Removes breakpoint on particular native event. eventName - Instrumentation name to stop on.

func (*EventBreakpoints) RemoveInstrumentationBreakpointWithParams added in v2.2.4

RemoveInstrumentationBreakpointWithParams - Removes breakpoint on particular native event.

func (*EventBreakpoints) SetInstrumentationBreakpoint added in v2.2.4

func (c *EventBreakpoints) SetInstrumentationBreakpoint(ctx context.Context, eventName string) (*gcdmessage.ChromeResponse, error)

SetInstrumentationBreakpoint - Sets breakpoint on particular native event. eventName - Instrumentation name to stop on.

func (*EventBreakpoints) SetInstrumentationBreakpointWithParams added in v2.2.4

SetInstrumentationBreakpointWithParams - Sets breakpoint on particular native event.

type EventBreakpointsRemoveInstrumentationBreakpointParams added in v2.2.4

type EventBreakpointsRemoveInstrumentationBreakpointParams struct {
	// Instrumentation name to stop on.
	EventName string `json:"eventName"`
}

type EventBreakpointsSetInstrumentationBreakpointParams added in v2.2.4

type EventBreakpointsSetInstrumentationBreakpointParams struct {
	// Instrumentation name to stop on.
	EventName string `json:"eventName"`
}

type FedCm added in v2.3.0

type FedCm struct {
	// contains filtered or unexported fields
}

func NewFedCm added in v2.3.0

func NewFedCm(target gcdmessage.ChromeTargeter) *FedCm

func (*FedCm) Disable added in v2.3.0

func (c *FedCm) Disable(ctx context.Context) (*gcdmessage.ChromeResponse, error)

func (*FedCm) DismissDialog added in v2.3.0

func (c *FedCm) DismissDialog(ctx context.Context, dialogId string, triggerCooldown bool) (*gcdmessage.ChromeResponse, error)

DismissDialog - dialogId - triggerCooldown -

func (*FedCm) DismissDialogWithParams added in v2.3.0

func (c *FedCm) DismissDialogWithParams(ctx context.Context, v *FedCmDismissDialogParams) (*gcdmessage.ChromeResponse, error)

DismissDialogWithParams -

func (*FedCm) Enable added in v2.3.0

func (c *FedCm) Enable(ctx context.Context, disableRejectionDelay bool) (*gcdmessage.ChromeResponse, error)

Enable - disableRejectionDelay - Allows callers to disable the promise rejection delay that would normally happen, if this is unimportant to what's being tested. (step 4 of https://fedidcg.github.io/FedCM/#browser-api-rp-sign-in)

func (*FedCm) EnableWithParams added in v2.3.0

func (c *FedCm) EnableWithParams(ctx context.Context, v *FedCmEnableParams) (*gcdmessage.ChromeResponse, error)

EnableWithParams -

func (*FedCm) ResetCooldown added in v2.3.1

func (c *FedCm) ResetCooldown(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Resets the cooldown time, if any, to allow the next FedCM call to show a dialog even if one was recently dismissed by the user.

func (*FedCm) SelectAccount added in v2.3.0

func (c *FedCm) SelectAccount(ctx context.Context, dialogId string, accountIndex int) (*gcdmessage.ChromeResponse, error)

SelectAccount - dialogId - accountIndex -

func (*FedCm) SelectAccountWithParams added in v2.3.0

func (c *FedCm) SelectAccountWithParams(ctx context.Context, v *FedCmSelectAccountParams) (*gcdmessage.ChromeResponse, error)

SelectAccountWithParams -

type FedCmAccount added in v2.3.0

type FedCmAccount struct {
	AccountId         string `json:"accountId"`                   //
	Email             string `json:"email"`                       //
	Name              string `json:"name"`                        //
	GivenName         string `json:"givenName"`                   //
	PictureUrl        string `json:"pictureUrl"`                  //
	IdpConfigUrl      string `json:"idpConfigUrl"`                //
	IdpSigninUrl      string `json:"idpSigninUrl"`                //
	LoginState        string `json:"loginState"`                  //  enum values: SignIn, SignUp
	TermsOfServiceUrl string `json:"termsOfServiceUrl,omitempty"` // These two are only set if the loginState is signUp
	PrivacyPolicyUrl  string `json:"privacyPolicyUrl,omitempty"`  //
}

Corresponds to IdentityRequestAccount

type FedCmDialogShownEvent added in v2.3.0

type FedCmDialogShownEvent struct {
	Method string `json:"method"`
	Params struct {
		DialogId string          `json:"dialogId"`           //
		Accounts []*FedCmAccount `json:"accounts"`           //
		Title    string          `json:"title"`              // These exist primarily so that the caller can verify the RP context was used appropriately.
		Subtitle string          `json:"subtitle,omitempty"` //
	} `json:"Params,omitempty"`
}

type FedCmDismissDialogParams added in v2.3.0

type FedCmDismissDialogParams struct {
	//
	DialogId string `json:"dialogId"`
	//
	TriggerCooldown bool `json:"triggerCooldown,omitempty"`
}

type FedCmEnableParams added in v2.3.0

type FedCmEnableParams struct {
	// Allows callers to disable the promise rejection delay that would normally happen, if this is unimportant to what's being tested. (step 4 of https://fedidcg.github.io/FedCM/#browser-api-rp-sign-in)
	DisableRejectionDelay bool `json:"disableRejectionDelay,omitempty"`
}

type FedCmSelectAccountParams added in v2.3.0

type FedCmSelectAccountParams struct {
	//
	DialogId string `json:"dialogId"`
	//
	AccountIndex int `json:"accountIndex"`
}

type Fetch

type Fetch struct {
	// contains filtered or unexported fields
}

func NewFetch

func NewFetch(target gcdmessage.ChromeTargeter) *Fetch

func (*Fetch) ContinueRequest

func (c *Fetch) ContinueRequest(ctx context.Context, requestId string, url string, method string, postData string, headers []*FetchHeaderEntry, interceptResponse bool) (*gcdmessage.ChromeResponse, error)

ContinueRequest - Continues the request, optionally modifying some of its parameters. requestId - An id the client received in requestPaused event. url - If set, the request url will be modified in a way that's not observable by page. method - If set, the request method is overridden. postData - If set, overrides the post data in the request. (Encoded as a base64 string when passed over JSON) headers - If set, overrides the request headers. Note that the overrides do not extend to subsequent redirect hops, if a redirect happens. Another override may be applied to a different request produced by a redirect. interceptResponse - If set, overrides response interception behavior for this request.

func (*Fetch) ContinueRequestWithParams

func (c *Fetch) ContinueRequestWithParams(ctx context.Context, v *FetchContinueRequestParams) (*gcdmessage.ChromeResponse, error)

ContinueRequestWithParams - Continues the request, optionally modifying some of its parameters.

func (*Fetch) ContinueResponse added in v2.2.4

func (c *Fetch) ContinueResponse(ctx context.Context, requestId string, responseCode int, responsePhrase string, responseHeaders []*FetchHeaderEntry, binaryResponseHeaders string) (*gcdmessage.ChromeResponse, error)

ContinueResponse - Continues loading of the paused response, optionally modifying the response headers. If either responseCode or headers are modified, all of them must be present. requestId - An id the client received in requestPaused event. responseCode - An HTTP response code. If absent, original response code will be used. responsePhrase - A textual representation of responseCode. If absent, a standard phrase matching responseCode is used. responseHeaders - Response headers. If absent, original response headers will be used. binaryResponseHeaders - Alternative way of specifying response headers as a \0-separated series of name: value pairs. Prefer the above method unless you need to represent some non-UTF8 values that can't be transmitted over the protocol as text. (Encoded as a base64 string when passed over JSON)

func (*Fetch) ContinueResponseWithParams added in v2.2.4

func (c *Fetch) ContinueResponseWithParams(ctx context.Context, v *FetchContinueResponseParams) (*gcdmessage.ChromeResponse, error)

ContinueResponseWithParams - Continues loading of the paused response, optionally modifying the response headers. If either responseCode or headers are modified, all of them must be present.

func (*Fetch) ContinueWithAuth

func (c *Fetch) ContinueWithAuth(ctx context.Context, requestId string, authChallengeResponse *FetchAuthChallengeResponse) (*gcdmessage.ChromeResponse, error)

ContinueWithAuth - Continues a request supplying authChallengeResponse following authRequired event. requestId - An id the client received in authRequired event. authChallengeResponse - Response to with an authChallenge.

func (*Fetch) ContinueWithAuthWithParams

func (c *Fetch) ContinueWithAuthWithParams(ctx context.Context, v *FetchContinueWithAuthParams) (*gcdmessage.ChromeResponse, error)

ContinueWithAuthWithParams - Continues a request supplying authChallengeResponse following authRequired event.

func (*Fetch) Disable

func (c *Fetch) Disable(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Disables the fetch domain.

func (*Fetch) Enable

func (c *Fetch) Enable(ctx context.Context, patterns []*FetchRequestPattern, handleAuthRequests bool) (*gcdmessage.ChromeResponse, error)

Enable - Enables issuing of requestPaused events. A request will be paused until client calls one of failRequest, fulfillRequest or continueRequest/continueWithAuth. patterns - If specified, only requests matching any of these patterns will produce fetchRequested event and will be paused until clients response. If not set, all requests will be affected. handleAuthRequests - If true, authRequired events will be issued and requests will be paused expecting a call to continueWithAuth.

func (*Fetch) EnableWithParams

func (c *Fetch) EnableWithParams(ctx context.Context, v *FetchEnableParams) (*gcdmessage.ChromeResponse, error)

EnableWithParams - Enables issuing of requestPaused events. A request will be paused until client calls one of failRequest, fulfillRequest or continueRequest/continueWithAuth.

func (*Fetch) FailRequest

func (c *Fetch) FailRequest(ctx context.Context, requestId string, errorReason string) (*gcdmessage.ChromeResponse, error)

FailRequest - Causes the request to fail with specified reason. requestId - An id the client received in requestPaused event. errorReason - Causes the request to fail with the given reason. enum values: Failed, Aborted, TimedOut, AccessDenied, ConnectionClosed, ConnectionReset, ConnectionRefused, ConnectionAborted, ConnectionFailed, NameNotResolved, InternetDisconnected, AddressUnreachable, BlockedByClient, BlockedByResponse

func (*Fetch) FailRequestWithParams

func (c *Fetch) FailRequestWithParams(ctx context.Context, v *FetchFailRequestParams) (*gcdmessage.ChromeResponse, error)

FailRequestWithParams - Causes the request to fail with specified reason.

func (*Fetch) FulfillRequest

func (c *Fetch) FulfillRequest(ctx context.Context, requestId string, responseCode int, responseHeaders []*FetchHeaderEntry, binaryResponseHeaders string, body string, responsePhrase string) (*gcdmessage.ChromeResponse, error)

FulfillRequest - Provides response to the request. requestId - An id the client received in requestPaused event. responseCode - An HTTP response code. responseHeaders - Response headers. binaryResponseHeaders - Alternative way of specifying response headers as a \0-separated series of name: value pairs. Prefer the above method unless you need to represent some non-UTF8 values that can't be transmitted over the protocol as text. (Encoded as a base64 string when passed over JSON) body - A response body. If absent, original response body will be used if the request is intercepted at the response stage and empty body will be used if the request is intercepted at the request stage. (Encoded as a base64 string when passed over JSON) responsePhrase - A textual representation of responseCode. If absent, a standard phrase matching responseCode is used.

func (*Fetch) FulfillRequestWithParams

func (c *Fetch) FulfillRequestWithParams(ctx context.Context, v *FetchFulfillRequestParams) (*gcdmessage.ChromeResponse, error)

FulfillRequestWithParams - Provides response to the request.

func (*Fetch) GetResponseBody

func (c *Fetch) GetResponseBody(ctx context.Context, requestId string) (string, bool, error)

GetResponseBody - Causes the body of the response to be received from the server and returned as a single string. May only be issued for a request that is paused in the Response stage and is mutually exclusive with takeResponseBodyForInterceptionAsStream. Calling other methods that affect the request or disabling fetch domain before body is received results in an undefined behavior. requestId - Identifier for the intercepted request to get body for. Returns - body - Response body. base64Encoded - True, if content was sent as base64.

func (*Fetch) GetResponseBodyWithParams

func (c *Fetch) GetResponseBodyWithParams(ctx context.Context, v *FetchGetResponseBodyParams) (string, bool, error)

GetResponseBodyWithParams - Causes the body of the response to be received from the server and returned as a single string. May only be issued for a request that is paused in the Response stage and is mutually exclusive with takeResponseBodyForInterceptionAsStream. Calling other methods that affect the request or disabling fetch domain before body is received results in an undefined behavior. Returns - body - Response body. base64Encoded - True, if content was sent as base64.

func (*Fetch) TakeResponseBodyAsStream

func (c *Fetch) TakeResponseBodyAsStream(ctx context.Context, requestId string) (string, error)

TakeResponseBodyAsStream - Returns a handle to the stream representing the response body. The request must be paused in the HeadersReceived stage. Note that after this command the request can't be continued as is -- client either needs to cancel it or to provide the response body. The stream only supports sequential read, IO.read will fail if the position is specified. This method is mutually exclusive with getResponseBody. Calling other methods that affect the request or disabling fetch domain before body is received results in an undefined behavior. requestId - Returns - stream -

func (*Fetch) TakeResponseBodyAsStreamWithParams

func (c *Fetch) TakeResponseBodyAsStreamWithParams(ctx context.Context, v *FetchTakeResponseBodyAsStreamParams) (string, error)

TakeResponseBodyAsStreamWithParams - Returns a handle to the stream representing the response body. The request must be paused in the HeadersReceived stage. Note that after this command the request can't be continued as is -- client either needs to cancel it or to provide the response body. The stream only supports sequential read, IO.read will fail if the position is specified. This method is mutually exclusive with getResponseBody. Calling other methods that affect the request or disabling fetch domain before body is received results in an undefined behavior. Returns - stream -

type FetchAuthChallenge

type FetchAuthChallenge struct {
	Source string `json:"source,omitempty"` // Source of the authentication challenge.
	Origin string `json:"origin"`           // Origin of the challenger.
	Scheme string `json:"scheme"`           // The authentication scheme used, such as basic or digest
	Realm  string `json:"realm"`            // The realm of the challenge. May be empty.
}

Authorization challenge for HTTP status code 401 or 407.

type FetchAuthChallengeResponse

type FetchAuthChallengeResponse struct {
	Response string `json:"response"`           // The decision on what to do in response to the authorization challenge.  Default means deferring to the default behavior of the net stack, which will likely either the Cancel authentication or display a popup dialog box.
	Username string `json:"username,omitempty"` // The username to provide, possibly empty. Should only be set if response is ProvideCredentials.
	Password string `json:"password,omitempty"` // The password to provide, possibly empty. Should only be set if response is ProvideCredentials.
}

Response to an AuthChallenge.

type FetchAuthRequiredEvent

type FetchAuthRequiredEvent struct {
	Method string `json:"method"`
	Params struct {
		RequestId     string              `json:"requestId"`     // Each request the page makes will have a unique id.
		Request       *NetworkRequest     `json:"request"`       // The details of the request.
		FrameId       string              `json:"frameId"`       // The id of the frame that initiated the request.
		ResourceType  string              `json:"resourceType"`  // How the requested resource will be used. enum values: Document, Stylesheet, Image, Media, Font, Script, TextTrack, XHR, Fetch, Prefetch, EventSource, WebSocket, Manifest, SignedExchange, Ping, CSPViolationReport, Preflight, Other
		AuthChallenge *FetchAuthChallenge `json:"authChallenge"` // Details of the Authorization Challenge encountered. If this is set, client should respond with continueRequest that contains AuthChallengeResponse.
	} `json:"Params,omitempty"`
}

Issued when the domain is enabled with handleAuthRequests set to true. The request is paused until client responds with continueWithAuth.

type FetchContinueRequestParams

type FetchContinueRequestParams struct {
	// An id the client received in requestPaused event.
	RequestId string `json:"requestId"`
	// If set, the request url will be modified in a way that's not observable by page.
	Url string `json:"url,omitempty"`
	// If set, the request method is overridden.
	Method string `json:"method,omitempty"`
	// If set, overrides the post data in the request. (Encoded as a base64 string when passed over JSON)
	PostData string `json:"postData,omitempty"`
	// If set, overrides the request headers. Note that the overrides do not extend to subsequent redirect hops, if a redirect happens. Another override may be applied to a different request produced by a redirect.
	Headers []*FetchHeaderEntry `json:"headers,omitempty"`
	// If set, overrides response interception behavior for this request.
	InterceptResponse bool `json:"interceptResponse,omitempty"`
}

type FetchContinueResponseParams added in v2.2.4

type FetchContinueResponseParams struct {
	// An id the client received in requestPaused event.
	RequestId string `json:"requestId"`
	// An HTTP response code. If absent, original response code will be used.
	ResponseCode int `json:"responseCode,omitempty"`
	// A textual representation of responseCode. If absent, a standard phrase matching responseCode is used.
	ResponsePhrase string `json:"responsePhrase,omitempty"`
	// Response headers. If absent, original response headers will be used.
	ResponseHeaders []*FetchHeaderEntry `json:"responseHeaders,omitempty"`
	// Alternative way of specifying response headers as a \0-separated series of name: value pairs. Prefer the above method unless you need to represent some non-UTF8 values that can't be transmitted over the protocol as text. (Encoded as a base64 string when passed over JSON)
	BinaryResponseHeaders string `json:"binaryResponseHeaders,omitempty"`
}

type FetchContinueWithAuthParams

type FetchContinueWithAuthParams struct {
	// An id the client received in authRequired event.
	RequestId string `json:"requestId"`
	// Response to  with an authChallenge.
	AuthChallengeResponse *FetchAuthChallengeResponse `json:"authChallengeResponse"`
}

type FetchEnableParams

type FetchEnableParams struct {
	// If specified, only requests matching any of these patterns will produce fetchRequested event and will be paused until clients response. If not set, all requests will be affected.
	Patterns []*FetchRequestPattern `json:"patterns,omitempty"`
	// If true, authRequired events will be issued and requests will be paused expecting a call to continueWithAuth.
	HandleAuthRequests bool `json:"handleAuthRequests,omitempty"`
}

type FetchFailRequestParams

type FetchFailRequestParams struct {
	// An id the client received in requestPaused event.
	RequestId string `json:"requestId"`
	// Causes the request to fail with the given reason. enum values: Failed, Aborted, TimedOut, AccessDenied, ConnectionClosed, ConnectionReset, ConnectionRefused, ConnectionAborted, ConnectionFailed, NameNotResolved, InternetDisconnected, AddressUnreachable, BlockedByClient, BlockedByResponse
	ErrorReason string `json:"errorReason"`
}

type FetchFulfillRequestParams

type FetchFulfillRequestParams struct {
	// An id the client received in requestPaused event.
	RequestId string `json:"requestId"`
	// An HTTP response code.
	ResponseCode int `json:"responseCode"`
	// Response headers.
	ResponseHeaders []*FetchHeaderEntry `json:"responseHeaders,omitempty"`
	// Alternative way of specifying response headers as a \0-separated series of name: value pairs. Prefer the above method unless you need to represent some non-UTF8 values that can't be transmitted over the protocol as text. (Encoded as a base64 string when passed over JSON)
	BinaryResponseHeaders string `json:"binaryResponseHeaders,omitempty"`
	// A response body. If absent, original response body will be used if the request is intercepted at the response stage and empty body will be used if the request is intercepted at the request stage. (Encoded as a base64 string when passed over JSON)
	Body string `json:"body,omitempty"`
	// A textual representation of responseCode. If absent, a standard phrase matching responseCode is used.
	ResponsePhrase string `json:"responsePhrase,omitempty"`
}

type FetchGetResponseBodyParams

type FetchGetResponseBodyParams struct {
	// Identifier for the intercepted request to get body for.
	RequestId string `json:"requestId"`
}

type FetchHeaderEntry

type FetchHeaderEntry struct {
	Name  string `json:"name"`  //
	Value string `json:"value"` //
}

Response HTTP header entry

type FetchRequestPattern

type FetchRequestPattern struct {
	UrlPattern   string `json:"urlPattern,omitempty"`   // Wildcards (`'*'` -> zero or more, `'?'` -> exactly one) are allowed. Escape character is backslash. Omitting is equivalent to `"*"`.
	ResourceType string `json:"resourceType,omitempty"` // If set, only requests for matching resource types will be intercepted. enum values: Document, Stylesheet, Image, Media, Font, Script, TextTrack, XHR, Fetch, Prefetch, EventSource, WebSocket, Manifest, SignedExchange, Ping, CSPViolationReport, Preflight, Other
	RequestStage string `json:"requestStage,omitempty"` // Stage at which to begin intercepting requests. Default is Request. enum values: Request, Response
}

No Description.

type FetchRequestPausedEvent

type FetchRequestPausedEvent struct {
	Method string `json:"method"`
	Params struct {
		RequestId           string              `json:"requestId"`                     // Each request the page makes will have a unique id.
		Request             *NetworkRequest     `json:"request"`                       // The details of the request.
		FrameId             string              `json:"frameId"`                       // The id of the frame that initiated the request.
		ResourceType        string              `json:"resourceType"`                  // How the requested resource will be used. enum values: Document, Stylesheet, Image, Media, Font, Script, TextTrack, XHR, Fetch, Prefetch, EventSource, WebSocket, Manifest, SignedExchange, Ping, CSPViolationReport, Preflight, Other
		ResponseErrorReason string              `json:"responseErrorReason,omitempty"` // Response error if intercepted at response stage. enum values: Failed, Aborted, TimedOut, AccessDenied, ConnectionClosed, ConnectionReset, ConnectionRefused, ConnectionAborted, ConnectionFailed, NameNotResolved, InternetDisconnected, AddressUnreachable, BlockedByClient, BlockedByResponse
		ResponseStatusCode  int                 `json:"responseStatusCode,omitempty"`  // Response code if intercepted at response stage.
		ResponseStatusText  string              `json:"responseStatusText,omitempty"`  // Response status text if intercepted at response stage.
		ResponseHeaders     []*FetchHeaderEntry `json:"responseHeaders,omitempty"`     // Response headers if intercepted at the response stage.
		NetworkId           string              `json:"networkId,omitempty"`           // If the intercepted request had a corresponding Network.requestWillBeSent event fired for it, then this networkId will be the same as the requestId present in the requestWillBeSent event.
		RedirectedRequestId string              `json:"redirectedRequestId,omitempty"` // If the request is due to a redirect response from the server, the id of the request that has caused the redirect.
	} `json:"Params,omitempty"`
}

Issued when the domain is enabled and the request URL matches the specified filter. The request is paused until the client responds with one of continueRequest, failRequest or fulfillRequest. The stage of the request can be determined by presence of responseErrorReason and responseStatusCode -- the request is at the response stage if either of these fields is present and in the request stage otherwise.

type FetchTakeResponseBodyAsStreamParams

type FetchTakeResponseBodyAsStreamParams struct {
	//
	RequestId string `json:"requestId"`
}

type HeadlessExperimental

type HeadlessExperimental struct {
	// contains filtered or unexported fields
}

func NewHeadlessExperimental

func NewHeadlessExperimental(target gcdmessage.ChromeTargeter) *HeadlessExperimental

func (*HeadlessExperimental) BeginFrame

func (c *HeadlessExperimental) BeginFrame(ctx context.Context, frameTimeTicks float64, interval float64, noDisplayUpdates bool, screenshot *HeadlessExperimentalScreenshotParams) (bool, string, error)

BeginFrame - Sends a BeginFrame to the target and returns when the frame was completed. Optionally captures a screenshot from the resulting frame. Requires that the target was created with enabled BeginFrameControl. Designed for use with --run-all-compositor-stages-before-draw, see also https://goo.gle/chrome-headless-rendering for more background. frameTimeTicks - Timestamp of this BeginFrame in Renderer TimeTicks (milliseconds of uptime). If not set, the current time will be used. interval - The interval between BeginFrames that is reported to the compositor, in milliseconds. Defaults to a 60 frames/second interval, i.e. about 16.666 milliseconds. noDisplayUpdates - Whether updates should not be committed and drawn onto the display. False by default. If true, only side effects of the BeginFrame will be run, such as layout and animations, but any visual updates may not be visible on the display or in screenshots. screenshot - If set, a screenshot of the frame will be captured and returned in the response. Otherwise, no screenshot will be captured. Note that capturing a screenshot can fail, for example, during renderer initialization. In such a case, no screenshot data will be returned. Returns - hasDamage - Whether the BeginFrame resulted in damage and, thus, a new frame was committed to the display. Reported for diagnostic uses, may be removed in the future. screenshotData - Base64-encoded image data of the screenshot, if one was requested and successfully taken. (Encoded as a base64 string when passed over JSON)

func (*HeadlessExperimental) BeginFrameWithParams

BeginFrameWithParams - Sends a BeginFrame to the target and returns when the frame was completed. Optionally captures a screenshot from the resulting frame. Requires that the target was created with enabled BeginFrameControl. Designed for use with --run-all-compositor-stages-before-draw, see also https://goo.gle/chrome-headless-rendering for more background. Returns - hasDamage - Whether the BeginFrame resulted in damage and, thus, a new frame was committed to the display. Reported for diagnostic uses, may be removed in the future. screenshotData - Base64-encoded image data of the screenshot, if one was requested and successfully taken. (Encoded as a base64 string when passed over JSON)

func (*HeadlessExperimental) Disable

Disables headless events for the target.

func (*HeadlessExperimental) Enable

Enables headless events for the target.

type HeadlessExperimentalBeginFrameParams

type HeadlessExperimentalBeginFrameParams struct {
	// Timestamp of this BeginFrame in Renderer TimeTicks (milliseconds of uptime). If not set, the current time will be used.
	FrameTimeTicks float64 `json:"frameTimeTicks,omitempty"`
	// The interval between BeginFrames that is reported to the compositor, in milliseconds. Defaults to a 60 frames/second interval, i.e. about 16.666 milliseconds.
	Interval float64 `json:"interval,omitempty"`
	// Whether updates should not be committed and drawn onto the display. False by default. If true, only side effects of the BeginFrame will be run, such as layout and animations, but any visual updates may not be visible on the display or in screenshots.
	NoDisplayUpdates bool `json:"noDisplayUpdates,omitempty"`
	// If set, a screenshot of the frame will be captured and returned in the response. Otherwise, no screenshot will be captured. Note that capturing a screenshot can fail, for example, during renderer initialization. In such a case, no screenshot data will be returned.
	Screenshot *HeadlessExperimentalScreenshotParams `json:"screenshot,omitempty"`
}

type HeadlessExperimentalScreenshotParams

type HeadlessExperimentalScreenshotParams struct {
	Format           string `json:"format,omitempty"`           // Image compression format (defaults to png).
	Quality          int    `json:"quality,omitempty"`          // Compression quality from range [0..100] (jpeg only).
	OptimizeForSpeed bool   `json:"optimizeForSpeed,omitempty"` // Optimize image encoding for speed, not for resulting size (defaults to false)
}

Encoding options for a screenshot.

type HeapProfiler

type HeapProfiler struct {
	// contains filtered or unexported fields
}

func NewHeapProfiler

func NewHeapProfiler(target gcdmessage.ChromeTargeter) *HeapProfiler

func (*HeapProfiler) AddInspectedHeapObject

func (c *HeapProfiler) AddInspectedHeapObject(ctx context.Context, heapObjectId string) (*gcdmessage.ChromeResponse, error)

AddInspectedHeapObject - Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions). heapObjectId - Heap snapshot object id to be accessible by means of $x command line API.

func (*HeapProfiler) AddInspectedHeapObjectWithParams

func (c *HeapProfiler) AddInspectedHeapObjectWithParams(ctx context.Context, v *HeapProfilerAddInspectedHeapObjectParams) (*gcdmessage.ChromeResponse, error)

AddInspectedHeapObjectWithParams - Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).

func (*HeapProfiler) CollectGarbage

func (c *HeapProfiler) CollectGarbage(ctx context.Context) (*gcdmessage.ChromeResponse, error)

func (*HeapProfiler) Disable

func (*HeapProfiler) Enable

func (*HeapProfiler) GetHeapObjectId

func (c *HeapProfiler) GetHeapObjectId(ctx context.Context, objectId string) (string, error)

GetHeapObjectId - objectId - Identifier of the object to get heap object id for. Returns - heapSnapshotObjectId - Id of the heap snapshot object corresponding to the passed remote object id.

func (*HeapProfiler) GetHeapObjectIdWithParams

func (c *HeapProfiler) GetHeapObjectIdWithParams(ctx context.Context, v *HeapProfilerGetHeapObjectIdParams) (string, error)

GetHeapObjectIdWithParams - Returns - heapSnapshotObjectId - Id of the heap snapshot object corresponding to the passed remote object id.

func (*HeapProfiler) GetObjectByHeapObjectId

func (c *HeapProfiler) GetObjectByHeapObjectId(ctx context.Context, objectId string, objectGroup string) (*RuntimeRemoteObject, error)

GetObjectByHeapObjectId - objectId - objectGroup - Symbolic group name that can be used to release multiple objects. Returns - result - Evaluation result.

func (*HeapProfiler) GetObjectByHeapObjectIdWithParams

func (c *HeapProfiler) GetObjectByHeapObjectIdWithParams(ctx context.Context, v *HeapProfilerGetObjectByHeapObjectIdParams) (*RuntimeRemoteObject, error)

GetObjectByHeapObjectIdWithParams - Returns - result - Evaluation result.

func (*HeapProfiler) GetSamplingProfile

func (c *HeapProfiler) GetSamplingProfile(ctx context.Context) (*HeapProfilerSamplingHeapProfile, error)

GetSamplingProfile - Returns - profile - Return the sampling profile being collected.

func (*HeapProfiler) StartSampling

func (c *HeapProfiler) StartSampling(ctx context.Context, samplingInterval float64, includeObjectsCollectedByMajorGC bool, includeObjectsCollectedByMinorGC bool) (*gcdmessage.ChromeResponse, error)

StartSampling - samplingInterval - Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes. includeObjectsCollectedByMajorGC - By default, the sampling heap profiler reports only objects which are still alive when the profile is returned via getSamplingProfile or stopSampling, which is useful for determining what functions contribute the most to steady-state memory usage. This flag instructs the sampling heap profiler to also include information about objects discarded by major GC, which will show which functions cause large temporary memory usage or long GC pauses. includeObjectsCollectedByMinorGC - By default, the sampling heap profiler reports only objects which are still alive when the profile is returned via getSamplingProfile or stopSampling, which is useful for determining what functions contribute the most to steady-state memory usage. This flag instructs the sampling heap profiler to also include information about objects discarded by minor GC, which is useful when tuning a latency-sensitive application for minimal GC activity.

func (*HeapProfiler) StartSamplingWithParams

StartSamplingWithParams -

func (*HeapProfiler) StartTrackingHeapObjects

func (c *HeapProfiler) StartTrackingHeapObjects(ctx context.Context, trackAllocations bool) (*gcdmessage.ChromeResponse, error)

StartTrackingHeapObjects - trackAllocations -

func (*HeapProfiler) StartTrackingHeapObjectsWithParams

func (c *HeapProfiler) StartTrackingHeapObjectsWithParams(ctx context.Context, v *HeapProfilerStartTrackingHeapObjectsParams) (*gcdmessage.ChromeResponse, error)

StartTrackingHeapObjectsWithParams -

func (*HeapProfiler) StopSampling

StopSampling - Returns - profile - Recorded sampling heap profile.

func (*HeapProfiler) StopTrackingHeapObjects

func (c *HeapProfiler) StopTrackingHeapObjects(ctx context.Context, reportProgress bool, treatGlobalObjectsAsRoots bool, captureNumericValue bool, exposeInternals bool) (*gcdmessage.ChromeResponse, error)

StopTrackingHeapObjects - reportProgress - If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped. treatGlobalObjectsAsRoots - Deprecated in favor of `exposeInternals`. captureNumericValue - If true, numerical values are included in the snapshot exposeInternals - If true, exposes internals of the snapshot.

func (*HeapProfiler) StopTrackingHeapObjectsWithParams

func (c *HeapProfiler) StopTrackingHeapObjectsWithParams(ctx context.Context, v *HeapProfilerStopTrackingHeapObjectsParams) (*gcdmessage.ChromeResponse, error)

StopTrackingHeapObjectsWithParams -

func (*HeapProfiler) TakeHeapSnapshot

func (c *HeapProfiler) TakeHeapSnapshot(ctx context.Context, reportProgress bool, treatGlobalObjectsAsRoots bool, captureNumericValue bool, exposeInternals bool) (*gcdmessage.ChromeResponse, error)

TakeHeapSnapshot - reportProgress - If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken. treatGlobalObjectsAsRoots - If true, a raw snapshot without artificial roots will be generated. Deprecated in favor of `exposeInternals`. captureNumericValue - If true, numerical values are included in the snapshot exposeInternals - If true, exposes internals of the snapshot.

func (*HeapProfiler) TakeHeapSnapshotWithParams

TakeHeapSnapshotWithParams -

type HeapProfilerAddHeapSnapshotChunkEvent

type HeapProfilerAddHeapSnapshotChunkEvent struct {
	Method string `json:"method"`
	Params struct {
		Chunk string `json:"chunk"` //
	} `json:"Params,omitempty"`
}

type HeapProfilerAddInspectedHeapObjectParams

type HeapProfilerAddInspectedHeapObjectParams struct {
	// Heap snapshot object id to be accessible by means of $x command line API.
	HeapObjectId string `json:"heapObjectId"`
}

type HeapProfilerGetHeapObjectIdParams

type HeapProfilerGetHeapObjectIdParams struct {
	// Identifier of the object to get heap object id for.
	ObjectId string `json:"objectId"`
}

type HeapProfilerGetObjectByHeapObjectIdParams

type HeapProfilerGetObjectByHeapObjectIdParams struct {
	//
	ObjectId string `json:"objectId"`
	// Symbolic group name that can be used to release multiple objects.
	ObjectGroup string `json:"objectGroup,omitempty"`
}

type HeapProfilerHeapStatsUpdateEvent

type HeapProfilerHeapStatsUpdateEvent struct {
	Method string `json:"method"`
	Params struct {
		StatsUpdate []int `json:"statsUpdate"` // An array of triplets. Each triplet describes a fragment. The first integer is the fragment index, the second integer is a total count of objects for the fragment, the third integer is a total size of the objects for the fragment.
	} `json:"Params,omitempty"`
}

If heap objects tracking has been started then backend may send update for one or more fragments

type HeapProfilerLastSeenObjectIdEvent

type HeapProfilerLastSeenObjectIdEvent struct {
	Method string `json:"method"`
	Params struct {
		LastSeenObjectId int     `json:"lastSeenObjectId"` //
		Timestamp        float64 `json:"timestamp"`        //
	} `json:"Params,omitempty"`
}

If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.

type HeapProfilerReportHeapSnapshotProgressEvent

type HeapProfilerReportHeapSnapshotProgressEvent struct {
	Method string `json:"method"`
	Params struct {
		Done     int  `json:"done"`               //
		Total    int  `json:"total"`              //
		Finished bool `json:"finished,omitempty"` //
	} `json:"Params,omitempty"`
}

type HeapProfilerSamplingHeapProfile

type HeapProfilerSamplingHeapProfile struct {
	Head    *HeapProfilerSamplingHeapProfileNode     `json:"head"`    //
	Samples []*HeapProfilerSamplingHeapProfileSample `json:"samples"` //
}

Sampling profile.

type HeapProfilerSamplingHeapProfileNode

type HeapProfilerSamplingHeapProfileNode struct {
	CallFrame *RuntimeCallFrame                      `json:"callFrame"` // Function location.
	SelfSize  float64                                `json:"selfSize"`  // Allocations size in bytes for the node excluding children.
	Id        int                                    `json:"id"`        // Node id. Ids are unique across all profiles collected between startSampling and stopSampling.
	Children  []*HeapProfilerSamplingHeapProfileNode `json:"children"`  // Child nodes.
}

Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.

type HeapProfilerSamplingHeapProfileSample

type HeapProfilerSamplingHeapProfileSample struct {
	Size    float64 `json:"size"`    // Allocation size in bytes attributed to the sample.
	NodeId  int     `json:"nodeId"`  // Id of the corresponding profile tree node.
	Ordinal float64 `json:"ordinal"` // Time-ordered sample ordinal number. It is unique across all profiles retrieved between startSampling and stopSampling.
}

A single sample from a sampling profile.

type HeapProfilerStartSamplingParams

type HeapProfilerStartSamplingParams struct {
	// Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes.
	SamplingInterval float64 `json:"samplingInterval,omitempty"`
	// By default, the sampling heap profiler reports only objects which are still alive when the profile is returned via getSamplingProfile or stopSampling, which is useful for determining what functions contribute the most to steady-state memory usage. This flag instructs the sampling heap profiler to also include information about objects discarded by major GC, which will show which functions cause large temporary memory usage or long GC pauses.
	IncludeObjectsCollectedByMajorGC bool `json:"includeObjectsCollectedByMajorGC,omitempty"`
	// By default, the sampling heap profiler reports only objects which are still alive when the profile is returned via getSamplingProfile or stopSampling, which is useful for determining what functions contribute the most to steady-state memory usage. This flag instructs the sampling heap profiler to also include information about objects discarded by minor GC, which is useful when tuning a latency-sensitive application for minimal GC activity.
	IncludeObjectsCollectedByMinorGC bool `json:"includeObjectsCollectedByMinorGC,omitempty"`
}

type HeapProfilerStartTrackingHeapObjectsParams

type HeapProfilerStartTrackingHeapObjectsParams struct {
	//
	TrackAllocations bool `json:"trackAllocations,omitempty"`
}

type HeapProfilerStopTrackingHeapObjectsParams

type HeapProfilerStopTrackingHeapObjectsParams struct {
	// If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped.
	ReportProgress bool `json:"reportProgress,omitempty"`
	// Deprecated in favor of `exposeInternals`.
	TreatGlobalObjectsAsRoots bool `json:"treatGlobalObjectsAsRoots,omitempty"`
	// If true, numerical values are included in the snapshot
	CaptureNumericValue bool `json:"captureNumericValue,omitempty"`
	// If true, exposes internals of the snapshot.
	ExposeInternals bool `json:"exposeInternals,omitempty"`
}

type HeapProfilerTakeHeapSnapshotParams

type HeapProfilerTakeHeapSnapshotParams struct {
	// If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken.
	ReportProgress bool `json:"reportProgress,omitempty"`
	// If true, a raw snapshot without artificial roots will be generated. Deprecated in favor of `exposeInternals`.
	TreatGlobalObjectsAsRoots bool `json:"treatGlobalObjectsAsRoots,omitempty"`
	// If true, numerical values are included in the snapshot
	CaptureNumericValue bool `json:"captureNumericValue,omitempty"`
	// If true, exposes internals of the snapshot.
	ExposeInternals bool `json:"exposeInternals,omitempty"`
}

type IO

type IO struct {
	// contains filtered or unexported fields
}

func NewIO

func NewIO(target gcdmessage.ChromeTargeter) *IO

func (*IO) Close

func (c *IO) Close(ctx context.Context, handle string) (*gcdmessage.ChromeResponse, error)

Close - Close the stream, discard any temporary backing storage. handle - Handle of the stream to close.

func (*IO) CloseWithParams

func (c *IO) CloseWithParams(ctx context.Context, v *IOCloseParams) (*gcdmessage.ChromeResponse, error)

CloseWithParams - Close the stream, discard any temporary backing storage.

func (*IO) Read

func (c *IO) Read(ctx context.Context, handle string, offset int, size int) (bool, string, bool, error)

Read - Read a chunk of the stream handle - Handle of the stream to read. offset - Seek to the specified offset before reading (if not specificed, proceed with offset following the last read). Some types of streams may only support sequential reads. size - Maximum number of bytes to read (left upon the agent discretion if not specified). Returns - base64Encoded - Set if the data is base64-encoded data - Data that were read. eof - Set if the end-of-file condition occurred while reading.

func (*IO) ReadWithParams

func (c *IO) ReadWithParams(ctx context.Context, v *IOReadParams) (bool, string, bool, error)

ReadWithParams - Read a chunk of the stream Returns - base64Encoded - Set if the data is base64-encoded data - Data that were read. eof - Set if the end-of-file condition occurred while reading.

func (*IO) ResolveBlob

func (c *IO) ResolveBlob(ctx context.Context, objectId string) (string, error)

ResolveBlob - Return UUID of Blob object specified by a remote object id. objectId - Object id of a Blob object wrapper. Returns - uuid - UUID of the specified Blob.

func (*IO) ResolveBlobWithParams

func (c *IO) ResolveBlobWithParams(ctx context.Context, v *IOResolveBlobParams) (string, error)

ResolveBlobWithParams - Return UUID of Blob object specified by a remote object id. Returns - uuid - UUID of the specified Blob.

type IOCloseParams

type IOCloseParams struct {
	// Handle of the stream to close.
	Handle string `json:"handle"`
}

type IOReadParams

type IOReadParams struct {
	// Handle of the stream to read.
	Handle string `json:"handle"`
	// Seek to the specified offset before reading (if not specificed, proceed with offset following the last read). Some types of streams may only support sequential reads.
	Offset int `json:"offset,omitempty"`
	// Maximum number of bytes to read (left upon the agent discretion if not specified).
	Size int `json:"size,omitempty"`
}

type IOResolveBlobParams

type IOResolveBlobParams struct {
	// Object id of a Blob object wrapper.
	ObjectId string `json:"objectId"`
}

type IndexedDB

type IndexedDB struct {
	// contains filtered or unexported fields
}

func NewIndexedDB

func NewIndexedDB(target gcdmessage.ChromeTargeter) *IndexedDB

func (*IndexedDB) ClearObjectStore

func (c *IndexedDB) ClearObjectStore(ctx context.Context, securityOrigin string, storageKey string, storageBucket *StorageStorageBucket, databaseName string, objectStoreName string) (*gcdmessage.ChromeResponse, error)

ClearObjectStore - Clears all entries from an object store. securityOrigin - At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin. storageKey - Storage key. storageBucket - Storage bucket. If not specified, it uses the default bucket. databaseName - Database name. objectStoreName - Object store name.

func (*IndexedDB) ClearObjectStoreWithParams

func (c *IndexedDB) ClearObjectStoreWithParams(ctx context.Context, v *IndexedDBClearObjectStoreParams) (*gcdmessage.ChromeResponse, error)

ClearObjectStoreWithParams - Clears all entries from an object store.

func (*IndexedDB) DeleteDatabase

func (c *IndexedDB) DeleteDatabase(ctx context.Context, securityOrigin string, storageKey string, storageBucket *StorageStorageBucket, databaseName string) (*gcdmessage.ChromeResponse, error)

DeleteDatabase - Deletes a database. securityOrigin - At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin. storageKey - Storage key. storageBucket - Storage bucket. If not specified, it uses the default bucket. databaseName - Database name.

func (*IndexedDB) DeleteDatabaseWithParams

func (c *IndexedDB) DeleteDatabaseWithParams(ctx context.Context, v *IndexedDBDeleteDatabaseParams) (*gcdmessage.ChromeResponse, error)

DeleteDatabaseWithParams - Deletes a database.

func (*IndexedDB) DeleteObjectStoreEntries

func (c *IndexedDB) DeleteObjectStoreEntries(ctx context.Context, securityOrigin string, storageKey string, storageBucket *StorageStorageBucket, databaseName string, objectStoreName string, keyRange *IndexedDBKeyRange) (*gcdmessage.ChromeResponse, error)

DeleteObjectStoreEntries - Delete a range of entries from an object store securityOrigin - At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin. storageKey - Storage key. storageBucket - Storage bucket. If not specified, it uses the default bucket. databaseName - objectStoreName - keyRange - Range of entry keys to delete

func (*IndexedDB) DeleteObjectStoreEntriesWithParams

func (c *IndexedDB) DeleteObjectStoreEntriesWithParams(ctx context.Context, v *IndexedDBDeleteObjectStoreEntriesParams) (*gcdmessage.ChromeResponse, error)

DeleteObjectStoreEntriesWithParams - Delete a range of entries from an object store

func (*IndexedDB) Disable

Disables events from backend.

func (*IndexedDB) Enable

Enables events from backend.

func (*IndexedDB) GetMetadata

func (c *IndexedDB) GetMetadata(ctx context.Context, securityOrigin string, storageKey string, storageBucket *StorageStorageBucket, databaseName string, objectStoreName string) (float64, float64, error)

GetMetadata - Gets metadata of an object store. securityOrigin - At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin. storageKey - Storage key. storageBucket - Storage bucket. If not specified, it uses the default bucket. databaseName - Database name. objectStoreName - Object store name. Returns - entriesCount - the entries count keyGeneratorValue - the current value of key generator, to become the next inserted key into the object store. Valid if objectStore.autoIncrement is true.

func (*IndexedDB) GetMetadataWithParams

func (c *IndexedDB) GetMetadataWithParams(ctx context.Context, v *IndexedDBGetMetadataParams) (float64, float64, error)

GetMetadataWithParams - Gets metadata of an object store. Returns - entriesCount - the entries count keyGeneratorValue - the current value of key generator, to become the next inserted key into the object store. Valid if objectStore.autoIncrement is true.

func (*IndexedDB) RequestData

func (c *IndexedDB) RequestData(ctx context.Context, securityOrigin string, storageKey string, storageBucket *StorageStorageBucket, databaseName string, objectStoreName string, indexName string, skipCount int, pageSize int, keyRange *IndexedDBKeyRange) ([]*IndexedDBDataEntry, bool, error)

RequestData - Requests data from object store or index. securityOrigin - At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin. storageKey - Storage key. storageBucket - Storage bucket. If not specified, it uses the default bucket. databaseName - Database name. objectStoreName - Object store name. indexName - Index name, empty string for object store data requests. skipCount - Number of records to skip. pageSize - Number of records to fetch. keyRange - Key range. Returns - objectStoreDataEntries - Array of object store data entries. hasMore - If true, there are more entries to fetch in the given range.

func (*IndexedDB) RequestDataWithParams

func (c *IndexedDB) RequestDataWithParams(ctx context.Context, v *IndexedDBRequestDataParams) ([]*IndexedDBDataEntry, bool, error)

RequestDataWithParams - Requests data from object store or index. Returns - objectStoreDataEntries - Array of object store data entries. hasMore - If true, there are more entries to fetch in the given range.

func (*IndexedDB) RequestDatabase

func (c *IndexedDB) RequestDatabase(ctx context.Context, securityOrigin string, storageKey string, storageBucket *StorageStorageBucket, databaseName string) (*IndexedDBDatabaseWithObjectStores, error)

RequestDatabase - Requests database with given name in given frame. securityOrigin - At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin. storageKey - Storage key. storageBucket - Storage bucket. If not specified, it uses the default bucket. databaseName - Database name. Returns - databaseWithObjectStores - Database with an array of object stores.

func (*IndexedDB) RequestDatabaseNames

func (c *IndexedDB) RequestDatabaseNames(ctx context.Context, securityOrigin string, storageKey string, storageBucket *StorageStorageBucket) ([]string, error)

RequestDatabaseNames - Requests database names for given security origin. securityOrigin - At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin. storageKey - Storage key. storageBucket - Storage bucket. If not specified, it uses the default bucket. Returns - databaseNames - Database names for origin.

func (*IndexedDB) RequestDatabaseNamesWithParams

func (c *IndexedDB) RequestDatabaseNamesWithParams(ctx context.Context, v *IndexedDBRequestDatabaseNamesParams) ([]string, error)

RequestDatabaseNamesWithParams - Requests database names for given security origin. Returns - databaseNames - Database names for origin.

func (*IndexedDB) RequestDatabaseWithParams

RequestDatabaseWithParams - Requests database with given name in given frame. Returns - databaseWithObjectStores - Database with an array of object stores.

type IndexedDBClearObjectStoreParams

type IndexedDBClearObjectStoreParams struct {
	// At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.
	SecurityOrigin string `json:"securityOrigin,omitempty"`
	// Storage key.
	StorageKey string `json:"storageKey,omitempty"`
	// Storage bucket. If not specified, it uses the default bucket.
	StorageBucket *StorageStorageBucket `json:"storageBucket,omitempty"`
	// Database name.
	DatabaseName string `json:"databaseName"`
	// Object store name.
	ObjectStoreName string `json:"objectStoreName"`
}

type IndexedDBDataEntry

type IndexedDBDataEntry struct {
	Key        *RuntimeRemoteObject `json:"key"`        // Key object.
	PrimaryKey *RuntimeRemoteObject `json:"primaryKey"` // Primary key object.
	Value      *RuntimeRemoteObject `json:"value"`      // Value object.
}

Data entry.

type IndexedDBDatabaseWithObjectStores

type IndexedDBDatabaseWithObjectStores struct {
	Name         string                  `json:"name"`         // Database name.
	Version      float64                 `json:"version"`      // Database version (type is not 'integer', as the standard requires the version number to be 'unsigned long long')
	ObjectStores []*IndexedDBObjectStore `json:"objectStores"` // Object stores in this database.
}

Database with an array of object stores.

type IndexedDBDeleteDatabaseParams

type IndexedDBDeleteDatabaseParams struct {
	// At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.
	SecurityOrigin string `json:"securityOrigin,omitempty"`
	// Storage key.
	StorageKey string `json:"storageKey,omitempty"`
	// Storage bucket. If not specified, it uses the default bucket.
	StorageBucket *StorageStorageBucket `json:"storageBucket,omitempty"`
	// Database name.
	DatabaseName string `json:"databaseName"`
}

type IndexedDBDeleteObjectStoreEntriesParams

type IndexedDBDeleteObjectStoreEntriesParams struct {
	// At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.
	SecurityOrigin string `json:"securityOrigin,omitempty"`
	// Storage key.
	StorageKey string `json:"storageKey,omitempty"`
	// Storage bucket. If not specified, it uses the default bucket.
	StorageBucket *StorageStorageBucket `json:"storageBucket,omitempty"`
	//
	DatabaseName string `json:"databaseName"`
	//
	ObjectStoreName string `json:"objectStoreName"`
	// Range of entry keys to delete
	KeyRange *IndexedDBKeyRange `json:"keyRange"`
}

type IndexedDBGetMetadataParams

type IndexedDBGetMetadataParams struct {
	// At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.
	SecurityOrigin string `json:"securityOrigin,omitempty"`
	// Storage key.
	StorageKey string `json:"storageKey,omitempty"`
	// Storage bucket. If not specified, it uses the default bucket.
	StorageBucket *StorageStorageBucket `json:"storageBucket,omitempty"`
	// Database name.
	DatabaseName string `json:"databaseName"`
	// Object store name.
	ObjectStoreName string `json:"objectStoreName"`
}

type IndexedDBKey

type IndexedDBKey struct {
	Type   string          `json:"type"`             // Key type.
	Number float64         `json:"number,omitempty"` // Number value.
	String string          `json:"string,omitempty"` // String value.
	Date   float64         `json:"date,omitempty"`   // Date value.
	Array  []*IndexedDBKey `json:"array,omitempty"`  // Array value.
}

Key.

type IndexedDBKeyPath

type IndexedDBKeyPath struct {
	Type   string   `json:"type"`             // Key path type.
	String string   `json:"string,omitempty"` // String value.
	Array  []string `json:"array,omitempty"`  // Array value.
}

Key path.

type IndexedDBKeyRange

type IndexedDBKeyRange struct {
	Lower     *IndexedDBKey `json:"lower,omitempty"` // Lower bound.
	Upper     *IndexedDBKey `json:"upper,omitempty"` // Upper bound.
	LowerOpen bool          `json:"lowerOpen"`       // If true lower bound is open.
	UpperOpen bool          `json:"upperOpen"`       // If true upper bound is open.
}

Key range.

type IndexedDBObjectStore

type IndexedDBObjectStore struct {
	Name          string                       `json:"name"`          // Object store name.
	KeyPath       *IndexedDBKeyPath            `json:"keyPath"`       // Object store key path.
	AutoIncrement bool                         `json:"autoIncrement"` // If true, object store has auto increment flag set.
	Indexes       []*IndexedDBObjectStoreIndex `json:"indexes"`       // Indexes in this object store.
}

Object store.

type IndexedDBObjectStoreIndex

type IndexedDBObjectStoreIndex struct {
	Name       string            `json:"name"`       // Index name.
	KeyPath    *IndexedDBKeyPath `json:"keyPath"`    // Index key path.
	Unique     bool              `json:"unique"`     // If true, index is unique.
	MultiEntry bool              `json:"multiEntry"` // If true, index allows multiple entries for a key.
}

Object store index.

type IndexedDBRequestDataParams

type IndexedDBRequestDataParams struct {
	// At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.
	SecurityOrigin string `json:"securityOrigin,omitempty"`
	// Storage key.
	StorageKey string `json:"storageKey,omitempty"`
	// Storage bucket. If not specified, it uses the default bucket.
	StorageBucket *StorageStorageBucket `json:"storageBucket,omitempty"`
	// Database name.
	DatabaseName string `json:"databaseName"`
	// Object store name.
	ObjectStoreName string `json:"objectStoreName"`
	// Index name, empty string for object store data requests.
	IndexName string `json:"indexName"`
	// Number of records to skip.
	SkipCount int `json:"skipCount"`
	// Number of records to fetch.
	PageSize int `json:"pageSize"`
	// Key range.
	KeyRange *IndexedDBKeyRange `json:"keyRange,omitempty"`
}

type IndexedDBRequestDatabaseNamesParams

type IndexedDBRequestDatabaseNamesParams struct {
	// At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.
	SecurityOrigin string `json:"securityOrigin,omitempty"`
	// Storage key.
	StorageKey string `json:"storageKey,omitempty"`
	// Storage bucket. If not specified, it uses the default bucket.
	StorageBucket *StorageStorageBucket `json:"storageBucket,omitempty"`
}

type IndexedDBRequestDatabaseParams

type IndexedDBRequestDatabaseParams struct {
	// At least and at most one of securityOrigin, storageKey, or storageBucket must be specified. Security origin.
	SecurityOrigin string `json:"securityOrigin,omitempty"`
	// Storage key.
	StorageKey string `json:"storageKey,omitempty"`
	// Storage bucket. If not specified, it uses the default bucket.
	StorageBucket *StorageStorageBucket `json:"storageBucket,omitempty"`
	// Database name.
	DatabaseName string `json:"databaseName"`
}

type Input

type Input struct {
	// contains filtered or unexported fields
}

func NewInput

func NewInput(target gcdmessage.ChromeTargeter) *Input

func (*Input) DispatchDragEvent added in v2.1.1

func (c *Input) DispatchDragEvent(ctx context.Context, theType string, x float64, y float64, data *InputDragData, modifiers int) (*gcdmessage.ChromeResponse, error)

DispatchDragEvent - Dispatches a drag event into the page. type - Type of the drag event. x - X coordinate of the event relative to the main frame's viewport in CSS pixels. y - Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport. data - modifiers - Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).

func (*Input) DispatchDragEventWithParams added in v2.1.1

func (c *Input) DispatchDragEventWithParams(ctx context.Context, v *InputDispatchDragEventParams) (*gcdmessage.ChromeResponse, error)

DispatchDragEventWithParams - Dispatches a drag event into the page.

func (*Input) DispatchKeyEvent

func (c *Input) DispatchKeyEvent(ctx context.Context, theType string, modifiers int, timestamp float64, text string, unmodifiedText string, keyIdentifier string, code string, key string, windowsVirtualKeyCode int, nativeVirtualKeyCode int, autoRepeat bool, isKeypad bool, isSystemKey bool, location int, commands []string) (*gcdmessage.ChromeResponse, error)

DispatchKeyEvent - Dispatches a key event to the page. type - Type of the key event. modifiers - Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0). timestamp - Time at which the event occurred. text - Text as generated by processing a virtual key code with a keyboard layout. Not needed for for `keyUp` and `rawKeyDown` events (default: "") unmodifiedText - Text that would have been generated by the keyboard if no modifiers were pressed (except for shift). Useful for shortcut (accelerator) key handling (default: ""). keyIdentifier - Unique key identifier (e.g., 'U+0041') (default: ""). code - Unique DOM defined string value for each physical key (e.g., 'KeyA') (default: ""). key - Unique DOM defined string value describing the meaning of the key in the context of active modifiers, keyboard layout, etc (e.g., 'AltGr') (default: ""). windowsVirtualKeyCode - Windows virtual key code (default: 0). nativeVirtualKeyCode - Native virtual key code (default: 0). autoRepeat - Whether the event was generated from auto repeat (default: false). isKeypad - Whether the event was generated from the keypad (default: false). isSystemKey - Whether the event was a system key event (default: false). location - Whether the event was from the left or right side of the keyboard. 1=Left, 2=Right (default: 0). commands - Editing commands to send with the key event (e.g., 'selectAll') (default: []). These are related to but not equal the command names used in `document.execCommand` and NSStandardKeyBindingResponding. See https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/editing/commands/editor_command_names.h for valid command names.

func (*Input) DispatchKeyEventWithParams

func (c *Input) DispatchKeyEventWithParams(ctx context.Context, v *InputDispatchKeyEventParams) (*gcdmessage.ChromeResponse, error)

DispatchKeyEventWithParams - Dispatches a key event to the page.

func (*Input) DispatchMouseEvent

func (c *Input) DispatchMouseEvent(ctx context.Context, theType string, x float64, y float64, modifiers int, timestamp float64, button string, buttons int, clickCount int, force float64, tangentialPressure float64, tiltX int, tiltY int, twist int, deltaX float64, deltaY float64, pointerType string) (*gcdmessage.ChromeResponse, error)

DispatchMouseEvent - Dispatches a mouse event to the page. type - Type of the mouse event. x - X coordinate of the event relative to the main frame's viewport in CSS pixels. y - Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport. modifiers - Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0). timestamp - Time at which the event occurred. button - Mouse button (default: "none"). enum values: none, left, middle, right, back, forward buttons - A number indicating which buttons are pressed on the mouse when a mouse event is triggered. Left=1, Right=2, Middle=4, Back=8, Forward=16, None=0. clickCount - Number of times the mouse button was clicked (default: 0). force - The normalized pressure, which has a range of [0,1] (default: 0). tangentialPressure - The normalized tangential pressure, which has a range of [-1,1] (default: 0). tiltX - The plane angle between the Y-Z plane and the plane containing both the stylus axis and the Y axis, in degrees of the range [-90,90], a positive tiltX is to the right (default: 0). tiltY - The plane angle between the X-Z plane and the plane containing both the stylus axis and the X axis, in degrees of the range [-90,90], a positive tiltY is towards the user (default: 0). twist - The clockwise rotation of a pen stylus around its own major axis, in degrees in the range [0,359] (default: 0). deltaX - X delta in CSS pixels for mouse wheel event (default: 0). deltaY - Y delta in CSS pixels for mouse wheel event (default: 0). pointerType - Pointer type (default: "mouse").

func (*Input) DispatchMouseEventWithParams

func (c *Input) DispatchMouseEventWithParams(ctx context.Context, v *InputDispatchMouseEventParams) (*gcdmessage.ChromeResponse, error)

DispatchMouseEventWithParams - Dispatches a mouse event to the page.

func (*Input) DispatchTouchEvent

func (c *Input) DispatchTouchEvent(ctx context.Context, theType string, touchPoints []*InputTouchPoint, modifiers int, timestamp float64) (*gcdmessage.ChromeResponse, error)

DispatchTouchEvent - Dispatches a touch event to the page. type - Type of the touch event. TouchEnd and TouchCancel must not contain any touch points, while TouchStart and TouchMove must contains at least one. touchPoints - Active touch points on the touch device. One event per any changed point (compared to previous touch event in a sequence) is generated, emulating pressing/moving/releasing points one by one. modifiers - Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0). timestamp - Time at which the event occurred.

func (*Input) DispatchTouchEventWithParams

func (c *Input) DispatchTouchEventWithParams(ctx context.Context, v *InputDispatchTouchEventParams) (*gcdmessage.ChromeResponse, error)

DispatchTouchEventWithParams - Dispatches a touch event to the page.

func (*Input) EmulateTouchFromMouseEvent

func (c *Input) EmulateTouchFromMouseEvent(ctx context.Context, theType string, x int, y int, button string, timestamp float64, deltaX float64, deltaY float64, modifiers int, clickCount int) (*gcdmessage.ChromeResponse, error)

EmulateTouchFromMouseEvent - Emulates touch event from the mouse event parameters. type - Type of the mouse event. x - X coordinate of the mouse pointer in DIP. y - Y coordinate of the mouse pointer in DIP. button - Mouse button. Only "none", "left", "right" are supported. enum values: none, left, middle, right, back, forward timestamp - Time at which the event occurred (default: current time). deltaX - X delta in DIP for mouse wheel event (default: 0). deltaY - Y delta in DIP for mouse wheel event (default: 0). modifiers - Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0). clickCount - Number of times the mouse button was clicked (default: 0).

func (*Input) EmulateTouchFromMouseEventWithParams

func (c *Input) EmulateTouchFromMouseEventWithParams(ctx context.Context, v *InputEmulateTouchFromMouseEventParams) (*gcdmessage.ChromeResponse, error)

EmulateTouchFromMouseEventWithParams - Emulates touch event from the mouse event parameters.

func (*Input) ImeSetComposition added in v2.2.4

func (c *Input) ImeSetComposition(ctx context.Context, text string, selectionStart int, selectionEnd int, replacementStart int, replacementEnd int) (*gcdmessage.ChromeResponse, error)

ImeSetComposition - This method sets the current candidate text for ime. Use imeCommitComposition to commit the final text. Use imeSetComposition with empty string as text to cancel composition. text - The text to insert selectionStart - selection start selectionEnd - selection end replacementStart - replacement start replacementEnd - replacement end

func (*Input) ImeSetCompositionWithParams added in v2.2.4

func (c *Input) ImeSetCompositionWithParams(ctx context.Context, v *InputImeSetCompositionParams) (*gcdmessage.ChromeResponse, error)

ImeSetCompositionWithParams - This method sets the current candidate text for ime. Use imeCommitComposition to commit the final text. Use imeSetComposition with empty string as text to cancel composition.

func (*Input) InsertText

func (c *Input) InsertText(ctx context.Context, text string) (*gcdmessage.ChromeResponse, error)

InsertText - This method emulates inserting text that doesn't come from a key press, for example an emoji keyboard or an IME. text - The text to insert.

func (*Input) InsertTextWithParams

func (c *Input) InsertTextWithParams(ctx context.Context, v *InputInsertTextParams) (*gcdmessage.ChromeResponse, error)

InsertTextWithParams - This method emulates inserting text that doesn't come from a key press, for example an emoji keyboard or an IME.

func (*Input) SetIgnoreInputEvents

func (c *Input) SetIgnoreInputEvents(ctx context.Context, ignore bool) (*gcdmessage.ChromeResponse, error)

SetIgnoreInputEvents - Ignores input events (useful while auditing page). ignore - Ignores input events processing when set to true.

func (*Input) SetIgnoreInputEventsWithParams

func (c *Input) SetIgnoreInputEventsWithParams(ctx context.Context, v *InputSetIgnoreInputEventsParams) (*gcdmessage.ChromeResponse, error)

SetIgnoreInputEventsWithParams - Ignores input events (useful while auditing page).

func (*Input) SetInterceptDrags added in v2.1.1

func (c *Input) SetInterceptDrags(ctx context.Context, enabled bool) (*gcdmessage.ChromeResponse, error)

SetInterceptDrags - Prevents default drag and drop behavior and instead emits `Input.dragIntercepted` events. Drag and drop behavior can be directly controlled via `Input.dispatchDragEvent`. enabled -

func (*Input) SetInterceptDragsWithParams added in v2.1.1

func (c *Input) SetInterceptDragsWithParams(ctx context.Context, v *InputSetInterceptDragsParams) (*gcdmessage.ChromeResponse, error)

SetInterceptDragsWithParams - Prevents default drag and drop behavior and instead emits `Input.dragIntercepted` events. Drag and drop behavior can be directly controlled via `Input.dispatchDragEvent`.

func (*Input) SynthesizePinchGesture

func (c *Input) SynthesizePinchGesture(ctx context.Context, x float64, y float64, scaleFactor float64, relativeSpeed int, gestureSourceType string) (*gcdmessage.ChromeResponse, error)

SynthesizePinchGesture - Synthesizes a pinch gesture over a time period by issuing appropriate touch events. x - X coordinate of the start of the gesture in CSS pixels. y - Y coordinate of the start of the gesture in CSS pixels. scaleFactor - Relative scale factor after zooming (>1.0 zooms in, <1.0 zooms out). relativeSpeed - Relative pointer speed in pixels per second (default: 800). gestureSourceType - Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type). enum values: default, touch, mouse

func (*Input) SynthesizePinchGestureWithParams

func (c *Input) SynthesizePinchGestureWithParams(ctx context.Context, v *InputSynthesizePinchGestureParams) (*gcdmessage.ChromeResponse, error)

SynthesizePinchGestureWithParams - Synthesizes a pinch gesture over a time period by issuing appropriate touch events.

func (*Input) SynthesizeScrollGesture

func (c *Input) SynthesizeScrollGesture(ctx context.Context, x float64, y float64, xDistance float64, yDistance float64, xOverscroll float64, yOverscroll float64, preventFling bool, speed int, gestureSourceType string, repeatCount int, repeatDelayMs int, interactionMarkerName string) (*gcdmessage.ChromeResponse, error)

SynthesizeScrollGesture - Synthesizes a scroll gesture over a time period by issuing appropriate touch events. x - X coordinate of the start of the gesture in CSS pixels. y - Y coordinate of the start of the gesture in CSS pixels. xDistance - The distance to scroll along the X axis (positive to scroll left). yDistance - The distance to scroll along the Y axis (positive to scroll up). xOverscroll - The number of additional pixels to scroll back along the X axis, in addition to the given distance. yOverscroll - The number of additional pixels to scroll back along the Y axis, in addition to the given distance. preventFling - Prevent fling (default: true). speed - Swipe speed in pixels per second (default: 800). gestureSourceType - Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type). enum values: default, touch, mouse repeatCount - The number of times to repeat the gesture (default: 0). repeatDelayMs - The number of milliseconds delay between each repeat. (default: 250). interactionMarkerName - The name of the interaction markers to generate, if not empty (default: "").

func (*Input) SynthesizeScrollGestureWithParams

func (c *Input) SynthesizeScrollGestureWithParams(ctx context.Context, v *InputSynthesizeScrollGestureParams) (*gcdmessage.ChromeResponse, error)

SynthesizeScrollGestureWithParams - Synthesizes a scroll gesture over a time period by issuing appropriate touch events.

func (*Input) SynthesizeTapGesture

func (c *Input) SynthesizeTapGesture(ctx context.Context, x float64, y float64, duration int, tapCount int, gestureSourceType string) (*gcdmessage.ChromeResponse, error)

SynthesizeTapGesture - Synthesizes a tap gesture over a time period by issuing appropriate touch events. x - X coordinate of the start of the gesture in CSS pixels. y - Y coordinate of the start of the gesture in CSS pixels. duration - Duration between touchdown and touchup events in ms (default: 50). tapCount - Number of times to perform the tap (e.g. 2 for double tap, default: 1). gestureSourceType - Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type). enum values: default, touch, mouse

func (*Input) SynthesizeTapGestureWithParams

func (c *Input) SynthesizeTapGestureWithParams(ctx context.Context, v *InputSynthesizeTapGestureParams) (*gcdmessage.ChromeResponse, error)

SynthesizeTapGestureWithParams - Synthesizes a tap gesture over a time period by issuing appropriate touch events.

type InputDispatchDragEventParams added in v2.1.1

type InputDispatchDragEventParams struct {
	// Type of the drag event.
	TheType string `json:"type"`
	// X coordinate of the event relative to the main frame's viewport in CSS pixels.
	X float64 `json:"x"`
	// Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport.
	Y float64 `json:"y"`
	//
	Data *InputDragData `json:"data"`
	// Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
	Modifiers int `json:"modifiers,omitempty"`
}

type InputDispatchKeyEventParams

type InputDispatchKeyEventParams struct {
	// Type of the key event.
	TheType string `json:"type"`
	// Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
	Modifiers int `json:"modifiers,omitempty"`
	// Time at which the event occurred.
	Timestamp float64 `json:"timestamp,omitempty"`
	// Text as generated by processing a virtual key code with a keyboard layout. Not needed for for `keyUp` and `rawKeyDown` events (default: "")
	Text string `json:"text,omitempty"`
	// Text that would have been generated by the keyboard if no modifiers were pressed (except for shift). Useful for shortcut (accelerator) key handling (default: "").
	UnmodifiedText string `json:"unmodifiedText,omitempty"`
	// Unique key identifier (e.g., 'U+0041') (default: "").
	KeyIdentifier string `json:"keyIdentifier,omitempty"`
	// Unique DOM defined string value for each physical key (e.g., 'KeyA') (default: "").
	Code string `json:"code,omitempty"`
	// Unique DOM defined string value describing the meaning of the key in the context of active modifiers, keyboard layout, etc (e.g., 'AltGr') (default: "").
	Key string `json:"key,omitempty"`
	// Windows virtual key code (default: 0).
	WindowsVirtualKeyCode int `json:"windowsVirtualKeyCode,omitempty"`
	// Native virtual key code (default: 0).
	NativeVirtualKeyCode int `json:"nativeVirtualKeyCode,omitempty"`
	// Whether the event was generated from auto repeat (default: false).
	AutoRepeat bool `json:"autoRepeat,omitempty"`
	// Whether the event was generated from the keypad (default: false).
	IsKeypad bool `json:"isKeypad,omitempty"`
	// Whether the event was a system key event (default: false).
	IsSystemKey bool `json:"isSystemKey,omitempty"`
	// Whether the event was from the left or right side of the keyboard. 1=Left, 2=Right (default: 0).
	Location int `json:"location,omitempty"`
	// Editing commands to send with the key event (e.g., 'selectAll') (default: []). These are related to but not equal the command names used in `document.execCommand` and NSStandardKeyBindingResponding. See https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/editing/commands/editor_command_names.h for valid command names.
	Commands []string `json:"commands,omitempty"`
}

type InputDispatchMouseEventParams

type InputDispatchMouseEventParams struct {
	// Type of the mouse event.
	TheType string `json:"type"`
	// X coordinate of the event relative to the main frame's viewport in CSS pixels.
	X float64 `json:"x"`
	// Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport.
	Y float64 `json:"y"`
	// Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
	Modifiers int `json:"modifiers,omitempty"`
	// Time at which the event occurred.
	Timestamp float64 `json:"timestamp,omitempty"`
	// Mouse button (default: "none"). enum values: none, left, middle, right, back, forward
	Button string `json:"button,omitempty"`
	// A number indicating which buttons are pressed on the mouse when a mouse event is triggered. Left=1, Right=2, Middle=4, Back=8, Forward=16, None=0.
	Buttons int `json:"buttons,omitempty"`
	// Number of times the mouse button was clicked (default: 0).
	ClickCount int `json:"clickCount,omitempty"`
	// The normalized pressure, which has a range of [0,1] (default: 0).
	Force float64 `json:"force,omitempty"`
	// The normalized tangential pressure, which has a range of [-1,1] (default: 0).
	TangentialPressure float64 `json:"tangentialPressure,omitempty"`
	// The plane angle between the Y-Z plane and the plane containing both the stylus axis and the Y axis, in degrees of the range [-90,90], a positive tiltX is to the right (default: 0).
	TiltX int `json:"tiltX,omitempty"`
	// The plane angle between the X-Z plane and the plane containing both the stylus axis and the X axis, in degrees of the range [-90,90], a positive tiltY is towards the user (default: 0).
	TiltY int `json:"tiltY,omitempty"`
	// The clockwise rotation of a pen stylus around its own major axis, in degrees in the range [0,359] (default: 0).
	Twist int `json:"twist,omitempty"`
	// X delta in CSS pixels for mouse wheel event (default: 0).
	DeltaX float64 `json:"deltaX,omitempty"`
	// Y delta in CSS pixels for mouse wheel event (default: 0).
	DeltaY float64 `json:"deltaY,omitempty"`
	// Pointer type (default: "mouse").
	PointerType string `json:"pointerType,omitempty"`
}

type InputDispatchTouchEventParams

type InputDispatchTouchEventParams struct {
	// Type of the touch event. TouchEnd and TouchCancel must not contain any touch points, while TouchStart and TouchMove must contains at least one.
	TheType string `json:"type"`
	// Active touch points on the touch device. One event per any changed point (compared to previous touch event in a sequence) is generated, emulating pressing/moving/releasing points one by one.
	TouchPoints []*InputTouchPoint `json:"touchPoints"`
	// Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
	Modifiers int `json:"modifiers,omitempty"`
	// Time at which the event occurred.
	Timestamp float64 `json:"timestamp,omitempty"`
}

type InputDragData added in v2.1.1

type InputDragData struct {
	Items              []*InputDragDataItem `json:"items"`              //
	Files              []string             `json:"files,omitempty"`    // List of filenames that should be included when dropping
	DragOperationsMask int                  `json:"dragOperationsMask"` // Bit field representing allowed drag operations. Copy = 1, Link = 2, Move = 16
}

No Description.

type InputDragDataItem added in v2.1.1

type InputDragDataItem struct {
	MimeType string `json:"mimeType"`          // Mime type of the dragged data.
	Data     string `json:"data"`              // Depending of the value of `mimeType`, it contains the dragged link, text, HTML markup or any other data.
	Title    string `json:"title,omitempty"`   // Title associated with a link. Only valid when `mimeType` == "text/uri-list".
	BaseURL  string `json:"baseURL,omitempty"` // Stores the base URL for the contained markup. Only valid when `mimeType` == "text/html".
}

No Description.

type InputDragInterceptedEvent added in v2.1.1

type InputDragInterceptedEvent struct {
	Method string `json:"method"`
	Params struct {
		Data *InputDragData `json:"data"` //
	} `json:"Params,omitempty"`
}

Emitted only when `Input.setInterceptDrags` is enabled. Use this data with `Input.dispatchDragEvent` to restore normal drag and drop behavior.

type InputEmulateTouchFromMouseEventParams

type InputEmulateTouchFromMouseEventParams struct {
	// Type of the mouse event.
	TheType string `json:"type"`
	// X coordinate of the mouse pointer in DIP.
	X int `json:"x"`
	// Y coordinate of the mouse pointer in DIP.
	Y int `json:"y"`
	// Mouse button. Only "none", "left", "right" are supported. enum values: none, left, middle, right, back, forward
	Button string `json:"button"`
	// Time at which the event occurred (default: current time).
	Timestamp float64 `json:"timestamp,omitempty"`
	// X delta in DIP for mouse wheel event (default: 0).
	DeltaX float64 `json:"deltaX,omitempty"`
	// Y delta in DIP for mouse wheel event (default: 0).
	DeltaY float64 `json:"deltaY,omitempty"`
	// Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
	Modifiers int `json:"modifiers,omitempty"`
	// Number of times the mouse button was clicked (default: 0).
	ClickCount int `json:"clickCount,omitempty"`
}

type InputImeSetCompositionParams added in v2.2.4

type InputImeSetCompositionParams struct {
	// The text to insert
	Text string `json:"text"`
	// selection start
	SelectionStart int `json:"selectionStart"`
	// selection end
	SelectionEnd int `json:"selectionEnd"`
	// replacement start
	ReplacementStart int `json:"replacementStart,omitempty"`
	// replacement end
	ReplacementEnd int `json:"replacementEnd,omitempty"`
}

type InputInsertTextParams

type InputInsertTextParams struct {
	// The text to insert.
	Text string `json:"text"`
}

type InputSetIgnoreInputEventsParams

type InputSetIgnoreInputEventsParams struct {
	// Ignores input events processing when set to true.
	Ignore bool `json:"ignore"`
}

type InputSetInterceptDragsParams added in v2.1.1

type InputSetInterceptDragsParams struct {
	//
	Enabled bool `json:"enabled"`
}

type InputSynthesizePinchGestureParams

type InputSynthesizePinchGestureParams struct {
	// X coordinate of the start of the gesture in CSS pixels.
	X float64 `json:"x"`
	// Y coordinate of the start of the gesture in CSS pixels.
	Y float64 `json:"y"`
	// Relative scale factor after zooming (>1.0 zooms in, <1.0 zooms out).
	ScaleFactor float64 `json:"scaleFactor"`
	// Relative pointer speed in pixels per second (default: 800).
	RelativeSpeed int `json:"relativeSpeed,omitempty"`
	// Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type). enum values: default, touch, mouse
	GestureSourceType string `json:"gestureSourceType,omitempty"`
}

type InputSynthesizeScrollGestureParams

type InputSynthesizeScrollGestureParams struct {
	// X coordinate of the start of the gesture in CSS pixels.
	X float64 `json:"x"`
	// Y coordinate of the start of the gesture in CSS pixels.
	Y float64 `json:"y"`
	// The distance to scroll along the X axis (positive to scroll left).
	XDistance float64 `json:"xDistance,omitempty"`
	// The distance to scroll along the Y axis (positive to scroll up).
	YDistance float64 `json:"yDistance,omitempty"`
	// The number of additional pixels to scroll back along the X axis, in addition to the given distance.
	XOverscroll float64 `json:"xOverscroll,omitempty"`
	// The number of additional pixels to scroll back along the Y axis, in addition to the given distance.
	YOverscroll float64 `json:"yOverscroll,omitempty"`
	// Prevent fling (default: true).
	PreventFling bool `json:"preventFling,omitempty"`
	// Swipe speed in pixels per second (default: 800).
	Speed int `json:"speed,omitempty"`
	// Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type). enum values: default, touch, mouse
	GestureSourceType string `json:"gestureSourceType,omitempty"`
	// The number of times to repeat the gesture (default: 0).
	RepeatCount int `json:"repeatCount,omitempty"`
	// The number of milliseconds delay between each repeat. (default: 250).
	RepeatDelayMs int `json:"repeatDelayMs,omitempty"`
	// The name of the interaction markers to generate, if not empty (default: "").
	InteractionMarkerName string `json:"interactionMarkerName,omitempty"`
}

type InputSynthesizeTapGestureParams

type InputSynthesizeTapGestureParams struct {
	// X coordinate of the start of the gesture in CSS pixels.
	X float64 `json:"x"`
	// Y coordinate of the start of the gesture in CSS pixels.
	Y float64 `json:"y"`
	// Duration between touchdown and touchup events in ms (default: 50).
	Duration int `json:"duration,omitempty"`
	// Number of times to perform the tap (e.g. 2 for double tap, default: 1).
	TapCount int `json:"tapCount,omitempty"`
	// Which type of input events to be generated (default: 'default', which queries the platform for the preferred input type). enum values: default, touch, mouse
	GestureSourceType string `json:"gestureSourceType,omitempty"`
}

type InputTouchPoint

type InputTouchPoint struct {
	X                  float64 `json:"x"`                            // X coordinate of the event relative to the main frame's viewport in CSS pixels.
	Y                  float64 `json:"y"`                            // Y coordinate of the event relative to the main frame's viewport in CSS pixels. 0 refers to the top of the viewport and Y increases as it proceeds towards the bottom of the viewport.
	RadiusX            float64 `json:"radiusX,omitempty"`            // X radius of the touch area (default: 1.0).
	RadiusY            float64 `json:"radiusY,omitempty"`            // Y radius of the touch area (default: 1.0).
	RotationAngle      float64 `json:"rotationAngle,omitempty"`      // Rotation angle (default: 0.0).
	Force              float64 `json:"force,omitempty"`              // Force (default: 1.0).
	TangentialPressure float64 `json:"tangentialPressure,omitempty"` // The normalized tangential pressure, which has a range of [-1,1] (default: 0).
	TiltX              int     `json:"tiltX,omitempty"`              // The plane angle between the Y-Z plane and the plane containing both the stylus axis and the Y axis, in degrees of the range [-90,90], a positive tiltX is to the right (default: 0)
	TiltY              int     `json:"tiltY,omitempty"`              // The plane angle between the X-Z plane and the plane containing both the stylus axis and the X axis, in degrees of the range [-90,90], a positive tiltY is towards the user (default: 0).
	Twist              int     `json:"twist,omitempty"`              // The clockwise rotation of a pen stylus around its own major axis, in degrees in the range [0,359] (default: 0).
	Id                 float64 `json:"id,omitempty"`                 // Identifier used to track touch sources between events, must be unique within an event.
}

No Description.

type Inspector

type Inspector struct {
	// contains filtered or unexported fields
}

func NewInspector

func NewInspector(target gcdmessage.ChromeTargeter) *Inspector

func (*Inspector) Disable

Disables inspector domain notifications.

func (*Inspector) Enable

Enables inspector domain notifications.

type InspectorDetachedEvent

type InspectorDetachedEvent struct {
	Method string `json:"method"`
	Params struct {
		Reason string `json:"reason"` // The reason why connection has been terminated.
	} `json:"Params,omitempty"`
}

Fired when remote debugging connection is about to be terminated. Contains detach reason.

type LayerTree

type LayerTree struct {
	// contains filtered or unexported fields
}

func NewLayerTree

func NewLayerTree(target gcdmessage.ChromeTargeter) *LayerTree

func (*LayerTree) CompositingReasons

func (c *LayerTree) CompositingReasons(ctx context.Context, layerId string) ([]string, []string, error)

CompositingReasons - Provides the reasons why the given layer was composited. layerId - The id of the layer for which we want to get the reasons it was composited. Returns - compositingReasons - A list of strings specifying reasons for the given layer to become composited. compositingReasonIds - A list of strings specifying reason IDs for the given layer to become composited.

func (*LayerTree) CompositingReasonsWithParams

func (c *LayerTree) CompositingReasonsWithParams(ctx context.Context, v *LayerTreeCompositingReasonsParams) ([]string, []string, error)

CompositingReasonsWithParams - Provides the reasons why the given layer was composited. Returns - compositingReasons - A list of strings specifying reasons for the given layer to become composited. compositingReasonIds - A list of strings specifying reason IDs for the given layer to become composited.

func (*LayerTree) Disable

Disables compositing tree inspection.

func (*LayerTree) Enable

Enables compositing tree inspection.

func (*LayerTree) LoadSnapshot

func (c *LayerTree) LoadSnapshot(ctx context.Context, tiles []*LayerTreePictureTile) (string, error)

LoadSnapshot - Returns the snapshot identifier. tiles - An array of tiles composing the snapshot. Returns - snapshotId - The id of the snapshot.

func (*LayerTree) LoadSnapshotWithParams

func (c *LayerTree) LoadSnapshotWithParams(ctx context.Context, v *LayerTreeLoadSnapshotParams) (string, error)

LoadSnapshotWithParams - Returns the snapshot identifier. Returns - snapshotId - The id of the snapshot.

func (*LayerTree) MakeSnapshot

func (c *LayerTree) MakeSnapshot(ctx context.Context, layerId string) (string, error)

MakeSnapshot - Returns the layer snapshot identifier. layerId - The id of the layer. Returns - snapshotId - The id of the layer snapshot.

func (*LayerTree) MakeSnapshotWithParams

func (c *LayerTree) MakeSnapshotWithParams(ctx context.Context, v *LayerTreeMakeSnapshotParams) (string, error)

MakeSnapshotWithParams - Returns the layer snapshot identifier. Returns - snapshotId - The id of the layer snapshot.

func (*LayerTree) ProfileSnapshot

func (c *LayerTree) ProfileSnapshot(ctx context.Context, snapshotId string, minRepeatCount int, minDuration float64, clipRect *DOMRect) ([][]float64, error)

ProfileSnapshot - snapshotId - The id of the layer snapshot. minRepeatCount - The maximum number of times to replay the snapshot (1, if not specified). minDuration - The minimum duration (in seconds) to replay the snapshot. clipRect - The clip rectangle to apply when replaying the snapshot. Returns - timings - The array of paint profiles, one per run.

func (*LayerTree) ProfileSnapshotWithParams

func (c *LayerTree) ProfileSnapshotWithParams(ctx context.Context, v *LayerTreeProfileSnapshotParams) ([][]float64, error)

ProfileSnapshotWithParams - Returns - timings - The array of paint profiles, one per run.

func (*LayerTree) ReleaseSnapshot

func (c *LayerTree) ReleaseSnapshot(ctx context.Context, snapshotId string) (*gcdmessage.ChromeResponse, error)

ReleaseSnapshot - Releases layer snapshot captured by the back-end. snapshotId - The id of the layer snapshot.

func (*LayerTree) ReleaseSnapshotWithParams

func (c *LayerTree) ReleaseSnapshotWithParams(ctx context.Context, v *LayerTreeReleaseSnapshotParams) (*gcdmessage.ChromeResponse, error)

ReleaseSnapshotWithParams - Releases layer snapshot captured by the back-end.

func (*LayerTree) ReplaySnapshot

func (c *LayerTree) ReplaySnapshot(ctx context.Context, snapshotId string, fromStep int, toStep int, scale float64) (string, error)

ReplaySnapshot - Replays the layer snapshot and returns the resulting bitmap. snapshotId - The id of the layer snapshot. fromStep - The first step to replay from (replay from the very start if not specified). toStep - The last step to replay to (replay till the end if not specified). scale - The scale to apply while replaying (defaults to 1). Returns - dataURL - A data: URL for resulting image.

func (*LayerTree) ReplaySnapshotWithParams

func (c *LayerTree) ReplaySnapshotWithParams(ctx context.Context, v *LayerTreeReplaySnapshotParams) (string, error)

ReplaySnapshotWithParams - Replays the layer snapshot and returns the resulting bitmap. Returns - dataURL - A data: URL for resulting image.

func (*LayerTree) SnapshotCommandLog

func (c *LayerTree) SnapshotCommandLog(ctx context.Context, snapshotId string) error

SnapshotCommandLog - Replays the layer snapshot and returns canvas log. snapshotId - The id of the layer snapshot. Returns -

func (*LayerTree) SnapshotCommandLogWithParams

func (c *LayerTree) SnapshotCommandLogWithParams(ctx context.Context, v *LayerTreeSnapshotCommandLogParams) error

SnapshotCommandLogWithParams - Replays the layer snapshot and returns canvas log. Returns -

type LayerTreeCompositingReasonsParams

type LayerTreeCompositingReasonsParams struct {
	// The id of the layer for which we want to get the reasons it was composited.
	LayerId string `json:"layerId"`
}

type LayerTreeLayer

type LayerTreeLayer struct {
	LayerId                  string                             `json:"layerId"`                            // The unique id for this layer.
	ParentLayerId            string                             `json:"parentLayerId,omitempty"`            // The id of parent (not present for root).
	BackendNodeId            int                                `json:"backendNodeId,omitempty"`            // The backend id for the node associated with this layer.
	OffsetX                  float64                            `json:"offsetX"`                            // Offset from parent layer, X coordinate.
	OffsetY                  float64                            `json:"offsetY"`                            // Offset from parent layer, Y coordinate.
	Width                    float64                            `json:"width"`                              // Layer width.
	Height                   float64                            `json:"height"`                             // Layer height.
	Transform                []float64                          `json:"transform,omitempty"`                // Transformation matrix for layer, default is identity matrix
	AnchorX                  float64                            `json:"anchorX,omitempty"`                  // Transform anchor point X, absent if no transform specified
	AnchorY                  float64                            `json:"anchorY,omitempty"`                  // Transform anchor point Y, absent if no transform specified
	AnchorZ                  float64                            `json:"anchorZ,omitempty"`                  // Transform anchor point Z, absent if no transform specified
	PaintCount               int                                `json:"paintCount"`                         // Indicates how many time this layer has painted.
	DrawsContent             bool                               `json:"drawsContent"`                       // Indicates whether this layer hosts any content, rather than being used for transform/scrolling purposes only.
	Invisible                bool                               `json:"invisible,omitempty"`                // Set if layer is not visible.
	ScrollRects              []*LayerTreeScrollRect             `json:"scrollRects,omitempty"`              // Rectangles scrolling on main thread only.
	StickyPositionConstraint *LayerTreeStickyPositionConstraint `json:"stickyPositionConstraint,omitempty"` // Sticky position constraint information
}

Information about a compositing layer.

type LayerTreeLayerPaintedEvent

type LayerTreeLayerPaintedEvent struct {
	Method string `json:"method"`
	Params struct {
		LayerId string   `json:"layerId"` // The id of the painted layer.
		Clip    *DOMRect `json:"clip"`    // Clip rectangle.
	} `json:"Params,omitempty"`
}

type LayerTreeLayerTreeDidChangeEvent

type LayerTreeLayerTreeDidChangeEvent struct {
	Method string `json:"method"`
	Params struct {
		Layers []*LayerTreeLayer `json:"layers,omitempty"` // Layer tree, absent if not in the comspositing mode.
	} `json:"Params,omitempty"`
}

type LayerTreeLoadSnapshotParams

type LayerTreeLoadSnapshotParams struct {
	// An array of tiles composing the snapshot.
	Tiles []*LayerTreePictureTile `json:"tiles"`
}

type LayerTreeMakeSnapshotParams

type LayerTreeMakeSnapshotParams struct {
	// The id of the layer.
	LayerId string `json:"layerId"`
}

type LayerTreePictureTile

type LayerTreePictureTile struct {
	X       float64 `json:"x"`       // Offset from owning layer left boundary
	Y       float64 `json:"y"`       // Offset from owning layer top boundary
	Picture string  `json:"picture"` // Base64-encoded snapshot data. (Encoded as a base64 string when passed over JSON)
}

Serialized fragment of layer picture along with its offset within the layer.

type LayerTreeProfileSnapshotParams

type LayerTreeProfileSnapshotParams struct {
	// The id of the layer snapshot.
	SnapshotId string `json:"snapshotId"`
	// The maximum number of times to replay the snapshot (1, if not specified).
	MinRepeatCount int `json:"minRepeatCount,omitempty"`
	// The minimum duration (in seconds) to replay the snapshot.
	MinDuration float64 `json:"minDuration,omitempty"`
	// The clip rectangle to apply when replaying the snapshot.
	ClipRect *DOMRect `json:"clipRect,omitempty"`
}

type LayerTreeReleaseSnapshotParams

type LayerTreeReleaseSnapshotParams struct {
	// The id of the layer snapshot.
	SnapshotId string `json:"snapshotId"`
}

type LayerTreeReplaySnapshotParams

type LayerTreeReplaySnapshotParams struct {
	// The id of the layer snapshot.
	SnapshotId string `json:"snapshotId"`
	// The first step to replay from (replay from the very start if not specified).
	FromStep int `json:"fromStep,omitempty"`
	// The last step to replay to (replay till the end if not specified).
	ToStep int `json:"toStep,omitempty"`
	// The scale to apply while replaying (defaults to 1).
	Scale float64 `json:"scale,omitempty"`
}

type LayerTreeScrollRect

type LayerTreeScrollRect struct {
	Rect *DOMRect `json:"rect"` // Rectangle itself.
	Type string   `json:"type"` // Reason for rectangle to force scrolling on the main thread
}

Rectangle where scrolling happens on the main thread.

type LayerTreeSnapshotCommandLogParams

type LayerTreeSnapshotCommandLogParams struct {
	// The id of the layer snapshot.
	SnapshotId string `json:"snapshotId"`
}

type LayerTreeStickyPositionConstraint

type LayerTreeStickyPositionConstraint struct {
	StickyBoxRect                       *DOMRect `json:"stickyBoxRect"`                                 // Layout rectangle of the sticky element before being shifted
	ContainingBlockRect                 *DOMRect `json:"containingBlockRect"`                           // Layout rectangle of the containing block of the sticky element
	NearestLayerShiftingStickyBox       string   `json:"nearestLayerShiftingStickyBox,omitempty"`       // The nearest sticky layer that shifts the sticky box
	NearestLayerShiftingContainingBlock string   `json:"nearestLayerShiftingContainingBlock,omitempty"` // The nearest sticky layer that shifts the containing block
}

Sticky position constraints.

type Log

type Log struct {
	// contains filtered or unexported fields
}

func NewLog

func NewLog(target gcdmessage.ChromeTargeter) *Log

func (*Log) Clear

func (c *Log) Clear(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Clears the log.

func (*Log) Disable

func (c *Log) Disable(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Disables log domain, prevents further log entries from being reported to the client.

func (*Log) Enable

func (c *Log) Enable(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Enables log domain, sends the entries collected so far to the client by means of the `entryAdded` notification.

func (*Log) StartViolationsReport

func (c *Log) StartViolationsReport(ctx context.Context, config []*LogViolationSetting) (*gcdmessage.ChromeResponse, error)

StartViolationsReport - start violation reporting. config - Configuration for violations.

func (*Log) StartViolationsReportWithParams

func (c *Log) StartViolationsReportWithParams(ctx context.Context, v *LogStartViolationsReportParams) (*gcdmessage.ChromeResponse, error)

StartViolationsReportWithParams - start violation reporting.

func (*Log) StopViolationsReport

func (c *Log) StopViolationsReport(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Stop violation reporting.

type LogEntryAddedEvent

type LogEntryAddedEvent struct {
	Method string `json:"method"`
	Params struct {
		Entry *LogLogEntry `json:"entry"` // The entry.
	} `json:"Params,omitempty"`
}

Issued when new message was logged.

type LogLogEntry

type LogLogEntry struct {
	Source           string                 `json:"source"`                     // Log entry source.
	Level            string                 `json:"level"`                      // Log entry severity.
	Text             string                 `json:"text"`                       // Logged text.
	Category         string                 `json:"category,omitempty"`         //
	Timestamp        float64                `json:"timestamp"`                  // Timestamp when this entry was added.
	Url              string                 `json:"url,omitempty"`              // URL of the resource if known.
	LineNumber       int                    `json:"lineNumber,omitempty"`       // Line number in the resource.
	StackTrace       *RuntimeStackTrace     `json:"stackTrace,omitempty"`       // JavaScript stack trace.
	NetworkRequestId string                 `json:"networkRequestId,omitempty"` // Identifier of the network request associated with this entry.
	WorkerId         string                 `json:"workerId,omitempty"`         // Identifier of the worker associated with this entry.
	Args             []*RuntimeRemoteObject `json:"args,omitempty"`             // Call arguments.
}

Log entry.

type LogStartViolationsReportParams

type LogStartViolationsReportParams struct {
	// Configuration for violations.
	Config []*LogViolationSetting `json:"config"`
}

type LogViolationSetting

type LogViolationSetting struct {
	Name      string  `json:"name"`      // Violation type.
	Threshold float64 `json:"threshold"` // Time threshold to trigger upon.
}

Violation configuration setting.

type Media

type Media struct {
	// contains filtered or unexported fields
}

func NewMedia

func NewMedia(target gcdmessage.ChromeTargeter) *Media

func (*Media) Disable

func (c *Media) Disable(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Disables the Media domain.

func (*Media) Enable

func (c *Media) Enable(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Enables the Media domain

type MediaPlayerError

type MediaPlayerError struct {
	ErrorType string                            `json:"errorType"` //
	Code      int                               `json:"code"`      // Code is the numeric enum entry for a specific set of error codes, such as PipelineStatusCodes in media/base/pipeline_status.h
	Stack     []*MediaPlayerErrorSourceLocation `json:"stack"`     // A trace of where this error was caused / where it passed through.
	Cause     []*MediaPlayerError               `json:"cause"`     // Errors potentially have a root cause error, ie, a DecoderError might be caused by an WindowsError
	Data      map[string]interface{}            `json:"data"`      // Extra data attached to an error, such as an HRESULT, Video Codec, etc.
}

Corresponds to kMediaError

type MediaPlayerErrorSourceLocation added in v2.2.6

type MediaPlayerErrorSourceLocation struct {
	File string `json:"file"` //
	Line int    `json:"line"` //
}

Represents logged source line numbers reported in an error. NOTE: file and line are from chromium c++ implementation code, not js.

type MediaPlayerErrorsRaisedEvent

type MediaPlayerErrorsRaisedEvent struct {
	Method string `json:"method"`
	Params struct {
		PlayerId string              `json:"playerId"` //
		Errors   []*MediaPlayerError `json:"errors"`   //
	} `json:"Params,omitempty"`
}

Send a list of any errors that need to be delivered.

type MediaPlayerEvent

type MediaPlayerEvent struct {
	Timestamp float64 `json:"timestamp"` //
	Value     string  `json:"value"`     //
}

Corresponds to kMediaEventTriggered

type MediaPlayerEventsAddedEvent

type MediaPlayerEventsAddedEvent struct {
	Method string `json:"method"`
	Params struct {
		PlayerId string              `json:"playerId"` //
		Events   []*MediaPlayerEvent `json:"events"`   //
	} `json:"Params,omitempty"`
}

Send events as a list, allowing them to be batched on the browser for less congestion. If batched, events must ALWAYS be in chronological order.

type MediaPlayerMessage

type MediaPlayerMessage struct {
	Level   string `json:"level"`   // Keep in sync with MediaLogMessageLevel We are currently keeping the message level 'error' separate from the PlayerError type because right now they represent different things, this one being a DVLOG(ERROR) style log message that gets printed based on what log level is selected in the UI, and the other is a representation of a media::PipelineStatus object. Soon however we're going to be moving away from using PipelineStatus for errors and introducing a new error type which should hopefully let us integrate the error log level into the PlayerError type.
	Message string `json:"message"` //
}

Have one type per entry in MediaLogRecord::Type Corresponds to kMessage

type MediaPlayerMessagesLoggedEvent

type MediaPlayerMessagesLoggedEvent struct {
	Method string `json:"method"`
	Params struct {
		PlayerId string                `json:"playerId"` //
		Messages []*MediaPlayerMessage `json:"messages"` //
	} `json:"Params,omitempty"`
}

Send a list of any messages that need to be delivered.

type MediaPlayerPropertiesChangedEvent

type MediaPlayerPropertiesChangedEvent struct {
	Method string `json:"method"`
	Params struct {
		PlayerId   string                 `json:"playerId"`   //
		Properties []*MediaPlayerProperty `json:"properties"` //
	} `json:"Params,omitempty"`
}

This can be called multiple times, and can be used to set / override / remove player properties. A null propValue indicates removal.

type MediaPlayerProperty

type MediaPlayerProperty struct {
	Name  string `json:"name"`  //
	Value string `json:"value"` //
}

Corresponds to kMediaPropertyChange

type MediaPlayersCreatedEvent

type MediaPlayersCreatedEvent struct {
	Method string `json:"method"`
	Params struct {
		Players []string `json:"players"` //
	} `json:"Params,omitempty"`
}

Called whenever a player is created, or when a new agent joins and receives a list of active players. If an agent is restored, it will receive the full list of player ids and all events again.

type Memory

type Memory struct {
	// contains filtered or unexported fields
}

func NewMemory

func NewMemory(target gcdmessage.ChromeTargeter) *Memory

func (*Memory) ForciblyPurgeJavaScriptMemory

func (c *Memory) ForciblyPurgeJavaScriptMemory(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Simulate OomIntervention by purging V8 memory.

func (*Memory) GetAllTimeSamplingProfile

func (c *Memory) GetAllTimeSamplingProfile(ctx context.Context) (*MemorySamplingProfile, error)

GetAllTimeSamplingProfile - Retrieve native memory allocations profile collected since renderer process startup. Returns - profile -

func (*Memory) GetBrowserSamplingProfile

func (c *Memory) GetBrowserSamplingProfile(ctx context.Context) (*MemorySamplingProfile, error)

GetBrowserSamplingProfile - Retrieve native memory allocations profile collected since browser process startup. Returns - profile -

func (*Memory) GetDOMCounters

func (c *Memory) GetDOMCounters(ctx context.Context) (int, int, int, error)

GetDOMCounters - Returns - documents - nodes - jsEventListeners -

func (*Memory) GetSamplingProfile

func (c *Memory) GetSamplingProfile(ctx context.Context) (*MemorySamplingProfile, error)

GetSamplingProfile - Retrieve native memory allocations profile collected since last `startSampling` call. Returns - profile -

func (*Memory) PrepareForLeakDetection

func (c *Memory) PrepareForLeakDetection(ctx context.Context) (*gcdmessage.ChromeResponse, error)

func (*Memory) SetPressureNotificationsSuppressed

func (c *Memory) SetPressureNotificationsSuppressed(ctx context.Context, suppressed bool) (*gcdmessage.ChromeResponse, error)

SetPressureNotificationsSuppressed - Enable/disable suppressing memory pressure notifications in all processes. suppressed - If true, memory pressure notifications will be suppressed.

func (*Memory) SetPressureNotificationsSuppressedWithParams

func (c *Memory) SetPressureNotificationsSuppressedWithParams(ctx context.Context, v *MemorySetPressureNotificationsSuppressedParams) (*gcdmessage.ChromeResponse, error)

SetPressureNotificationsSuppressedWithParams - Enable/disable suppressing memory pressure notifications in all processes.

func (*Memory) SimulatePressureNotification

func (c *Memory) SimulatePressureNotification(ctx context.Context, level string) (*gcdmessage.ChromeResponse, error)

SimulatePressureNotification - Simulate a memory pressure notification in all processes. level - Memory pressure level of the notification. enum values: moderate, critical

func (*Memory) SimulatePressureNotificationWithParams

func (c *Memory) SimulatePressureNotificationWithParams(ctx context.Context, v *MemorySimulatePressureNotificationParams) (*gcdmessage.ChromeResponse, error)

SimulatePressureNotificationWithParams - Simulate a memory pressure notification in all processes.

func (*Memory) StartSampling

func (c *Memory) StartSampling(ctx context.Context, samplingInterval int, suppressRandomness bool) (*gcdmessage.ChromeResponse, error)

StartSampling - Start collecting native memory profile. samplingInterval - Average number of bytes between samples. suppressRandomness - Do not randomize intervals between samples.

func (*Memory) StartSamplingWithParams

func (c *Memory) StartSamplingWithParams(ctx context.Context, v *MemoryStartSamplingParams) (*gcdmessage.ChromeResponse, error)

StartSamplingWithParams - Start collecting native memory profile.

func (*Memory) StopSampling

func (c *Memory) StopSampling(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Stop collecting native memory profile.

type MemoryModule

type MemoryModule struct {
	Name        string  `json:"name"`        // Name of the module.
	Uuid        string  `json:"uuid"`        // UUID of the module.
	BaseAddress string  `json:"baseAddress"` // Base address where the module is loaded into memory. Encoded as a decimal or hexadecimal (0x prefixed) string.
	Size        float64 `json:"size"`        // Size of the module in bytes.
}

Executable module information

type MemorySamplingProfile

type MemorySamplingProfile struct {
	Samples []*MemorySamplingProfileNode `json:"samples"` //
	Modules []*MemoryModule              `json:"modules"` //
}

Array of heap profile samples.

type MemorySamplingProfileNode

type MemorySamplingProfileNode struct {
	Size  float64  `json:"size"`  // Size of the sampled allocation.
	Total float64  `json:"total"` // Total bytes attributed to this sample.
	Stack []string `json:"stack"` // Execution stack at the point of allocation.
}

Heap profile sample.

type MemorySetPressureNotificationsSuppressedParams

type MemorySetPressureNotificationsSuppressedParams struct {
	// If true, memory pressure notifications will be suppressed.
	Suppressed bool `json:"suppressed"`
}

type MemorySimulatePressureNotificationParams

type MemorySimulatePressureNotificationParams struct {
	// Memory pressure level of the notification. enum values: moderate, critical
	Level string `json:"level"`
}

type MemoryStartSamplingParams

type MemoryStartSamplingParams struct {
	// Average number of bytes between samples.
	SamplingInterval int `json:"samplingInterval,omitempty"`
	// Do not randomize intervals between samples.
	SuppressRandomness bool `json:"suppressRandomness,omitempty"`
}

type Network

type Network struct {
	// contains filtered or unexported fields
}

func NewNetwork

func NewNetwork(target gcdmessage.ChromeTargeter) *Network

func (*Network) CanClearBrowserCache

func (c *Network) CanClearBrowserCache(ctx context.Context) (bool, error)

CanClearBrowserCache - Tells whether clearing browser cache is supported. Returns - result - True if browser cache can be cleared.

func (*Network) CanClearBrowserCookies

func (c *Network) CanClearBrowserCookies(ctx context.Context) (bool, error)

CanClearBrowserCookies - Tells whether clearing browser cookies is supported. Returns - result - True if browser cookies can be cleared.

func (*Network) CanEmulateNetworkConditions

func (c *Network) CanEmulateNetworkConditions(ctx context.Context) (bool, error)

CanEmulateNetworkConditions - Tells whether emulation of network conditions is supported. Returns - result - True if emulation of network conditions is supported.

func (*Network) ClearAcceptedEncodingsOverride added in v2.1.1

func (c *Network) ClearAcceptedEncodingsOverride(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Clears accepted encodings set by setAcceptedEncodings

func (*Network) ClearBrowserCache

func (c *Network) ClearBrowserCache(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Clears browser cache.

func (*Network) ClearBrowserCookies

func (c *Network) ClearBrowserCookies(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Clears browser cookies.

func (*Network) ContinueInterceptedRequest

func (c *Network) ContinueInterceptedRequest(ctx context.Context, interceptionId string, errorReason string, rawResponse string, url string, method string, postData string, headers map[string]interface{}, authChallengeResponse *NetworkAuthChallengeResponse) (*gcdmessage.ChromeResponse, error)

ContinueInterceptedRequest - Response to Network.requestIntercepted which either modifies the request to continue with any modifications, or blocks it, or completes it with the provided response bytes. If a network fetch occurs as a result which encounters a redirect an additional Network.requestIntercepted event will be sent with the same InterceptionId. Deprecated, use Fetch.continueRequest, Fetch.fulfillRequest and Fetch.failRequest instead. interceptionId - errorReason - If set this causes the request to fail with the given reason. Passing `Aborted` for requests marked with `isNavigationRequest` also cancels the navigation. Must not be set in response to an authChallenge. enum values: Failed, Aborted, TimedOut, AccessDenied, ConnectionClosed, ConnectionReset, ConnectionRefused, ConnectionAborted, ConnectionFailed, NameNotResolved, InternetDisconnected, AddressUnreachable, BlockedByClient, BlockedByResponse rawResponse - If set the requests completes using with the provided base64 encoded raw response, including HTTP status line and headers etc... Must not be set in response to an authChallenge. (Encoded as a base64 string when passed over JSON) url - If set the request url will be modified in a way that's not observable by page. Must not be set in response to an authChallenge. method - If set this allows the request method to be overridden. Must not be set in response to an authChallenge. postData - If set this allows postData to be set. Must not be set in response to an authChallenge. headers - If set this allows the request headers to be changed. Must not be set in response to an authChallenge. authChallengeResponse - Response to a requestIntercepted with an authChallenge. Must not be set otherwise.

func (*Network) ContinueInterceptedRequestWithParams

func (c *Network) ContinueInterceptedRequestWithParams(ctx context.Context, v *NetworkContinueInterceptedRequestParams) (*gcdmessage.ChromeResponse, error)

ContinueInterceptedRequestWithParams - Response to Network.requestIntercepted which either modifies the request to continue with any modifications, or blocks it, or completes it with the provided response bytes. If a network fetch occurs as a result which encounters a redirect an additional Network.requestIntercepted event will be sent with the same InterceptionId. Deprecated, use Fetch.continueRequest, Fetch.fulfillRequest and Fetch.failRequest instead.

func (*Network) DeleteCookies

func (c *Network) DeleteCookies(ctx context.Context, name string, url string, domain string, path string) (*gcdmessage.ChromeResponse, error)

DeleteCookies - Deletes browser cookies with matching name and url or domain/path pair. name - Name of the cookies to remove. url - If specified, deletes all the cookies with the given name where domain and path match provided URL. domain - If specified, deletes only cookies with the exact domain. path - If specified, deletes only cookies with the exact path.

func (*Network) DeleteCookiesWithParams

func (c *Network) DeleteCookiesWithParams(ctx context.Context, v *NetworkDeleteCookiesParams) (*gcdmessage.ChromeResponse, error)

DeleteCookiesWithParams - Deletes browser cookies with matching name and url or domain/path pair.

func (*Network) Disable

func (c *Network) Disable(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Disables network tracking, prevents network events from being sent to the client.

func (*Network) EmulateNetworkConditions

func (c *Network) EmulateNetworkConditions(ctx context.Context, offline bool, latency float64, downloadThroughput float64, uploadThroughput float64, connectionType string) (*gcdmessage.ChromeResponse, error)

EmulateNetworkConditions - Activates emulation of network conditions. offline - True to emulate internet disconnection. latency - Minimum latency from request sent to response headers received (ms). downloadThroughput - Maximal aggregated download throughput (bytes/sec). -1 disables download throttling. uploadThroughput - Maximal aggregated upload throughput (bytes/sec). -1 disables upload throttling. connectionType - Connection type if known. enum values: none, cellular2g, cellular3g, cellular4g, bluetooth, ethernet, wifi, wimax, other

func (*Network) EmulateNetworkConditionsWithParams

func (c *Network) EmulateNetworkConditionsWithParams(ctx context.Context, v *NetworkEmulateNetworkConditionsParams) (*gcdmessage.ChromeResponse, error)

EmulateNetworkConditionsWithParams - Activates emulation of network conditions.

func (*Network) Enable

func (c *Network) Enable(ctx context.Context, maxTotalBufferSize int, maxResourceBufferSize int, maxPostDataSize int) (*gcdmessage.ChromeResponse, error)

Enable - Enables network tracking, network events will now be delivered to the client. maxTotalBufferSize - Buffer size in bytes to use when preserving network payloads (XHRs, etc). maxResourceBufferSize - Per-resource buffer size in bytes to use when preserving network payloads (XHRs, etc). maxPostDataSize - Longest post body size (in bytes) that would be included in requestWillBeSent notification

func (*Network) EnableReportingApi added in v2.2.4

func (c *Network) EnableReportingApi(ctx context.Context, enable bool) (*gcdmessage.ChromeResponse, error)

EnableReportingApi - Enables tracking for the Reporting API, events generated by the Reporting API will now be delivered to the client. Enabling triggers 'reportingApiReportAdded' for all existing reports. enable - Whether to enable or disable events for the Reporting API

func (*Network) EnableReportingApiWithParams added in v2.2.4

func (c *Network) EnableReportingApiWithParams(ctx context.Context, v *NetworkEnableReportingApiParams) (*gcdmessage.ChromeResponse, error)

EnableReportingApiWithParams - Enables tracking for the Reporting API, events generated by the Reporting API will now be delivered to the client. Enabling triggers 'reportingApiReportAdded' for all existing reports.

func (*Network) EnableWithParams

func (c *Network) EnableWithParams(ctx context.Context, v *NetworkEnableParams) (*gcdmessage.ChromeResponse, error)

EnableWithParams - Enables network tracking, network events will now be delivered to the client.

func (*Network) GetAllCookies

func (c *Network) GetAllCookies(ctx context.Context) ([]*NetworkCookie, error)

GetAllCookies - Returns all browser cookies. Depending on the backend support, will return detailed cookie information in the `cookies` field. Deprecated. Use Storage.getCookies instead. Returns - cookies - Array of cookie objects.

func (*Network) GetCertificate

func (c *Network) GetCertificate(ctx context.Context, origin string) ([]string, error)

GetCertificate - Returns the DER-encoded certificate. origin - Origin to get certificate for. Returns - tableNames -

func (*Network) GetCertificateWithParams

func (c *Network) GetCertificateWithParams(ctx context.Context, v *NetworkGetCertificateParams) ([]string, error)

GetCertificateWithParams - Returns the DER-encoded certificate. Returns - tableNames -

func (*Network) GetCookies

func (c *Network) GetCookies(ctx context.Context, urls []string) ([]*NetworkCookie, error)

GetCookies - Returns all browser cookies for the current URL. Depending on the backend support, will return detailed cookie information in the `cookies` field. urls - The list of URLs for which applicable cookies will be fetched. If not specified, it's assumed to be set to the list containing the URLs of the page and all of its subframes. Returns - cookies - Array of cookie objects.

func (*Network) GetCookiesWithParams

func (c *Network) GetCookiesWithParams(ctx context.Context, v *NetworkGetCookiesParams) ([]*NetworkCookie, error)

GetCookiesWithParams - Returns all browser cookies for the current URL. Depending on the backend support, will return detailed cookie information in the `cookies` field. Returns - cookies - Array of cookie objects.

func (*Network) GetRequestPostData

func (c *Network) GetRequestPostData(ctx context.Context, requestId string) (string, error)

GetRequestPostData - Returns post data sent with the request. Returns an error when no data was sent with the request. requestId - Identifier of the network request to get content for. Returns - postData - Request body string, omitting files from multipart requests

func (*Network) GetRequestPostDataWithParams

func (c *Network) GetRequestPostDataWithParams(ctx context.Context, v *NetworkGetRequestPostDataParams) (string, error)

GetRequestPostDataWithParams - Returns post data sent with the request. Returns an error when no data was sent with the request. Returns - postData - Request body string, omitting files from multipart requests

func (*Network) GetResponseBody

func (c *Network) GetResponseBody(ctx context.Context, requestId string) (string, bool, error)

GetResponseBody - Returns content served for the given request. requestId - Identifier of the network request to get content for. Returns - body - Response body. base64Encoded - True, if content was sent as base64.

func (*Network) GetResponseBodyForInterception

func (c *Network) GetResponseBodyForInterception(ctx context.Context, interceptionId string) (string, bool, error)

GetResponseBodyForInterception - Returns content served for the given currently intercepted request. interceptionId - Identifier for the intercepted request to get body for. Returns - body - Response body. base64Encoded - True, if content was sent as base64.

func (*Network) GetResponseBodyForInterceptionWithParams

func (c *Network) GetResponseBodyForInterceptionWithParams(ctx context.Context, v *NetworkGetResponseBodyForInterceptionParams) (string, bool, error)

GetResponseBodyForInterceptionWithParams - Returns content served for the given currently intercepted request. Returns - body - Response body. base64Encoded - True, if content was sent as base64.

func (*Network) GetResponseBodyWithParams

func (c *Network) GetResponseBodyWithParams(ctx context.Context, v *NetworkGetResponseBodyParams) (string, bool, error)

GetResponseBodyWithParams - Returns content served for the given request. Returns - body - Response body. base64Encoded - True, if content was sent as base64.

func (*Network) GetSecurityIsolationStatus added in v2.0.6

func (c *Network) GetSecurityIsolationStatus(ctx context.Context, frameId string) (*NetworkSecurityIsolationStatus, error)

GetSecurityIsolationStatus - Returns information about the COEP/COOP isolation status. frameId - If no frameId is provided, the status of the target is provided. Returns - status -

func (*Network) GetSecurityIsolationStatusWithParams added in v2.0.6

func (c *Network) GetSecurityIsolationStatusWithParams(ctx context.Context, v *NetworkGetSecurityIsolationStatusParams) (*NetworkSecurityIsolationStatus, error)

GetSecurityIsolationStatusWithParams - Returns information about the COEP/COOP isolation status. Returns - status -

func (*Network) LoadNetworkResource added in v2.0.7

func (c *Network) LoadNetworkResource(ctx context.Context, frameId string, url string, options *NetworkLoadNetworkResourceOptions) (*NetworkLoadNetworkResourcePageResult, error)

LoadNetworkResource - Fetches the resource and returns the content. frameId - Frame id to get the resource for. Mandatory for frame targets, and should be omitted for worker targets. url - URL of the resource to get content for. options - Options for the request. Returns - resource -

func (*Network) LoadNetworkResourceWithParams added in v2.0.7

LoadNetworkResourceWithParams - Fetches the resource and returns the content. Returns - resource -

func (*Network) ReplayXHR

func (c *Network) ReplayXHR(ctx context.Context, requestId string) (*gcdmessage.ChromeResponse, error)

ReplayXHR - This method sends a new XMLHttpRequest which is identical to the original one. The following parameters should be identical: method, url, async, request body, extra headers, withCredentials attribute, user, password. requestId - Identifier of XHR to replay.

func (*Network) ReplayXHRWithParams

func (c *Network) ReplayXHRWithParams(ctx context.Context, v *NetworkReplayXHRParams) (*gcdmessage.ChromeResponse, error)

ReplayXHRWithParams - This method sends a new XMLHttpRequest which is identical to the original one. The following parameters should be identical: method, url, async, request body, extra headers, withCredentials attribute, user, password.

func (*Network) SearchInResponseBody

func (c *Network) SearchInResponseBody(ctx context.Context, requestId string, query string, caseSensitive bool, isRegex bool) ([]*DebuggerSearchMatch, error)

SearchInResponseBody - Searches for given string in response content. requestId - Identifier of the network response to search. query - String to search for. caseSensitive - If true, search is case sensitive. isRegex - If true, treats string parameter as regex. Returns - result - List of search matches.

func (*Network) SearchInResponseBodyWithParams

func (c *Network) SearchInResponseBodyWithParams(ctx context.Context, v *NetworkSearchInResponseBodyParams) ([]*DebuggerSearchMatch, error)

SearchInResponseBodyWithParams - Searches for given string in response content. Returns - result - List of search matches.

func (*Network) SetAcceptedEncodings added in v2.1.1

func (c *Network) SetAcceptedEncodings(ctx context.Context, encodings []string) (*gcdmessage.ChromeResponse, error)

SetAcceptedEncodings - Sets a list of content encodings that will be accepted. Empty list means no encoding is accepted. encodings - List of accepted content encodings. enum values: deflate, gzip, br

func (*Network) SetAcceptedEncodingsWithParams added in v2.1.1

func (c *Network) SetAcceptedEncodingsWithParams(ctx context.Context, v *NetworkSetAcceptedEncodingsParams) (*gcdmessage.ChromeResponse, error)

SetAcceptedEncodingsWithParams - Sets a list of content encodings that will be accepted. Empty list means no encoding is accepted.

func (*Network) SetAttachDebugStack added in v2.0.7

func (c *Network) SetAttachDebugStack(ctx context.Context, enabled bool) (*gcdmessage.ChromeResponse, error)

SetAttachDebugStack - Specifies whether to attach a page script stack id in requests enabled - Whether to attach a page script stack for debugging purpose.

func (*Network) SetAttachDebugStackWithParams added in v2.0.7

func (c *Network) SetAttachDebugStackWithParams(ctx context.Context, v *NetworkSetAttachDebugStackParams) (*gcdmessage.ChromeResponse, error)

SetAttachDebugStackWithParams - Specifies whether to attach a page script stack id in requests

func (*Network) SetBlockedURLs

func (c *Network) SetBlockedURLs(ctx context.Context, urls []string) (*gcdmessage.ChromeResponse, error)

SetBlockedURLs - Blocks URLs from loading. urls - URL patterns to block. Wildcards ('*') are allowed.

func (*Network) SetBlockedURLsWithParams

func (c *Network) SetBlockedURLsWithParams(ctx context.Context, v *NetworkSetBlockedURLsParams) (*gcdmessage.ChromeResponse, error)

SetBlockedURLsWithParams - Blocks URLs from loading.

func (*Network) SetBypassServiceWorker

func (c *Network) SetBypassServiceWorker(ctx context.Context, bypass bool) (*gcdmessage.ChromeResponse, error)

SetBypassServiceWorker - Toggles ignoring of service worker for each request. bypass - Bypass service worker and load from network.

func (*Network) SetBypassServiceWorkerWithParams

func (c *Network) SetBypassServiceWorkerWithParams(ctx context.Context, v *NetworkSetBypassServiceWorkerParams) (*gcdmessage.ChromeResponse, error)

SetBypassServiceWorkerWithParams - Toggles ignoring of service worker for each request.

func (*Network) SetCacheDisabled

func (c *Network) SetCacheDisabled(ctx context.Context, cacheDisabled bool) (*gcdmessage.ChromeResponse, error)

SetCacheDisabled - Toggles ignoring cache for each request. If `true`, cache will not be used. cacheDisabled - Cache disabled state.

func (*Network) SetCacheDisabledWithParams

func (c *Network) SetCacheDisabledWithParams(ctx context.Context, v *NetworkSetCacheDisabledParams) (*gcdmessage.ChromeResponse, error)

SetCacheDisabledWithParams - Toggles ignoring cache for each request. If `true`, cache will not be used.

func (*Network) SetCookie

func (c *Network) SetCookie(ctx context.Context, name string, value string, url string, domain string, path string, secure bool, httpOnly bool, sameSite string, expires float64, priority string, sameParty bool, sourceScheme string, sourcePort int, partitionKey string) (bool, error)

SetCookie - Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist. name - Cookie name. value - Cookie value. url - The request-URI to associate with the setting of the cookie. This value can affect the default domain, path, source port, and source scheme values of the created cookie. domain - Cookie domain. path - Cookie path. secure - True if cookie is secure. httpOnly - True if cookie is http-only. sameSite - Cookie SameSite type. enum values: Strict, Lax, None expires - Cookie expiration date, session cookie if not set priority - Cookie Priority type. enum values: Low, Medium, High sameParty - True if cookie is SameParty. sourceScheme - Cookie source scheme type. enum values: Unset, NonSecure, Secure sourcePort - Cookie source port. Valid values are {-1, [1, 65535]}, -1 indicates an unspecified port. An unspecified port value allows protocol clients to emulate legacy cookie scope for the port. This is a temporary ability and it will be removed in the future. partitionKey - Cookie partition key. The site of the top-level URL the browser was visiting at the start of the request to the endpoint that set the cookie. If not set, the cookie will be set as not partitioned. Returns - success - Always set to true. If an error occurs, the response indicates protocol error.

func (*Network) SetCookieWithParams

func (c *Network) SetCookieWithParams(ctx context.Context, v *NetworkSetCookieParams) (bool, error)

SetCookieWithParams - Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist. Returns - success - Always set to true. If an error occurs, the response indicates protocol error.

func (*Network) SetCookies

func (c *Network) SetCookies(ctx context.Context, cookies []*NetworkCookieParam) (*gcdmessage.ChromeResponse, error)

SetCookies - Sets given cookies. cookies - Cookies to be set.

func (*Network) SetCookiesWithParams

func (c *Network) SetCookiesWithParams(ctx context.Context, v *NetworkSetCookiesParams) (*gcdmessage.ChromeResponse, error)

SetCookiesWithParams - Sets given cookies.

func (*Network) SetExtraHTTPHeaders

func (c *Network) SetExtraHTTPHeaders(ctx context.Context, headers map[string]interface{}) (*gcdmessage.ChromeResponse, error)

SetExtraHTTPHeaders - Specifies whether to always send extra HTTP headers with the requests from this page. headers - Map with extra HTTP headers.

func (*Network) SetExtraHTTPHeadersWithParams

func (c *Network) SetExtraHTTPHeadersWithParams(ctx context.Context, v *NetworkSetExtraHTTPHeadersParams) (*gcdmessage.ChromeResponse, error)

SetExtraHTTPHeadersWithParams - Specifies whether to always send extra HTTP headers with the requests from this page.

func (*Network) SetRequestInterception

func (c *Network) SetRequestInterception(ctx context.Context, patterns []*NetworkRequestPattern) (*gcdmessage.ChromeResponse, error)

SetRequestInterception - Sets the requests to intercept that match the provided patterns and optionally resource types. Deprecated, please use Fetch.enable instead. patterns - Requests matching any of these patterns will be forwarded and wait for the corresponding continueInterceptedRequest call.

func (*Network) SetRequestInterceptionWithParams

func (c *Network) SetRequestInterceptionWithParams(ctx context.Context, v *NetworkSetRequestInterceptionParams) (*gcdmessage.ChromeResponse, error)

SetRequestInterceptionWithParams - Sets the requests to intercept that match the provided patterns and optionally resource types. Deprecated, please use Fetch.enable instead.

func (*Network) SetUserAgentOverride

func (c *Network) SetUserAgentOverride(ctx context.Context, userAgent string, acceptLanguage string, platform string, userAgentMetadata *EmulationUserAgentMetadata) (*gcdmessage.ChromeResponse, error)

SetUserAgentOverride - Allows overriding user agent with the given string. userAgent - User agent to use. acceptLanguage - Browser langugage to emulate. platform - The platform navigator.platform should return. userAgentMetadata - To be sent in Sec-CH-UA-* headers and returned in navigator.userAgentData

func (*Network) SetUserAgentOverrideWithParams

func (c *Network) SetUserAgentOverrideWithParams(ctx context.Context, v *NetworkSetUserAgentOverrideParams) (*gcdmessage.ChromeResponse, error)

SetUserAgentOverrideWithParams - Allows overriding user agent with the given string.

func (*Network) TakeResponseBodyForInterceptionAsStream

func (c *Network) TakeResponseBodyForInterceptionAsStream(ctx context.Context, interceptionId string) (string, error)

TakeResponseBodyForInterceptionAsStream - Returns a handle to the stream representing the response body. Note that after this command, the intercepted request can't be continued as is -- you either need to cancel it or to provide the response body. The stream only supports sequential read, IO.read will fail if the position is specified. interceptionId - Returns - stream -

func (*Network) TakeResponseBodyForInterceptionAsStreamWithParams

func (c *Network) TakeResponseBodyForInterceptionAsStreamWithParams(ctx context.Context, v *NetworkTakeResponseBodyForInterceptionAsStreamParams) (string, error)

TakeResponseBodyForInterceptionAsStreamWithParams - Returns a handle to the stream representing the response body. Note that after this command, the intercepted request can't be continued as is -- you either need to cancel it or to provide the response body. The stream only supports sequential read, IO.read will fail if the position is specified. Returns - stream -

type NetworkAuthChallenge

type NetworkAuthChallenge struct {
	Source string `json:"source,omitempty"` // Source of the authentication challenge.
	Origin string `json:"origin"`           // Origin of the challenger.
	Scheme string `json:"scheme"`           // The authentication scheme used, such as basic or digest
	Realm  string `json:"realm"`            // The realm of the challenge. May be empty.
}

Authorization challenge for HTTP status code 401 or 407.

type NetworkAuthChallengeResponse

type NetworkAuthChallengeResponse struct {
	Response string `json:"response"`           // The decision on what to do in response to the authorization challenge.  Default means deferring to the default behavior of the net stack, which will likely either the Cancel authentication or display a popup dialog box.
	Username string `json:"username,omitempty"` // The username to provide, possibly empty. Should only be set if response is ProvideCredentials.
	Password string `json:"password,omitempty"` // The password to provide, possibly empty. Should only be set if response is ProvideCredentials.
}

Response to an AuthChallenge.

type NetworkBlockedCookieWithReason

type NetworkBlockedCookieWithReason struct {
	BlockedReasons []string       `json:"blockedReasons"` // The reason(s) the cookie was blocked. enum values: SecureOnly, NotOnPath, DomainMismatch, SameSiteStrict, SameSiteLax, SameSiteUnspecifiedTreatedAsLax, SameSiteNoneInsecure, UserPreferences, ThirdPartyBlockedInFirstPartySet, UnknownError, SchemefulSameSiteStrict, SchemefulSameSiteLax, SchemefulSameSiteUnspecifiedTreatedAsLax, SamePartyFromCrossPartyContext, NameValuePairExceedsMaxSize
	Cookie         *NetworkCookie `json:"cookie"`         // The cookie object representing the cookie which was not sent.
}

A cookie with was not sent with a request with the corresponding reason.

type NetworkBlockedSetCookieWithReason

type NetworkBlockedSetCookieWithReason struct {
	BlockedReasons []string       `json:"blockedReasons"`   // The reason(s) this cookie was blocked. enum values: SecureOnly, SameSiteStrict, SameSiteLax, SameSiteUnspecifiedTreatedAsLax, SameSiteNoneInsecure, UserPreferences, ThirdPartyBlockedInFirstPartySet, SyntaxError, SchemeNotSupported, OverwriteSecure, InvalidDomain, InvalidPrefix, UnknownError, SchemefulSameSiteStrict, SchemefulSameSiteLax, SchemefulSameSiteUnspecifiedTreatedAsLax, SamePartyFromCrossPartyContext, SamePartyConflictsWithOtherAttributes, NameValuePairExceedsMaxSize
	CookieLine     string         `json:"cookieLine"`       // The string representing this individual cookie as it would appear in the header. This is not the entire "cookie" or "set-cookie" header which could have multiple cookies.
	Cookie         *NetworkCookie `json:"cookie,omitempty"` // The cookie object which represents the cookie which was not stored. It is optional because sometimes complete cookie information is not available, such as in the case of parsing errors.
}

A cookie which was not stored from a response with the corresponding reason.

type NetworkCachedResource

type NetworkCachedResource struct {
	Url      string           `json:"url"`                // Resource URL. This is the url of the original network request.
	Type     string           `json:"type"`               // Type of this resource. enum values: Document, Stylesheet, Image, Media, Font, Script, TextTrack, XHR, Fetch, Prefetch, EventSource, WebSocket, Manifest, SignedExchange, Ping, CSPViolationReport, Preflight, Other
	Response *NetworkResponse `json:"response,omitempty"` // Cached response data.
	BodySize float64          `json:"bodySize"`           // Cached response body size.
}

Information about the cached resource.

type NetworkClientSecurityState added in v2.0.7

type NetworkClientSecurityState struct {
	InitiatorIsSecureContext    bool   `json:"initiatorIsSecureContext"`    //
	InitiatorIPAddressSpace     string `json:"initiatorIPAddressSpace"`     //  enum values: Local, Private, Public, Unknown
	PrivateNetworkRequestPolicy string `json:"privateNetworkRequestPolicy"` //  enum values: Allow, BlockFromInsecureToMorePrivate, WarnFromInsecureToMorePrivate, PreflightBlock, PreflightWarn
}

No Description.

type NetworkConnectTiming added in v2.2.4

type NetworkConnectTiming struct {
	RequestTime float64 `json:"requestTime"` // Timing's requestTime is a baseline in seconds, while the other numbers are ticks in milliseconds relatively to this requestTime. Matches ResourceTiming's requestTime for the same request (but not for redirected requests).
}

No Description.

type NetworkContinueInterceptedRequestParams

type NetworkContinueInterceptedRequestParams struct {
	//
	InterceptionId string `json:"interceptionId"`
	// If set this causes the request to fail with the given reason. Passing `Aborted` for requests marked with `isNavigationRequest` also cancels the navigation. Must not be set in response to an authChallenge. enum values: Failed, Aborted, TimedOut, AccessDenied, ConnectionClosed, ConnectionReset, ConnectionRefused, ConnectionAborted, ConnectionFailed, NameNotResolved, InternetDisconnected, AddressUnreachable, BlockedByClient, BlockedByResponse
	ErrorReason string `json:"errorReason,omitempty"`
	// If set the requests completes using with the provided base64 encoded raw response, including HTTP status line and headers etc... Must not be set in response to an authChallenge. (Encoded as a base64 string when passed over JSON)
	RawResponse string `json:"rawResponse,omitempty"`
	// If set the request url will be modified in a way that's not observable by page. Must not be set in response to an authChallenge.
	Url string `json:"url,omitempty"`
	// If set this allows the request method to be overridden. Must not be set in response to an authChallenge.
	Method string `json:"method,omitempty"`
	// If set this allows postData to be set. Must not be set in response to an authChallenge.
	PostData string `json:"postData,omitempty"`
	// If set this allows the request headers to be changed. Must not be set in response to an authChallenge.
	Headers map[string]interface{} `json:"headers,omitempty"`
	// Response to a requestIntercepted with an authChallenge. Must not be set otherwise.
	AuthChallengeResponse *NetworkAuthChallengeResponse `json:"authChallengeResponse,omitempty"`
}

type NetworkCookie

type NetworkCookie struct {
	Name               string  `json:"name"`                         // Cookie name.
	Value              string  `json:"value"`                        // Cookie value.
	Domain             string  `json:"domain"`                       // Cookie domain.
	Path               string  `json:"path"`                         // Cookie path.
	Expires            float64 `json:"expires"`                      // Cookie expiration date as the number of seconds since the UNIX epoch.
	Size               int     `json:"size"`                         // Cookie size.
	HttpOnly           bool    `json:"httpOnly"`                     // True if cookie is http-only.
	Secure             bool    `json:"secure"`                       // True if cookie is secure.
	Session            bool    `json:"session"`                      // True in case of session cookie.
	SameSite           string  `json:"sameSite,omitempty"`           // Cookie SameSite type. enum values: Strict, Lax, None
	Priority           string  `json:"priority"`                     // Cookie Priority enum values: Low, Medium, High
	SameParty          bool    `json:"sameParty"`                    // True if cookie is SameParty.
	SourceScheme       string  `json:"sourceScheme"`                 // Cookie source scheme type. enum values: Unset, NonSecure, Secure
	SourcePort         int     `json:"sourcePort"`                   // Cookie source port. Valid values are {-1, [1, 65535]}, -1 indicates an unspecified port. An unspecified port value allows protocol clients to emulate legacy cookie scope for the port. This is a temporary ability and it will be removed in the future.
	PartitionKey       string  `json:"partitionKey,omitempty"`       // Cookie partition key. The site of the top-level URL the browser was visiting at the start of the request to the endpoint that set the cookie.
	PartitionKeyOpaque bool    `json:"partitionKeyOpaque,omitempty"` // True if cookie partition key is opaque.
}

Cookie object

type NetworkCookieParam

type NetworkCookieParam struct {
	Name         string  `json:"name"`                   // Cookie name.
	Value        string  `json:"value"`                  // Cookie value.
	Url          string  `json:"url,omitempty"`          // The request-URI to associate with the setting of the cookie. This value can affect the default domain, path, source port, and source scheme values of the created cookie.
	Domain       string  `json:"domain,omitempty"`       // Cookie domain.
	Path         string  `json:"path,omitempty"`         // Cookie path.
	Secure       bool    `json:"secure,omitempty"`       // True if cookie is secure.
	HttpOnly     bool    `json:"httpOnly,omitempty"`     // True if cookie is http-only.
	SameSite     string  `json:"sameSite,omitempty"`     // Cookie SameSite type. enum values: Strict, Lax, None
	Expires      float64 `json:"expires,omitempty"`      // Cookie expiration date, session cookie if not set
	Priority     string  `json:"priority,omitempty"`     // Cookie Priority. enum values: Low, Medium, High
	SameParty    bool    `json:"sameParty,omitempty"`    // True if cookie is SameParty.
	SourceScheme string  `json:"sourceScheme,omitempty"` // Cookie source scheme type. enum values: Unset, NonSecure, Secure
	SourcePort   int     `json:"sourcePort,omitempty"`   // Cookie source port. Valid values are {-1, [1, 65535]}, -1 indicates an unspecified port. An unspecified port value allows protocol clients to emulate legacy cookie scope for the port. This is a temporary ability and it will be removed in the future.
	PartitionKey string  `json:"partitionKey,omitempty"` // Cookie partition key. The site of the top-level URL the browser was visiting at the start of the request to the endpoint that set the cookie. If not set, the cookie will be set as not partitioned.
}

Cookie parameter object

type NetworkCorsErrorStatus added in v2.0.7

type NetworkCorsErrorStatus struct {
	CorsError       string `json:"corsError"`       //  enum values: DisallowedByMode, InvalidResponse, WildcardOriginNotAllowed, MissingAllowOriginHeader, MultipleAllowOriginValues, InvalidAllowOriginValue, AllowOriginMismatch, InvalidAllowCredentials, CorsDisabledScheme, PreflightInvalidStatus, PreflightDisallowedRedirect, PreflightWildcardOriginNotAllowed, PreflightMissingAllowOriginHeader, PreflightMultipleAllowOriginValues, PreflightInvalidAllowOriginValue, PreflightAllowOriginMismatch, PreflightInvalidAllowCredentials, PreflightMissingAllowExternal, PreflightInvalidAllowExternal, PreflightMissingAllowPrivateNetwork, PreflightInvalidAllowPrivateNetwork, InvalidAllowMethodsPreflightResponse, InvalidAllowHeadersPreflightResponse, MethodDisallowedByPreflightResponse, HeaderDisallowedByPreflightResponse, RedirectContainsCredentials, InsecurePrivateNetwork, InvalidPrivateNetworkAccess, UnexpectedPrivateNetworkAccess, NoCorsRedirectModeNotFollow
	FailedParameter string `json:"failedParameter"` //
}

No Description.

type NetworkCrossOriginEmbedderPolicyStatus added in v2.0.6

type NetworkCrossOriginEmbedderPolicyStatus struct {
	Value                       string `json:"value"`                                 //  enum values: None, Credentialless, RequireCorp
	ReportOnlyValue             string `json:"reportOnlyValue"`                       //  enum values: None, Credentialless, RequireCorp
	ReportingEndpoint           string `json:"reportingEndpoint,omitempty"`           //
	ReportOnlyReportingEndpoint string `json:"reportOnlyReportingEndpoint,omitempty"` //
}

No Description.

type NetworkCrossOriginOpenerPolicyStatus added in v2.0.6

type NetworkCrossOriginOpenerPolicyStatus struct {
	Value                       string `json:"value"`                                 //  enum values: SameOrigin, SameOriginAllowPopups, RestrictProperties, UnsafeNone, SameOriginPlusCoep, RestrictPropertiesPlusCoep
	ReportOnlyValue             string `json:"reportOnlyValue"`                       //  enum values: SameOrigin, SameOriginAllowPopups, RestrictProperties, UnsafeNone, SameOriginPlusCoep, RestrictPropertiesPlusCoep
	ReportingEndpoint           string `json:"reportingEndpoint,omitempty"`           //
	ReportOnlyReportingEndpoint string `json:"reportOnlyReportingEndpoint,omitempty"` //
}

No Description.

type NetworkDataReceivedEvent

type NetworkDataReceivedEvent struct {
	Method string `json:"method"`
	Params struct {
		RequestId         string  `json:"requestId"`         // Request identifier.
		Timestamp         float64 `json:"timestamp"`         // Timestamp.
		DataLength        int     `json:"dataLength"`        // Data chunk length.
		EncodedDataLength int     `json:"encodedDataLength"` // Actual bytes received (might be less than dataLength for compressed encodings).
	} `json:"Params,omitempty"`
}

Fired when data chunk was received over the network.

type NetworkDeleteCookiesParams

type NetworkDeleteCookiesParams struct {
	// Name of the cookies to remove.
	Name string `json:"name"`
	// If specified, deletes all the cookies with the given name where domain and path match provided URL.
	Url string `json:"url,omitempty"`
	// If specified, deletes only cookies with the exact domain.
	Domain string `json:"domain,omitempty"`
	// If specified, deletes only cookies with the exact path.
	Path string `json:"path,omitempty"`
}

type NetworkEmulateNetworkConditionsParams

type NetworkEmulateNetworkConditionsParams struct {
	// True to emulate internet disconnection.
	Offline bool `json:"offline"`
	// Minimum latency from request sent to response headers received (ms).
	Latency float64 `json:"latency"`
	// Maximal aggregated download throughput (bytes/sec). -1 disables download throttling.
	DownloadThroughput float64 `json:"downloadThroughput"`
	// Maximal aggregated upload throughput (bytes/sec).  -1 disables upload throttling.
	UploadThroughput float64 `json:"uploadThroughput"`
	// Connection type if known. enum values: none, cellular2g, cellular3g, cellular4g, bluetooth, ethernet, wifi, wimax, other
	ConnectionType string `json:"connectionType,omitempty"`
}

type NetworkEnableParams

type NetworkEnableParams struct {
	// Buffer size in bytes to use when preserving network payloads (XHRs, etc).
	MaxTotalBufferSize int `json:"maxTotalBufferSize,omitempty"`
	// Per-resource buffer size in bytes to use when preserving network payloads (XHRs, etc).
	MaxResourceBufferSize int `json:"maxResourceBufferSize,omitempty"`
	// Longest post body size (in bytes) that would be included in requestWillBeSent notification
	MaxPostDataSize int `json:"maxPostDataSize,omitempty"`
}

type NetworkEnableReportingApiParams added in v2.2.4

type NetworkEnableReportingApiParams struct {
	// Whether to enable or disable events for the Reporting API
	Enable bool `json:"enable"`
}

type NetworkEventSourceMessageReceivedEvent

type NetworkEventSourceMessageReceivedEvent struct {
	Method string `json:"method"`
	Params struct {
		RequestId string  `json:"requestId"` // Request identifier.
		Timestamp float64 `json:"timestamp"` // Timestamp.
		EventName string  `json:"eventName"` // Message type.
		EventId   string  `json:"eventId"`   // Message identifier.
		Data      string  `json:"data"`      // Message content.
	} `json:"Params,omitempty"`
}

Fired when EventSource message is received.

type NetworkGetCertificateParams

type NetworkGetCertificateParams struct {
	// Origin to get certificate for.
	Origin string `json:"origin"`
}

type NetworkGetCookiesParams

type NetworkGetCookiesParams struct {
	// The list of URLs for which applicable cookies will be fetched. If not specified, it's assumed to be set to the list containing the URLs of the page and all of its subframes.
	Urls []string `json:"urls,omitempty"`
}

type NetworkGetRequestPostDataParams

type NetworkGetRequestPostDataParams struct {
	// Identifier of the network request to get content for.
	RequestId string `json:"requestId"`
}

type NetworkGetResponseBodyForInterceptionParams

type NetworkGetResponseBodyForInterceptionParams struct {
	// Identifier for the intercepted request to get body for.
	InterceptionId string `json:"interceptionId"`
}

type NetworkGetResponseBodyParams

type NetworkGetResponseBodyParams struct {
	// Identifier of the network request to get content for.
	RequestId string `json:"requestId"`
}

type NetworkGetSecurityIsolationStatusParams added in v2.0.6

type NetworkGetSecurityIsolationStatusParams struct {
	// If no frameId is provided, the status of the target is provided.
	FrameId string `json:"frameId,omitempty"`
}

type NetworkInitiator

type NetworkInitiator struct {
	Type         string             `json:"type"`                   // Type of this initiator.
	Stack        *RuntimeStackTrace `json:"stack,omitempty"`        // Initiator JavaScript stack trace, set for Script only.
	Url          string             `json:"url,omitempty"`          // Initiator URL, set for Parser type or for Script type (when script is importing module) or for SignedExchange type.
	LineNumber   float64            `json:"lineNumber,omitempty"`   // Initiator line number, set for Parser type or for Script type (when script is importing module) (0-based).
	ColumnNumber float64            `json:"columnNumber,omitempty"` // Initiator column number, set for Parser type or for Script type (when script is importing module) (0-based).
	RequestId    string             `json:"requestId,omitempty"`    // Set if another request triggered this request (e.g. preflight).
}

Information about the request initiator.

type NetworkLoadNetworkResourceOptions added in v2.0.7

type NetworkLoadNetworkResourceOptions struct {
	DisableCache       bool `json:"disableCache"`       //
	IncludeCredentials bool `json:"includeCredentials"` //
}

An options object that may be extended later to better support CORS, CORB and streaming.

type NetworkLoadNetworkResourcePageResult added in v2.0.7

type NetworkLoadNetworkResourcePageResult struct {
	Success        bool                   `json:"success"`                  //
	NetError       float64                `json:"netError,omitempty"`       // Optional values used for error reporting.
	NetErrorName   string                 `json:"netErrorName,omitempty"`   //
	HttpStatusCode float64                `json:"httpStatusCode,omitempty"` //
	Stream         string                 `json:"stream,omitempty"`         // If successful, one of the following two fields holds the result.
	Headers        map[string]interface{} `json:"headers,omitempty"`        // Response headers.
}

An object providing the result of a network resource load.

type NetworkLoadNetworkResourceParams added in v2.0.7

type NetworkLoadNetworkResourceParams struct {
	// Frame id to get the resource for. Mandatory for frame targets, and should be omitted for worker targets.
	FrameId string `json:"frameId,omitempty"`
	// URL of the resource to get content for.
	Url string `json:"url"`
	// Options for the request.
	Options *NetworkLoadNetworkResourceOptions `json:"options"`
}

type NetworkLoadingFailedEvent

type NetworkLoadingFailedEvent struct {
	Method string `json:"method"`
	Params struct {
		RequestId       string                  `json:"requestId"`                 // Request identifier.
		Timestamp       float64                 `json:"timestamp"`                 // Timestamp.
		Type            string                  `json:"type"`                      // Resource type. enum values: Document, Stylesheet, Image, Media, Font, Script, TextTrack, XHR, Fetch, Prefetch, EventSource, WebSocket, Manifest, SignedExchange, Ping, CSPViolationReport, Preflight, Other
		ErrorText       string                  `json:"errorText"`                 // User friendly error message.
		Canceled        bool                    `json:"canceled,omitempty"`        // True if loading was canceled.
		BlockedReason   string                  `json:"blockedReason,omitempty"`   // The reason why loading was blocked, if any. enum values: other, csp, mixed-content, origin, inspector, subresource-filter, content-type, coep-frame-resource-needs-coep-header, coop-sandboxed-iframe-cannot-navigate-to-coop-page, corp-not-same-origin, corp-not-same-origin-after-defaulted-to-same-origin-by-coep, corp-not-same-site
		CorsErrorStatus *NetworkCorsErrorStatus `json:"corsErrorStatus,omitempty"` // The reason why loading was blocked by CORS, if any.
	} `json:"Params,omitempty"`
}

Fired when HTTP request has failed to load.

type NetworkLoadingFinishedEvent

type NetworkLoadingFinishedEvent struct {
	Method string `json:"method"`
	Params struct {
		RequestId                string  `json:"requestId"`                          // Request identifier.
		Timestamp                float64 `json:"timestamp"`                          // Timestamp.
		EncodedDataLength        float64 `json:"encodedDataLength"`                  // Total number of bytes received for this request.
		ShouldReportCorbBlocking bool    `json:"shouldReportCorbBlocking,omitempty"` // Set when 1) response was blocked by Cross-Origin Read Blocking and also 2) this needs to be reported to the DevTools console.
	} `json:"Params,omitempty"`
}

Fired when HTTP request has finished loading.

type NetworkPostDataEntry

type NetworkPostDataEntry struct {
	Bytes string `json:"bytes,omitempty"` //
}

Post data entry for HTTP request

type NetworkReplayXHRParams

type NetworkReplayXHRParams struct {
	// Identifier of XHR to replay.
	RequestId string `json:"requestId"`
}

type NetworkReportingApiEndpoint added in v2.2.4

type NetworkReportingApiEndpoint struct {
	Url       string `json:"url"`       // The URL of the endpoint to which reports may be delivered.
	GroupName string `json:"groupName"` // Name of the endpoint group.
}

No Description.

type NetworkReportingApiEndpointsChangedForOriginEvent added in v2.2.4

type NetworkReportingApiEndpointsChangedForOriginEvent struct {
	Method string `json:"method"`
	Params struct {
		Origin    string                         `json:"origin"`    // Origin of the document(s) which configured the endpoints.
		Endpoints []*NetworkReportingApiEndpoint `json:"endpoints"` //
	} `json:"Params,omitempty"`
}

type NetworkReportingApiReport added in v2.2.4

type NetworkReportingApiReport struct {
	Id                string                 `json:"id"`                //
	InitiatorUrl      string                 `json:"initiatorUrl"`      // The URL of the document that triggered the report.
	Destination       string                 `json:"destination"`       // The name of the endpoint group that should be used to deliver the report.
	Type              string                 `json:"type"`              // The type of the report (specifies the set of data that is contained in the report body).
	Timestamp         float64                `json:"timestamp"`         // When the report was generated.
	Depth             int                    `json:"depth"`             // How many uploads deep the related request was.
	CompletedAttempts int                    `json:"completedAttempts"` // The number of delivery attempts made so far, not including an active attempt.
	Body              map[string]interface{} `json:"body"`              //
	Status            string                 `json:"status"`            //  enum values: Queued, Pending, MarkedForRemoval, Success
}

An object representing a report generated by the Reporting API.

type NetworkReportingApiReportAddedEvent added in v2.2.4

type NetworkReportingApiReportAddedEvent struct {
	Method string `json:"method"`
	Params struct {
		Report *NetworkReportingApiReport `json:"report"` //
	} `json:"Params,omitempty"`
}

Is sent whenever a new report is added. And after 'enableReportingApi' for all existing reports.

type NetworkReportingApiReportUpdatedEvent added in v2.2.4

type NetworkReportingApiReportUpdatedEvent struct {
	Method string `json:"method"`
	Params struct {
		Report *NetworkReportingApiReport `json:"report"` //
	} `json:"Params,omitempty"`
}

type NetworkRequest

type NetworkRequest struct {
	Url              string                   `json:"url"`                        // Request URL (without fragment).
	UrlFragment      string                   `json:"urlFragment,omitempty"`      // Fragment of the requested URL starting with hash, if present.
	Method           string                   `json:"method"`                     // HTTP request method.
	Headers          map[string]interface{}   `json:"headers"`                    // HTTP request headers.
	PostData         string                   `json:"postData,omitempty"`         // HTTP POST request data.
	HasPostData      bool                     `json:"hasPostData,omitempty"`      // True when the request has POST data. Note that postData might still be omitted when this flag is true when the data is too long.
	PostDataEntries  []*NetworkPostDataEntry  `json:"postDataEntries,omitempty"`  // Request body elements. This will be converted from base64 to binary
	MixedContentType string                   `json:"mixedContentType,omitempty"` // The mixed content type of the request. enum values: blockable, optionally-blockable, none
	InitialPriority  string                   `json:"initialPriority"`            // Priority of the resource request at the time request is sent. enum values: VeryLow, Low, Medium, High, VeryHigh
	ReferrerPolicy   string                   `json:"referrerPolicy"`             // The referrer policy of the request, as defined in https://www.w3.org/TR/referrer-policy/
	IsLinkPreload    bool                     `json:"isLinkPreload,omitempty"`    // Whether is loaded via link preload.
	TrustTokenParams *NetworkTrustTokenParams `json:"trustTokenParams,omitempty"` // Set for requests when the TrustToken API is used. Contains the parameters passed by the developer (e.g. via "fetch") as understood by the backend.
	IsSameSite       bool                     `json:"isSameSite,omitempty"`       // True if this resource request is considered to be the 'same site' as the request correspondinfg to the main frame.
}

HTTP request data.

type NetworkRequestInterceptedEvent

type NetworkRequestInterceptedEvent struct {
	Method string `json:"method"`
	Params struct {
		InterceptionId      string                 `json:"interceptionId"`                // Each request the page makes will have a unique id, however if any redirects are encountered while processing that fetch, they will be reported with the same id as the original fetch. Likewise if HTTP authentication is needed then the same fetch id will be used.
		Request             *NetworkRequest        `json:"request"`                       //
		FrameId             string                 `json:"frameId"`                       // The id of the frame that initiated the request.
		ResourceType        string                 `json:"resourceType"`                  // How the requested resource will be used. enum values: Document, Stylesheet, Image, Media, Font, Script, TextTrack, XHR, Fetch, Prefetch, EventSource, WebSocket, Manifest, SignedExchange, Ping, CSPViolationReport, Preflight, Other
		IsNavigationRequest bool                   `json:"isNavigationRequest"`           // Whether this is a navigation request, which can abort the navigation completely.
		IsDownload          bool                   `json:"isDownload,omitempty"`          // Set if the request is a navigation that will result in a download. Only present after response is received from the server (i.e. HeadersReceived stage).
		RedirectUrl         string                 `json:"redirectUrl,omitempty"`         // Redirect location, only sent if a redirect was intercepted.
		AuthChallenge       *NetworkAuthChallenge  `json:"authChallenge,omitempty"`       // Details of the Authorization Challenge encountered. If this is set then continueInterceptedRequest must contain an authChallengeResponse.
		ResponseErrorReason string                 `json:"responseErrorReason,omitempty"` // Response error if intercepted at response stage or if redirect occurred while intercepting request. enum values: Failed, Aborted, TimedOut, AccessDenied, ConnectionClosed, ConnectionReset, ConnectionRefused, ConnectionAborted, ConnectionFailed, NameNotResolved, InternetDisconnected, AddressUnreachable, BlockedByClient, BlockedByResponse
		ResponseStatusCode  int                    `json:"responseStatusCode,omitempty"`  // Response code if intercepted at response stage or if redirect occurred while intercepting request or auth retry occurred.
		ResponseHeaders     map[string]interface{} `json:"responseHeaders,omitempty"`     // Response headers if intercepted at the response stage or if redirect occurred while intercepting request or auth retry occurred.
		RequestId           string                 `json:"requestId,omitempty"`           // If the intercepted request had a corresponding requestWillBeSent event fired for it, then this requestId will be the same as the requestId present in the requestWillBeSent event.
	} `json:"Params,omitempty"`
}

Details of an intercepted HTTP request, which must be either allowed, blocked, modified or mocked. Deprecated, use Fetch.requestPaused instead.

type NetworkRequestPattern

type NetworkRequestPattern struct {
	UrlPattern        string `json:"urlPattern,omitempty"`        // Wildcards (`'*'` -> zero or more, `'?'` -> exactly one) are allowed. Escape character is backslash. Omitting is equivalent to `"*"`.
	ResourceType      string `json:"resourceType,omitempty"`      // If set, only requests for matching resource types will be intercepted. enum values: Document, Stylesheet, Image, Media, Font, Script, TextTrack, XHR, Fetch, Prefetch, EventSource, WebSocket, Manifest, SignedExchange, Ping, CSPViolationReport, Preflight, Other
	InterceptionStage string `json:"interceptionStage,omitempty"` // Stage at which to begin intercepting requests. Default is Request. enum values: Request, HeadersReceived
}

Request pattern for interception.

type NetworkRequestServedFromCacheEvent

type NetworkRequestServedFromCacheEvent struct {
	Method string `json:"method"`
	Params struct {
		RequestId string `json:"requestId"` // Request identifier.
	} `json:"Params,omitempty"`
}

Fired if request ended up loading from cache.

type NetworkRequestWillBeSentEvent

type NetworkRequestWillBeSentEvent struct {
	Method string `json:"method"`
	Params struct {
		RequestId            string            `json:"requestId"`                  // Request identifier.
		LoaderId             string            `json:"loaderId"`                   // Loader identifier. Empty string if the request is fetched from worker.
		DocumentURL          string            `json:"documentURL"`                // URL of the document this request is loaded for.
		Request              *NetworkRequest   `json:"request"`                    // Request data.
		Timestamp            float64           `json:"timestamp"`                  // Timestamp.
		WallTime             float64           `json:"wallTime"`                   // Timestamp.
		Initiator            *NetworkInitiator `json:"initiator"`                  // Request initiator.
		RedirectHasExtraInfo bool              `json:"redirectHasExtraInfo"`       // In the case that redirectResponse is populated, this flag indicates whether requestWillBeSentExtraInfo and responseReceivedExtraInfo events will be or were emitted for the request which was just redirected.
		RedirectResponse     *NetworkResponse  `json:"redirectResponse,omitempty"` // Redirect response data.
		Type                 string            `json:"type,omitempty"`             // Type of this resource. enum values: Document, Stylesheet, Image, Media, Font, Script, TextTrack, XHR, Fetch, Prefetch, EventSource, WebSocket, Manifest, SignedExchange, Ping, CSPViolationReport, Preflight, Other
		FrameId              string            `json:"frameId,omitempty"`          // Frame identifier.
		HasUserGesture       bool              `json:"hasUserGesture,omitempty"`   // Whether the request is initiated by a user gesture. Defaults to false.
	} `json:"Params,omitempty"`
}

Fired when page is about to send HTTP request.

type NetworkRequestWillBeSentExtraInfoEvent

type NetworkRequestWillBeSentExtraInfoEvent struct {
	Method string `json:"method"`
	Params struct {
		RequestId                     string                            `json:"requestId"`                               // Request identifier. Used to match this information to an existing requestWillBeSent event.
		AssociatedCookies             []*NetworkBlockedCookieWithReason `json:"associatedCookies"`                       // A list of cookies potentially associated to the requested URL. This includes both cookies sent with the request and the ones not sent; the latter are distinguished by having blockedReason field set.
		Headers                       map[string]interface{}            `json:"headers"`                                 // Raw request headers as they will be sent over the wire.
		ConnectTiming                 *NetworkConnectTiming             `json:"connectTiming"`                           // Connection timing information for the request.
		ClientSecurityState           *NetworkClientSecurityState       `json:"clientSecurityState,omitempty"`           // The client security state set for the request.
		SiteHasCookieInOtherPartition bool                              `json:"siteHasCookieInOtherPartition,omitempty"` // Whether the site has partitioned cookies stored in a partition different than the current one.
	} `json:"Params,omitempty"`
}

Fired when additional information about a requestWillBeSent event is available from the network stack. Not every requestWillBeSent event will have an additional requestWillBeSentExtraInfo fired for it, and there is no guarantee whether requestWillBeSent or requestWillBeSentExtraInfo will be fired first for the same request.

type NetworkResourceChangedPriorityEvent

type NetworkResourceChangedPriorityEvent struct {
	Method string `json:"method"`
	Params struct {
		RequestId   string  `json:"requestId"`   // Request identifier.
		NewPriority string  `json:"newPriority"` // New priority enum values: VeryLow, Low, Medium, High, VeryHigh
		Timestamp   float64 `json:"timestamp"`   // Timestamp.
	} `json:"Params,omitempty"`
}

Fired when resource loading priority is changed

type NetworkResourceTiming

type NetworkResourceTiming struct {
	RequestTime              float64 `json:"requestTime"`              // Timing's requestTime is a baseline in seconds, while the other numbers are ticks in milliseconds relatively to this requestTime.
	ProxyStart               float64 `json:"proxyStart"`               // Started resolving proxy.
	ProxyEnd                 float64 `json:"proxyEnd"`                 // Finished resolving proxy.
	DnsStart                 float64 `json:"dnsStart"`                 // Started DNS address resolve.
	DnsEnd                   float64 `json:"dnsEnd"`                   // Finished DNS address resolve.
	ConnectStart             float64 `json:"connectStart"`             // Started connecting to the remote host.
	ConnectEnd               float64 `json:"connectEnd"`               // Connected to the remote host.
	SslStart                 float64 `json:"sslStart"`                 // Started SSL handshake.
	SslEnd                   float64 `json:"sslEnd"`                   // Finished SSL handshake.
	WorkerStart              float64 `json:"workerStart"`              // Started running ServiceWorker.
	WorkerReady              float64 `json:"workerReady"`              // Finished Starting ServiceWorker.
	WorkerFetchStart         float64 `json:"workerFetchStart"`         // Started fetch event.
	WorkerRespondWithSettled float64 `json:"workerRespondWithSettled"` // Settled fetch event respondWith promise.
	SendStart                float64 `json:"sendStart"`                // Started sending request.
	SendEnd                  float64 `json:"sendEnd"`                  // Finished sending request.
	PushStart                float64 `json:"pushStart"`                // Time the server started pushing request.
	PushEnd                  float64 `json:"pushEnd"`                  // Time the server finished pushing request.
	ReceiveHeadersEnd        float64 `json:"receiveHeadersEnd"`        // Finished receiving response headers.
}

Timing information for the request.

type NetworkResponse

type NetworkResponse struct {
	Url                         string                  `json:"url"`                                   // Response URL. This URL can be different from CachedResource.url in case of redirect.
	Status                      int                     `json:"status"`                                // HTTP response status code.
	StatusText                  string                  `json:"statusText"`                            // HTTP response status text.
	Headers                     map[string]interface{}  `json:"headers"`                               // HTTP response headers.
	HeadersText                 string                  `json:"headersText,omitempty"`                 // HTTP response headers text. This has been replaced by the headers in Network.responseReceivedExtraInfo.
	MimeType                    string                  `json:"mimeType"`                              // Resource mimeType as determined by the browser.
	RequestHeaders              map[string]interface{}  `json:"requestHeaders,omitempty"`              // Refined HTTP request headers that were actually transmitted over the network.
	RequestHeadersText          string                  `json:"requestHeadersText,omitempty"`          // HTTP request headers text. This has been replaced by the headers in Network.requestWillBeSentExtraInfo.
	ConnectionReused            bool                    `json:"connectionReused"`                      // Specifies whether physical connection was actually reused for this request.
	ConnectionId                float64                 `json:"connectionId"`                          // Physical connection id that was actually used for this request.
	RemoteIPAddress             string                  `json:"remoteIPAddress,omitempty"`             // Remote IP address.
	RemotePort                  int                     `json:"remotePort,omitempty"`                  // Remote port.
	FromDiskCache               bool                    `json:"fromDiskCache,omitempty"`               // Specifies that the request was served from the disk cache.
	FromServiceWorker           bool                    `json:"fromServiceWorker,omitempty"`           // Specifies that the request was served from the ServiceWorker.
	FromPrefetchCache           bool                    `json:"fromPrefetchCache,omitempty"`           // Specifies that the request was served from the prefetch cache.
	EncodedDataLength           float64                 `json:"encodedDataLength"`                     // Total number of bytes received for this request so far.
	Timing                      *NetworkResourceTiming  `json:"timing,omitempty"`                      // Timing information for the given request.
	ServiceWorkerResponseSource string                  `json:"serviceWorkerResponseSource,omitempty"` // Response source of response from ServiceWorker. enum values: cache-storage, http-cache, fallback-code, network
	ResponseTime                float64                 `json:"responseTime,omitempty"`                // The time at which the returned response was generated.
	CacheStorageCacheName       string                  `json:"cacheStorageCacheName,omitempty"`       // Cache Storage Cache Name.
	Protocol                    string                  `json:"protocol,omitempty"`                    // Protocol used to fetch this request.
	AlternateProtocolUsage      string                  `json:"alternateProtocolUsage,omitempty"`      // The reason why Chrome uses a specific transport protocol for HTTP semantics. enum values: alternativeJobWonWithoutRace, alternativeJobWonRace, mainJobWonRace, mappingMissing, broken, dnsAlpnH3JobWonWithoutRace, dnsAlpnH3JobWonRace, unspecifiedReason
	SecurityState               string                  `json:"securityState"`                         // Security state of the request resource. enum values: unknown, neutral, insecure, secure, info, insecure-broken
	SecurityDetails             *NetworkSecurityDetails `json:"securityDetails,omitempty"`             // Security details for the request.
}

HTTP response data.

type NetworkResponseReceivedEvent

type NetworkResponseReceivedEvent struct {
	Method string `json:"method"`
	Params struct {
		RequestId    string           `json:"requestId"`         // Request identifier.
		LoaderId     string           `json:"loaderId"`          // Loader identifier. Empty string if the request is fetched from worker.
		Timestamp    float64          `json:"timestamp"`         // Timestamp.
		Type         string           `json:"type"`              // Resource type. enum values: Document, Stylesheet, Image, Media, Font, Script, TextTrack, XHR, Fetch, Prefetch, EventSource, WebSocket, Manifest, SignedExchange, Ping, CSPViolationReport, Preflight, Other
		Response     *NetworkResponse `json:"response"`          // Response data.
		HasExtraInfo bool             `json:"hasExtraInfo"`      // Indicates whether requestWillBeSentExtraInfo and responseReceivedExtraInfo events will be or were emitted for this request.
		FrameId      string           `json:"frameId,omitempty"` // Frame identifier.
	} `json:"Params,omitempty"`
}

Fired when HTTP response is available.

type NetworkResponseReceivedExtraInfoEvent

type NetworkResponseReceivedExtraInfoEvent struct {
	Method string `json:"method"`
	Params struct {
		RequestId                string                               `json:"requestId"`                          // Request identifier. Used to match this information to another responseReceived event.
		BlockedCookies           []*NetworkBlockedSetCookieWithReason `json:"blockedCookies"`                     // A list of cookies which were not stored from the response along with the corresponding reasons for blocking. The cookies here may not be valid due to syntax errors, which are represented by the invalid cookie line string instead of a proper cookie.
		Headers                  map[string]interface{}               `json:"headers"`                            // Raw response headers as they were received over the wire.
		ResourceIPAddressSpace   string                               `json:"resourceIPAddressSpace"`             // The IP address space of the resource. The address space can only be determined once the transport established the connection, so we can't send it in `requestWillBeSentExtraInfo`. enum values: Local, Private, Public, Unknown
		StatusCode               int                                  `json:"statusCode"`                         // The status code of the response. This is useful in cases the request failed and no responseReceived event is triggered, which is the case for, e.g., CORS errors. This is also the correct status code for cached requests, where the status in responseReceived is a 200 and this will be 304.
		HeadersText              string                               `json:"headersText,omitempty"`              // Raw response header text as it was received over the wire. The raw text may not always be available, such as in the case of HTTP/2 or QUIC.
		CookiePartitionKey       string                               `json:"cookiePartitionKey,omitempty"`       // The cookie partition key that will be used to store partitioned cookies set in this response. Only sent when partitioned cookies are enabled.
		CookiePartitionKeyOpaque bool                                 `json:"cookiePartitionKeyOpaque,omitempty"` // True if partitioned cookies are enabled, but the partition key is not serializeable to string.
	} `json:"Params,omitempty"`
}

Fired when additional information about a responseReceived event is available from the network stack. Not every responseReceived event will have an additional responseReceivedExtraInfo for it, and responseReceivedExtraInfo may be fired before or after responseReceived.

type NetworkSearchInResponseBodyParams

type NetworkSearchInResponseBodyParams struct {
	// Identifier of the network response to search.
	RequestId string `json:"requestId"`
	// String to search for.
	Query string `json:"query"`
	// If true, search is case sensitive.
	CaseSensitive bool `json:"caseSensitive,omitempty"`
	// If true, treats string parameter as regex.
	IsRegex bool `json:"isRegex,omitempty"`
}

type NetworkSecurityDetails

type NetworkSecurityDetails struct {
	Protocol                          string                               `json:"protocol"`                           // Protocol name (e.g. "TLS 1.2" or "QUIC").
	KeyExchange                       string                               `json:"keyExchange"`                        // Key Exchange used by the connection, or the empty string if not applicable.
	KeyExchangeGroup                  string                               `json:"keyExchangeGroup,omitempty"`         // (EC)DH group used by the connection, if applicable.
	Cipher                            string                               `json:"cipher"`                             // Cipher name.
	Mac                               string                               `json:"mac,omitempty"`                      // TLS MAC. Note that AEAD ciphers do not have separate MACs.
	CertificateId                     int                                  `json:"certificateId"`                      // Certificate ID value.
	SubjectName                       string                               `json:"subjectName"`                        // Certificate subject name.
	SanList                           []string                             `json:"sanList"`                            // Subject Alternative Name (SAN) DNS names and IP addresses.
	Issuer                            string                               `json:"issuer"`                             // Name of the issuing CA.
	ValidFrom                         float64                              `json:"validFrom"`                          // Certificate valid from date.
	ValidTo                           float64                              `json:"validTo"`                            // Certificate valid to (expiration) date
	SignedCertificateTimestampList    []*NetworkSignedCertificateTimestamp `json:"signedCertificateTimestampList"`     // List of signed certificate timestamps (SCTs).
	CertificateTransparencyCompliance string                               `json:"certificateTransparencyCompliance"`  // Whether the request complied with Certificate Transparency policy enum values: unknown, not-compliant, compliant
	ServerSignatureAlgorithm          int                                  `json:"serverSignatureAlgorithm,omitempty"` // The signature algorithm used by the server in the TLS server signature, represented as a TLS SignatureScheme code point. Omitted if not applicable or not known.
	EncryptedClientHello              bool                                 `json:"encryptedClientHello"`               // Whether the connection used Encrypted ClientHello
}

Security details about a request.

type NetworkSecurityIsolationStatus added in v2.0.6

type NetworkSecurityIsolationStatus struct {
	Coop *NetworkCrossOriginOpenerPolicyStatus   `json:"coop,omitempty"` //
	Coep *NetworkCrossOriginEmbedderPolicyStatus `json:"coep,omitempty"` //
}

No Description.

type NetworkSetAcceptedEncodingsParams added in v2.1.1

type NetworkSetAcceptedEncodingsParams struct {
	// List of accepted content encodings. enum values: deflate, gzip, br
	Encodings []string `json:"encodings"`
}

type NetworkSetAttachDebugStackParams added in v2.0.7

type NetworkSetAttachDebugStackParams struct {
	// Whether to attach a page script stack for debugging purpose.
	Enabled bool `json:"enabled"`
}

type NetworkSetBlockedURLsParams

type NetworkSetBlockedURLsParams struct {
	// URL patterns to block. Wildcards ('*') are allowed.
	Urls []string `json:"urls"`
}

type NetworkSetBypassServiceWorkerParams

type NetworkSetBypassServiceWorkerParams struct {
	// Bypass service worker and load from network.
	Bypass bool `json:"bypass"`
}

type NetworkSetCacheDisabledParams

type NetworkSetCacheDisabledParams struct {
	// Cache disabled state.
	CacheDisabled bool `json:"cacheDisabled"`
}

type NetworkSetCookieParams

type NetworkSetCookieParams struct {
	// Cookie name.
	Name string `json:"name"`
	// Cookie value.
	Value string `json:"value"`
	// The request-URI to associate with the setting of the cookie. This value can affect the default domain, path, source port, and source scheme values of the created cookie.
	Url string `json:"url,omitempty"`
	// Cookie domain.
	Domain string `json:"domain,omitempty"`
	// Cookie path.
	Path string `json:"path,omitempty"`
	// True if cookie is secure.
	Secure bool `json:"secure,omitempty"`
	// True if cookie is http-only.
	HttpOnly bool `json:"httpOnly,omitempty"`
	// Cookie SameSite type. enum values: Strict, Lax, None
	SameSite string `json:"sameSite,omitempty"`
	// Cookie expiration date, session cookie if not set
	Expires float64 `json:"expires,omitempty"`
	// Cookie Priority type. enum values: Low, Medium, High
	Priority string `json:"priority,omitempty"`
	// True if cookie is SameParty.
	SameParty bool `json:"sameParty,omitempty"`
	// Cookie source scheme type. enum values: Unset, NonSecure, Secure
	SourceScheme string `json:"sourceScheme,omitempty"`
	// Cookie source port. Valid values are {-1, [1, 65535]}, -1 indicates an unspecified port. An unspecified port value allows protocol clients to emulate legacy cookie scope for the port. This is a temporary ability and it will be removed in the future.
	SourcePort int `json:"sourcePort,omitempty"`
	// Cookie partition key. The site of the top-level URL the browser was visiting at the start of the request to the endpoint that set the cookie. If not set, the cookie will be set as not partitioned.
	PartitionKey string `json:"partitionKey,omitempty"`
}

type NetworkSetCookiesParams

type NetworkSetCookiesParams struct {
	// Cookies to be set.
	Cookies []*NetworkCookieParam `json:"cookies"`
}

type NetworkSetExtraHTTPHeadersParams

type NetworkSetExtraHTTPHeadersParams struct {
	// Map with extra HTTP headers.
	Headers map[string]interface{} `json:"headers"`
}

type NetworkSetRequestInterceptionParams

type NetworkSetRequestInterceptionParams struct {
	// Requests matching any of these patterns will be forwarded and wait for the corresponding continueInterceptedRequest call.
	Patterns []*NetworkRequestPattern `json:"patterns"`
}

type NetworkSetUserAgentOverrideParams

type NetworkSetUserAgentOverrideParams struct {
	// User agent to use.
	UserAgent string `json:"userAgent"`
	// Browser langugage to emulate.
	AcceptLanguage string `json:"acceptLanguage,omitempty"`
	// The platform navigator.platform should return.
	Platform string `json:"platform,omitempty"`
	// To be sent in Sec-CH-UA-* headers and returned in navigator.userAgentData
	UserAgentMetadata *EmulationUserAgentMetadata `json:"userAgentMetadata,omitempty"`
}

type NetworkSignedCertificateTimestamp

type NetworkSignedCertificateTimestamp struct {
	Status             string  `json:"status"`             // Validation status.
	Origin             string  `json:"origin"`             // Origin.
	LogDescription     string  `json:"logDescription"`     // Log name / description.
	LogId              string  `json:"logId"`              // Log ID.
	Timestamp          float64 `json:"timestamp"`          // Issuance date. Unlike TimeSinceEpoch, this contains the number of milliseconds since January 1, 1970, UTC, not the number of seconds.
	HashAlgorithm      string  `json:"hashAlgorithm"`      // Hash algorithm.
	SignatureAlgorithm string  `json:"signatureAlgorithm"` // Signature algorithm.
	SignatureData      string  `json:"signatureData"`      // Signature data.
}

Details of a signed certificate timestamp (SCT).

type NetworkSignedExchangeError

type NetworkSignedExchangeError struct {
	Message        string `json:"message"`                  // Error message.
	SignatureIndex int    `json:"signatureIndex,omitempty"` // The index of the signature which caused the error.
	ErrorField     string `json:"errorField,omitempty"`     // The field which caused the error. enum values: signatureSig, signatureIntegrity, signatureCertUrl, signatureCertSha256, signatureValidityUrl, signatureTimestamps
}

Information about a signed exchange response.

type NetworkSignedExchangeHeader

type NetworkSignedExchangeHeader struct {
	RequestUrl      string                            `json:"requestUrl"`      // Signed exchange request URL.
	ResponseCode    int                               `json:"responseCode"`    // Signed exchange response code.
	ResponseHeaders map[string]interface{}            `json:"responseHeaders"` // Signed exchange response headers.
	Signatures      []*NetworkSignedExchangeSignature `json:"signatures"`      // Signed exchange response signature.
	HeaderIntegrity string                            `json:"headerIntegrity"` // Signed exchange header integrity hash in the form of "sha256-<base64-hash-value>".
}

Information about a signed exchange header. https://wicg.github.io/webpackage/draft-yasskin-httpbis-origin-signed-exchanges-impl.html#cbor-representation

type NetworkSignedExchangeInfo

type NetworkSignedExchangeInfo struct {
	OuterResponse   *NetworkResponse              `json:"outerResponse"`             // The outer response of signed HTTP exchange which was received from network.
	Header          *NetworkSignedExchangeHeader  `json:"header,omitempty"`          // Information about the signed exchange header.
	SecurityDetails *NetworkSecurityDetails       `json:"securityDetails,omitempty"` // Security details for the signed exchange header.
	Errors          []*NetworkSignedExchangeError `json:"errors,omitempty"`          // Errors occurred while handling the signed exchagne.
}

Information about a signed exchange response.

type NetworkSignedExchangeReceivedEvent

type NetworkSignedExchangeReceivedEvent struct {
	Method string `json:"method"`
	Params struct {
		RequestId string                     `json:"requestId"` // Request identifier.
		Info      *NetworkSignedExchangeInfo `json:"info"`      // Information about the signed exchange response.
	} `json:"Params,omitempty"`
}

Fired when a signed exchange was received over the network

type NetworkSignedExchangeSignature

type NetworkSignedExchangeSignature struct {
	Label        string   `json:"label"`                  // Signed exchange signature label.
	Signature    string   `json:"signature"`              // The hex string of signed exchange signature.
	Integrity    string   `json:"integrity"`              // Signed exchange signature integrity.
	CertUrl      string   `json:"certUrl,omitempty"`      // Signed exchange signature cert Url.
	CertSha256   string   `json:"certSha256,omitempty"`   // The hex string of signed exchange signature cert sha256.
	ValidityUrl  string   `json:"validityUrl"`            // Signed exchange signature validity Url.
	Date         int      `json:"date"`                   // Signed exchange signature date.
	Expires      int      `json:"expires"`                // Signed exchange signature expires.
	Certificates []string `json:"certificates,omitempty"` // The encoded certificates.
}

Information about a signed exchange signature. https://wicg.github.io/webpackage/draft-yasskin-httpbis-origin-signed-exchanges-impl.html#rfc.section.3.1

type NetworkSubresourceWebBundleInnerResponseErrorEvent added in v2.1.2

type NetworkSubresourceWebBundleInnerResponseErrorEvent struct {
	Method string `json:"method"`
	Params struct {
		InnerRequestId  string `json:"innerRequestId"`            // Request identifier of the subresource request
		InnerRequestURL string `json:"innerRequestURL"`           // URL of the subresource resource.
		ErrorMessage    string `json:"errorMessage"`              // Error message
		BundleRequestId string `json:"bundleRequestId,omitempty"` // Bundle request identifier. Used to match this information to another event. This made be absent in case when the instrumentation was enabled only after webbundle was parsed.
	} `json:"Params,omitempty"`
}

Fired when request for resources within a .wbn file failed.

type NetworkSubresourceWebBundleInnerResponseParsedEvent added in v2.1.2

type NetworkSubresourceWebBundleInnerResponseParsedEvent struct {
	Method string `json:"method"`
	Params struct {
		InnerRequestId  string `json:"innerRequestId"`            // Request identifier of the subresource request
		InnerRequestURL string `json:"innerRequestURL"`           // URL of the subresource resource.
		BundleRequestId string `json:"bundleRequestId,omitempty"` // Bundle request identifier. Used to match this information to another event. This made be absent in case when the instrumentation was enabled only after webbundle was parsed.
	} `json:"Params,omitempty"`
}

Fired when handling requests for resources within a .wbn file. Note: this will only be fired for resources that are requested by the webpage.

type NetworkSubresourceWebBundleMetadataErrorEvent added in v2.1.2

type NetworkSubresourceWebBundleMetadataErrorEvent struct {
	Method string `json:"method"`
	Params struct {
		RequestId    string `json:"requestId"`    // Request identifier. Used to match this information to another event.
		ErrorMessage string `json:"errorMessage"` // Error message
	} `json:"Params,omitempty"`
}

Fired once when parsing the .wbn file has failed.

type NetworkSubresourceWebBundleMetadataReceivedEvent added in v2.1.2

type NetworkSubresourceWebBundleMetadataReceivedEvent struct {
	Method string `json:"method"`
	Params struct {
		RequestId string   `json:"requestId"` // Request identifier. Used to match this information to another event.
		Urls      []string `json:"urls"`      // A list of URLs of resources in the subresource Web Bundle.
	} `json:"Params,omitempty"`
}

Fired once when parsing the .wbn file has succeeded. The event contains the information about the web bundle contents.

type NetworkTakeResponseBodyForInterceptionAsStreamParams

type NetworkTakeResponseBodyForInterceptionAsStreamParams struct {
	//
	InterceptionId string `json:"interceptionId"`
}

type NetworkTrustTokenOperationDoneEvent added in v2.0.7

type NetworkTrustTokenOperationDoneEvent struct {
	Method string `json:"method"`
	Params struct {
		Status           string `json:"status"`                     // Detailed success or error status of the operation. 'AlreadyExists' also signifies a successful operation, as the result of the operation already exists und thus, the operation was abort preemptively (e.g. a cache hit).
		Type             string `json:"type"`                       //  enum values: Issuance, Redemption, Signing
		RequestId        string `json:"requestId"`                  //
		TopLevelOrigin   string `json:"topLevelOrigin,omitempty"`   // Top level origin. The context in which the operation was attempted.
		IssuerOrigin     string `json:"issuerOrigin,omitempty"`     // Origin of the issuer in case of a "Issuance" or "Redemption" operation.
		IssuedTokenCount int    `json:"issuedTokenCount,omitempty"` // The number of obtained Trust Tokens on a successful "Issuance" operation.
	} `json:"Params,omitempty"`
}

Fired exactly once for each Trust Token operation. Depending on the type of the operation and whether the operation succeeded or failed, the event is fired before the corresponding request was sent or after the response was received.

type NetworkTrustTokenParams added in v2.0.7

type NetworkTrustTokenParams struct {
	Operation     string   `json:"operation"`         //  enum values: Issuance, Redemption, Signing
	RefreshPolicy string   `json:"refreshPolicy"`     // Only set for "token-redemption" operation and determine whether to request a fresh SRR or use a still valid cached SRR.
	Issuers       []string `json:"issuers,omitempty"` // Origins of issuers from whom to request tokens or redemption records.
}

Determines what type of Trust Token operation is executed and depending on the type, some additional parameters. The values are specified in third_party/blink/renderer/core/fetch/trust_token.idl.

type NetworkWebSocketClosedEvent

type NetworkWebSocketClosedEvent struct {
	Method string `json:"method"`
	Params struct {
		RequestId string  `json:"requestId"` // Request identifier.
		Timestamp float64 `json:"timestamp"` // Timestamp.
	} `json:"Params,omitempty"`
}

Fired when WebSocket is closed.

type NetworkWebSocketCreatedEvent

type NetworkWebSocketCreatedEvent struct {
	Method string `json:"method"`
	Params struct {
		RequestId string            `json:"requestId"`           // Request identifier.
		Url       string            `json:"url"`                 // WebSocket request URL.
		Initiator *NetworkInitiator `json:"initiator,omitempty"` // Request initiator.
	} `json:"Params,omitempty"`
}

Fired upon WebSocket creation.

type NetworkWebSocketFrame

type NetworkWebSocketFrame struct {
	Opcode      float64 `json:"opcode"`      // WebSocket message opcode.
	Mask        bool    `json:"mask"`        // WebSocket message mask.
	PayloadData string  `json:"payloadData"` // WebSocket message payload data. If the opcode is 1, this is a text message and payloadData is a UTF-8 string. If the opcode isn't 1, then payloadData is a base64 encoded string representing binary data.
}

WebSocket message data. This represents an entire WebSocket message, not just a fragmented frame as the name suggests.

type NetworkWebSocketFrameErrorEvent

type NetworkWebSocketFrameErrorEvent struct {
	Method string `json:"method"`
	Params struct {
		RequestId    string  `json:"requestId"`    // Request identifier.
		Timestamp    float64 `json:"timestamp"`    // Timestamp.
		ErrorMessage string  `json:"errorMessage"` // WebSocket error message.
	} `json:"Params,omitempty"`
}

Fired when WebSocket message error occurs.

type NetworkWebSocketFrameReceivedEvent

type NetworkWebSocketFrameReceivedEvent struct {
	Method string `json:"method"`
	Params struct {
		RequestId string                 `json:"requestId"` // Request identifier.
		Timestamp float64                `json:"timestamp"` // Timestamp.
		Response  *NetworkWebSocketFrame `json:"response"`  // WebSocket response data.
	} `json:"Params,omitempty"`
}

Fired when WebSocket message is received.

type NetworkWebSocketFrameSentEvent

type NetworkWebSocketFrameSentEvent struct {
	Method string `json:"method"`
	Params struct {
		RequestId string                 `json:"requestId"` // Request identifier.
		Timestamp float64                `json:"timestamp"` // Timestamp.
		Response  *NetworkWebSocketFrame `json:"response"`  // WebSocket response data.
	} `json:"Params,omitempty"`
}

Fired when WebSocket message is sent.

type NetworkWebSocketHandshakeResponseReceivedEvent

type NetworkWebSocketHandshakeResponseReceivedEvent struct {
	Method string `json:"method"`
	Params struct {
		RequestId string                    `json:"requestId"` // Request identifier.
		Timestamp float64                   `json:"timestamp"` // Timestamp.
		Response  *NetworkWebSocketResponse `json:"response"`  // WebSocket response data.
	} `json:"Params,omitempty"`
}

Fired when WebSocket handshake response becomes available.

type NetworkWebSocketRequest

type NetworkWebSocketRequest struct {
	Headers map[string]interface{} `json:"headers"` // HTTP request headers.
}

WebSocket request data.

type NetworkWebSocketResponse

type NetworkWebSocketResponse struct {
	Status             int                    `json:"status"`                       // HTTP response status code.
	StatusText         string                 `json:"statusText"`                   // HTTP response status text.
	Headers            map[string]interface{} `json:"headers"`                      // HTTP response headers.
	HeadersText        string                 `json:"headersText,omitempty"`        // HTTP response headers text.
	RequestHeaders     map[string]interface{} `json:"requestHeaders,omitempty"`     // HTTP request headers.
	RequestHeadersText string                 `json:"requestHeadersText,omitempty"` // HTTP request headers text.
}

WebSocket response data.

type NetworkWebSocketWillSendHandshakeRequestEvent

type NetworkWebSocketWillSendHandshakeRequestEvent struct {
	Method string `json:"method"`
	Params struct {
		RequestId string                   `json:"requestId"` // Request identifier.
		Timestamp float64                  `json:"timestamp"` // Timestamp.
		WallTime  float64                  `json:"wallTime"`  // UTC Timestamp.
		Request   *NetworkWebSocketRequest `json:"request"`   // WebSocket request data.
	} `json:"Params,omitempty"`
}

Fired when WebSocket is about to initiate handshake.

type NetworkWebTransportClosedEvent added in v2.0.7

type NetworkWebTransportClosedEvent struct {
	Method string `json:"method"`
	Params struct {
		TransportId string  `json:"transportId"` // WebTransport identifier.
		Timestamp   float64 `json:"timestamp"`   // Timestamp.
	} `json:"Params,omitempty"`
}

Fired when WebTransport is disposed.

type NetworkWebTransportConnectionEstablishedEvent added in v2.0.7

type NetworkWebTransportConnectionEstablishedEvent struct {
	Method string `json:"method"`
	Params struct {
		TransportId string  `json:"transportId"` // WebTransport identifier.
		Timestamp   float64 `json:"timestamp"`   // Timestamp.
	} `json:"Params,omitempty"`
}

Fired when WebTransport handshake is finished.

type NetworkWebTransportCreatedEvent added in v2.0.7

type NetworkWebTransportCreatedEvent struct {
	Method string `json:"method"`
	Params struct {
		TransportId string            `json:"transportId"`         // WebTransport identifier.
		Url         string            `json:"url"`                 // WebTransport request URL.
		Timestamp   float64           `json:"timestamp"`           // Timestamp.
		Initiator   *NetworkInitiator `json:"initiator,omitempty"` // Request initiator.
	} `json:"Params,omitempty"`
}

Fired upon WebTransport creation.

type Overlay

type Overlay struct {
	// contains filtered or unexported fields
}

func NewOverlay

func NewOverlay(target gcdmessage.ChromeTargeter) *Overlay

func (*Overlay) Disable

func (c *Overlay) Disable(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Disables domain notifications.

func (*Overlay) Enable

Enables domain notifications.

func (*Overlay) GetGridHighlightObjectsForTest

func (c *Overlay) GetGridHighlightObjectsForTest(ctx context.Context, nodeIds []int) (map[string]interface{}, error)

GetGridHighlightObjectsForTest - For Persistent Grid testing. nodeIds - Ids of the node to get highlight object for. Returns - highlights - Grid Highlight data for the node ids provided.

func (*Overlay) GetGridHighlightObjectsForTestWithParams

func (c *Overlay) GetGridHighlightObjectsForTestWithParams(ctx context.Context, v *OverlayGetGridHighlightObjectsForTestParams) (map[string]interface{}, error)

GetGridHighlightObjectsForTestWithParams - For Persistent Grid testing. Returns - highlights - Grid Highlight data for the node ids provided.

func (*Overlay) GetHighlightObjectForTest

func (c *Overlay) GetHighlightObjectForTest(ctx context.Context, nodeId int, includeDistance bool, includeStyle bool, colorFormat string, showAccessibilityInfo bool) (map[string]interface{}, error)

GetHighlightObjectForTest - For testing. nodeId - Id of the node to get highlight object for. includeDistance - Whether to include distance info. includeStyle - Whether to include style info. colorFormat - The color format to get config with (default: hex). enum values: rgb, hsl, hwb, hex showAccessibilityInfo - Whether to show accessibility info (default: true). Returns - highlight - Highlight data for the node.

func (*Overlay) GetHighlightObjectForTestWithParams

func (c *Overlay) GetHighlightObjectForTestWithParams(ctx context.Context, v *OverlayGetHighlightObjectForTestParams) (map[string]interface{}, error)

GetHighlightObjectForTestWithParams - For testing. Returns - highlight - Highlight data for the node.

func (*Overlay) GetSourceOrderHighlightObjectForTest added in v2.0.5

func (c *Overlay) GetSourceOrderHighlightObjectForTest(ctx context.Context, nodeId int) (map[string]interface{}, error)

GetSourceOrderHighlightObjectForTest - For Source Order Viewer testing. nodeId - Id of the node to highlight. Returns - highlight - Source order highlight data for the node id provided.

func (*Overlay) GetSourceOrderHighlightObjectForTestWithParams added in v2.0.5

func (c *Overlay) GetSourceOrderHighlightObjectForTestWithParams(ctx context.Context, v *OverlayGetSourceOrderHighlightObjectForTestParams) (map[string]interface{}, error)

GetSourceOrderHighlightObjectForTestWithParams - For Source Order Viewer testing. Returns - highlight - Source order highlight data for the node id provided.

func (*Overlay) HideHighlight

func (c *Overlay) HideHighlight(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Hides any highlight.

func (*Overlay) HighlightFrame

func (c *Overlay) HighlightFrame(ctx context.Context, frameId string, contentColor *DOMRGBA, contentOutlineColor *DOMRGBA) (*gcdmessage.ChromeResponse, error)

HighlightFrame - Highlights owner element of the frame with given id. Deprecated: Doesn't work reliablity and cannot be fixed due to process separatation (the owner node might be in a different process). Determine the owner node in the client and use highlightNode. frameId - Identifier of the frame to highlight. contentColor - The content box highlight fill color (default: transparent). contentOutlineColor - The content box highlight outline color (default: transparent).

func (*Overlay) HighlightFrameWithParams

func (c *Overlay) HighlightFrameWithParams(ctx context.Context, v *OverlayHighlightFrameParams) (*gcdmessage.ChromeResponse, error)

HighlightFrameWithParams - Highlights owner element of the frame with given id. Deprecated: Doesn't work reliablity and cannot be fixed due to process separatation (the owner node might be in a different process). Determine the owner node in the client and use highlightNode.

func (*Overlay) HighlightNode

func (c *Overlay) HighlightNode(ctx context.Context, highlightConfig *OverlayHighlightConfig, nodeId int, backendNodeId int, objectId string, selector string) (*gcdmessage.ChromeResponse, error)

HighlightNode - Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified. highlightConfig - A descriptor for the highlight appearance. nodeId - Identifier of the node to highlight. backendNodeId - Identifier of the backend node to highlight. objectId - JavaScript object id of the node to be highlighted. selector - Selectors to highlight relevant nodes.

func (*Overlay) HighlightNodeWithParams

func (c *Overlay) HighlightNodeWithParams(ctx context.Context, v *OverlayHighlightNodeParams) (*gcdmessage.ChromeResponse, error)

HighlightNodeWithParams - Highlights DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified.

func (*Overlay) HighlightQuad

func (c *Overlay) HighlightQuad(ctx context.Context, quad []float64, color *DOMRGBA, outlineColor *DOMRGBA) (*gcdmessage.ChromeResponse, error)

HighlightQuad - Highlights given quad. Coordinates are absolute with respect to the main frame viewport. quad - Quad to highlight color - The highlight fill color (default: transparent). outlineColor - The highlight outline color (default: transparent).

func (*Overlay) HighlightQuadWithParams

func (c *Overlay) HighlightQuadWithParams(ctx context.Context, v *OverlayHighlightQuadParams) (*gcdmessage.ChromeResponse, error)

HighlightQuadWithParams - Highlights given quad. Coordinates are absolute with respect to the main frame viewport.

func (*Overlay) HighlightRect

func (c *Overlay) HighlightRect(ctx context.Context, x int, y int, width int, height int, color *DOMRGBA, outlineColor *DOMRGBA) (*gcdmessage.ChromeResponse, error)

HighlightRect - Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport. x - X coordinate y - Y coordinate width - Rectangle width height - Rectangle height color - The highlight fill color (default: transparent). outlineColor - The highlight outline color (default: transparent).

func (*Overlay) HighlightRectWithParams

func (c *Overlay) HighlightRectWithParams(ctx context.Context, v *OverlayHighlightRectParams) (*gcdmessage.ChromeResponse, error)

HighlightRectWithParams - Highlights given rectangle. Coordinates are absolute with respect to the main frame viewport.

func (*Overlay) HighlightSourceOrder added in v2.0.5

func (c *Overlay) HighlightSourceOrder(ctx context.Context, sourceOrderConfig *OverlaySourceOrderConfig, nodeId int, backendNodeId int, objectId string) (*gcdmessage.ChromeResponse, error)

HighlightSourceOrder - Highlights the source order of the children of the DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified. sourceOrderConfig - A descriptor for the appearance of the overlay drawing. nodeId - Identifier of the node to highlight. backendNodeId - Identifier of the backend node to highlight. objectId - JavaScript object id of the node to be highlighted.

func (*Overlay) HighlightSourceOrderWithParams added in v2.0.5

func (c *Overlay) HighlightSourceOrderWithParams(ctx context.Context, v *OverlayHighlightSourceOrderParams) (*gcdmessage.ChromeResponse, error)

HighlightSourceOrderWithParams - Highlights the source order of the children of the DOM node with given id or with the given JavaScript object wrapper. Either nodeId or objectId must be specified.

func (*Overlay) SetInspectMode

func (c *Overlay) SetInspectMode(ctx context.Context, mode string, highlightConfig *OverlayHighlightConfig) (*gcdmessage.ChromeResponse, error)

SetInspectMode - Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted. Backend then generates 'inspectNodeRequested' event upon element selection. mode - Set an inspection mode. enum values: searchForNode, searchForUAShadowDOM, captureAreaScreenshot, showDistances, none highlightConfig - A descriptor for the highlight appearance of hovered-over nodes. May be omitted if `enabled == false`.

func (*Overlay) SetInspectModeWithParams

func (c *Overlay) SetInspectModeWithParams(ctx context.Context, v *OverlaySetInspectModeParams) (*gcdmessage.ChromeResponse, error)

SetInspectModeWithParams - Enters the 'inspect' mode. In this mode, elements that user is hovering over are highlighted. Backend then generates 'inspectNodeRequested' event upon element selection.

func (*Overlay) SetPausedInDebuggerMessage

func (c *Overlay) SetPausedInDebuggerMessage(ctx context.Context, message string) (*gcdmessage.ChromeResponse, error)

SetPausedInDebuggerMessage - message - The message to display, also triggers resume and step over controls.

func (*Overlay) SetPausedInDebuggerMessageWithParams

func (c *Overlay) SetPausedInDebuggerMessageWithParams(ctx context.Context, v *OverlaySetPausedInDebuggerMessageParams) (*gcdmessage.ChromeResponse, error)

SetPausedInDebuggerMessageWithParams -

func (*Overlay) SetShowAdHighlights

func (c *Overlay) SetShowAdHighlights(ctx context.Context, show bool) (*gcdmessage.ChromeResponse, error)

SetShowAdHighlights - Highlights owner element of all frames detected to be ads. show - True for showing ad highlights

func (*Overlay) SetShowAdHighlightsWithParams

func (c *Overlay) SetShowAdHighlightsWithParams(ctx context.Context, v *OverlaySetShowAdHighlightsParams) (*gcdmessage.ChromeResponse, error)

SetShowAdHighlightsWithParams - Highlights owner element of all frames detected to be ads.

func (*Overlay) SetShowContainerQueryOverlays added in v2.2.4

func (c *Overlay) SetShowContainerQueryOverlays(ctx context.Context, containerQueryHighlightConfigs []*OverlayContainerQueryHighlightConfig) (*gcdmessage.ChromeResponse, error)

SetShowContainerQueryOverlays - containerQueryHighlightConfigs - An array of node identifiers and descriptors for the highlight appearance.

func (*Overlay) SetShowContainerQueryOverlaysWithParams added in v2.2.4

func (c *Overlay) SetShowContainerQueryOverlaysWithParams(ctx context.Context, v *OverlaySetShowContainerQueryOverlaysParams) (*gcdmessage.ChromeResponse, error)

SetShowContainerQueryOverlaysWithParams -

func (*Overlay) SetShowDebugBorders

func (c *Overlay) SetShowDebugBorders(ctx context.Context, show bool) (*gcdmessage.ChromeResponse, error)

SetShowDebugBorders - Requests that backend shows debug borders on layers show - True for showing debug borders

func (*Overlay) SetShowDebugBordersWithParams

func (c *Overlay) SetShowDebugBordersWithParams(ctx context.Context, v *OverlaySetShowDebugBordersParams) (*gcdmessage.ChromeResponse, error)

SetShowDebugBordersWithParams - Requests that backend shows debug borders on layers

func (*Overlay) SetShowFPSCounter

func (c *Overlay) SetShowFPSCounter(ctx context.Context, show bool) (*gcdmessage.ChromeResponse, error)

SetShowFPSCounter - Requests that backend shows the FPS counter show - True for showing the FPS counter

func (*Overlay) SetShowFPSCounterWithParams

func (c *Overlay) SetShowFPSCounterWithParams(ctx context.Context, v *OverlaySetShowFPSCounterParams) (*gcdmessage.ChromeResponse, error)

SetShowFPSCounterWithParams - Requests that backend shows the FPS counter

func (*Overlay) SetShowFlexOverlays added in v2.0.7

func (c *Overlay) SetShowFlexOverlays(ctx context.Context, flexNodeHighlightConfigs []*OverlayFlexNodeHighlightConfig) (*gcdmessage.ChromeResponse, error)

SetShowFlexOverlays - flexNodeHighlightConfigs - An array of node identifiers and descriptors for the highlight appearance.

func (*Overlay) SetShowFlexOverlaysWithParams added in v2.0.7

func (c *Overlay) SetShowFlexOverlaysWithParams(ctx context.Context, v *OverlaySetShowFlexOverlaysParams) (*gcdmessage.ChromeResponse, error)

SetShowFlexOverlaysWithParams -

func (*Overlay) SetShowGridOverlays

func (c *Overlay) SetShowGridOverlays(ctx context.Context, gridNodeHighlightConfigs []*OverlayGridNodeHighlightConfig) (*gcdmessage.ChromeResponse, error)

SetShowGridOverlays - Highlight multiple elements with the CSS Grid overlay. gridNodeHighlightConfigs - An array of node identifiers and descriptors for the highlight appearance.

func (*Overlay) SetShowGridOverlaysWithParams

func (c *Overlay) SetShowGridOverlaysWithParams(ctx context.Context, v *OverlaySetShowGridOverlaysParams) (*gcdmessage.ChromeResponse, error)

SetShowGridOverlaysWithParams - Highlight multiple elements with the CSS Grid overlay.

func (*Overlay) SetShowHinge

func (c *Overlay) SetShowHinge(ctx context.Context, hingeConfig *OverlayHingeConfig) (*gcdmessage.ChromeResponse, error)

SetShowHinge - Add a dual screen device hinge hingeConfig - hinge data, null means hideHinge

func (*Overlay) SetShowHingeWithParams

func (c *Overlay) SetShowHingeWithParams(ctx context.Context, v *OverlaySetShowHingeParams) (*gcdmessage.ChromeResponse, error)

SetShowHingeWithParams - Add a dual screen device hinge

func (*Overlay) SetShowHitTestBorders

func (c *Overlay) SetShowHitTestBorders(ctx context.Context, show bool) (*gcdmessage.ChromeResponse, error)

SetShowHitTestBorders - Deprecated, no longer has any effect. show - True for showing hit-test borders

func (*Overlay) SetShowHitTestBordersWithParams

func (c *Overlay) SetShowHitTestBordersWithParams(ctx context.Context, v *OverlaySetShowHitTestBordersParams) (*gcdmessage.ChromeResponse, error)

SetShowHitTestBordersWithParams - Deprecated, no longer has any effect.

func (*Overlay) SetShowIsolatedElements added in v2.2.4

func (c *Overlay) SetShowIsolatedElements(ctx context.Context, isolatedElementHighlightConfigs []*OverlayIsolatedElementHighlightConfig) (*gcdmessage.ChromeResponse, error)

SetShowIsolatedElements - Show elements in isolation mode with overlays. isolatedElementHighlightConfigs - An array of node identifiers and descriptors for the highlight appearance.

func (*Overlay) SetShowIsolatedElementsWithParams added in v2.2.4

func (c *Overlay) SetShowIsolatedElementsWithParams(ctx context.Context, v *OverlaySetShowIsolatedElementsParams) (*gcdmessage.ChromeResponse, error)

SetShowIsolatedElementsWithParams - Show elements in isolation mode with overlays.

func (*Overlay) SetShowLayoutShiftRegions

func (c *Overlay) SetShowLayoutShiftRegions(ctx context.Context, result bool) (*gcdmessage.ChromeResponse, error)

SetShowLayoutShiftRegions - Requests that backend shows layout shift regions result - True for showing layout shift regions

func (*Overlay) SetShowLayoutShiftRegionsWithParams

func (c *Overlay) SetShowLayoutShiftRegionsWithParams(ctx context.Context, v *OverlaySetShowLayoutShiftRegionsParams) (*gcdmessage.ChromeResponse, error)

SetShowLayoutShiftRegionsWithParams - Requests that backend shows layout shift regions

func (*Overlay) SetShowPaintRects

func (c *Overlay) SetShowPaintRects(ctx context.Context, result bool) (*gcdmessage.ChromeResponse, error)

SetShowPaintRects - Requests that backend shows paint rectangles result - True for showing paint rectangles

func (*Overlay) SetShowPaintRectsWithParams

func (c *Overlay) SetShowPaintRectsWithParams(ctx context.Context, v *OverlaySetShowPaintRectsParams) (*gcdmessage.ChromeResponse, error)

SetShowPaintRectsWithParams - Requests that backend shows paint rectangles

func (*Overlay) SetShowScrollBottleneckRects

func (c *Overlay) SetShowScrollBottleneckRects(ctx context.Context, show bool) (*gcdmessage.ChromeResponse, error)

SetShowScrollBottleneckRects - Requests that backend shows scroll bottleneck rects show - True for showing scroll bottleneck rects

func (*Overlay) SetShowScrollBottleneckRectsWithParams

func (c *Overlay) SetShowScrollBottleneckRectsWithParams(ctx context.Context, v *OverlaySetShowScrollBottleneckRectsParams) (*gcdmessage.ChromeResponse, error)

SetShowScrollBottleneckRectsWithParams - Requests that backend shows scroll bottleneck rects

func (*Overlay) SetShowScrollSnapOverlays added in v2.1.1

func (c *Overlay) SetShowScrollSnapOverlays(ctx context.Context, scrollSnapHighlightConfigs []*OverlayScrollSnapHighlightConfig) (*gcdmessage.ChromeResponse, error)

SetShowScrollSnapOverlays - scrollSnapHighlightConfigs - An array of node identifiers and descriptors for the highlight appearance.

func (*Overlay) SetShowScrollSnapOverlaysWithParams added in v2.1.1

func (c *Overlay) SetShowScrollSnapOverlaysWithParams(ctx context.Context, v *OverlaySetShowScrollSnapOverlaysParams) (*gcdmessage.ChromeResponse, error)

SetShowScrollSnapOverlaysWithParams -

func (*Overlay) SetShowViewportSizeOnResize

func (c *Overlay) SetShowViewportSizeOnResize(ctx context.Context, show bool) (*gcdmessage.ChromeResponse, error)

SetShowViewportSizeOnResize - Paints viewport size upon main frame resize. show - Whether to paint size or not.

func (*Overlay) SetShowViewportSizeOnResizeWithParams

func (c *Overlay) SetShowViewportSizeOnResizeWithParams(ctx context.Context, v *OverlaySetShowViewportSizeOnResizeParams) (*gcdmessage.ChromeResponse, error)

SetShowViewportSizeOnResizeWithParams - Paints viewport size upon main frame resize.

func (*Overlay) SetShowWebVitals added in v2.0.7

func (c *Overlay) SetShowWebVitals(ctx context.Context, show bool) (*gcdmessage.ChromeResponse, error)

SetShowWebVitals - Request that backend shows an overlay with web vital metrics. show -

func (*Overlay) SetShowWebVitalsWithParams added in v2.0.7

func (c *Overlay) SetShowWebVitalsWithParams(ctx context.Context, v *OverlaySetShowWebVitalsParams) (*gcdmessage.ChromeResponse, error)

SetShowWebVitalsWithParams - Request that backend shows an overlay with web vital metrics.

type OverlayBoxStyle added in v2.0.7

type OverlayBoxStyle struct {
	FillColor  *DOMRGBA `json:"fillColor,omitempty"`  // The background color for the box (default: transparent)
	HatchColor *DOMRGBA `json:"hatchColor,omitempty"` // The hatching color for the box (default: transparent)
}

Style information for drawing a box.

type OverlayContainerQueryContainerHighlightConfig added in v2.2.4

type OverlayContainerQueryContainerHighlightConfig struct {
	ContainerBorder  *OverlayLineStyle `json:"containerBorder,omitempty"`  // The style of the container border.
	DescendantBorder *OverlayLineStyle `json:"descendantBorder,omitempty"` // The style of the descendants' borders.
}

No Description.

type OverlayContainerQueryHighlightConfig added in v2.2.4

type OverlayContainerQueryHighlightConfig struct {
	ContainerQueryContainerHighlightConfig *OverlayContainerQueryContainerHighlightConfig `json:"containerQueryContainerHighlightConfig"` // A descriptor for the highlight appearance of container query containers.
	NodeId                                 int                                            `json:"nodeId"`                                 // Identifier of the container node to highlight.
}

No Description.

type OverlayFlexContainerHighlightConfig added in v2.0.7

type OverlayFlexContainerHighlightConfig struct {
	ContainerBorder       *OverlayLineStyle `json:"containerBorder,omitempty"`       // The style of the container border
	LineSeparator         *OverlayLineStyle `json:"lineSeparator,omitempty"`         // The style of the separator between lines
	ItemSeparator         *OverlayLineStyle `json:"itemSeparator,omitempty"`         // The style of the separator between items
	MainDistributedSpace  *OverlayBoxStyle  `json:"mainDistributedSpace,omitempty"`  // Style of content-distribution space on the main axis (justify-content).
	CrossDistributedSpace *OverlayBoxStyle  `json:"crossDistributedSpace,omitempty"` // Style of content-distribution space on the cross axis (align-content).
	RowGapSpace           *OverlayBoxStyle  `json:"rowGapSpace,omitempty"`           // Style of empty space caused by row gaps (gap/row-gap).
	ColumnGapSpace        *OverlayBoxStyle  `json:"columnGapSpace,omitempty"`        // Style of empty space caused by columns gaps (gap/column-gap).
	CrossAlignment        *OverlayLineStyle `json:"crossAlignment,omitempty"`        // Style of the self-alignment line (align-items).
}

Configuration data for the highlighting of Flex container elements.

type OverlayFlexItemHighlightConfig added in v2.0.7

type OverlayFlexItemHighlightConfig struct {
	BaseSizeBox      *OverlayBoxStyle  `json:"baseSizeBox,omitempty"`      // Style of the box representing the item's base size
	BaseSizeBorder   *OverlayLineStyle `json:"baseSizeBorder,omitempty"`   // Style of the border around the box representing the item's base size
	FlexibilityArrow *OverlayLineStyle `json:"flexibilityArrow,omitempty"` // Style of the arrow representing if the item grew or shrank
}

Configuration data for the highlighting of Flex item elements.

type OverlayFlexNodeHighlightConfig added in v2.0.7

type OverlayFlexNodeHighlightConfig struct {
	FlexContainerHighlightConfig *OverlayFlexContainerHighlightConfig `json:"flexContainerHighlightConfig"` // A descriptor for the highlight appearance of flex containers.
	NodeId                       int                                  `json:"nodeId"`                       // Identifier of the node to highlight.
}

No Description.

type OverlayGetGridHighlightObjectsForTestParams

type OverlayGetGridHighlightObjectsForTestParams struct {
	// Ids of the node to get highlight object for.
	NodeIds []int `json:"nodeIds"`
}

type OverlayGetHighlightObjectForTestParams

type OverlayGetHighlightObjectForTestParams struct {
	// Id of the node to get highlight object for.
	NodeId int `json:"nodeId"`
	// Whether to include distance info.
	IncludeDistance bool `json:"includeDistance,omitempty"`
	// Whether to include style info.
	IncludeStyle bool `json:"includeStyle,omitempty"`
	// The color format to get config with (default: hex). enum values: rgb, hsl, hwb, hex
	ColorFormat string `json:"colorFormat,omitempty"`
	// Whether to show accessibility info (default: true).
	ShowAccessibilityInfo bool `json:"showAccessibilityInfo,omitempty"`
}

type OverlayGetSourceOrderHighlightObjectForTestParams added in v2.0.5

type OverlayGetSourceOrderHighlightObjectForTestParams struct {
	// Id of the node to highlight.
	NodeId int `json:"nodeId"`
}

type OverlayGridHighlightConfig

type OverlayGridHighlightConfig struct {
	ShowGridExtensionLines  bool     `json:"showGridExtensionLines,omitempty"`  // Whether the extension lines from grid cells to the rulers should be shown (default: false).
	ShowPositiveLineNumbers bool     `json:"showPositiveLineNumbers,omitempty"` // Show Positive line number labels (default: false).
	ShowNegativeLineNumbers bool     `json:"showNegativeLineNumbers,omitempty"` // Show Negative line number labels (default: false).
	ShowAreaNames           bool     `json:"showAreaNames,omitempty"`           // Show area name labels (default: false).
	ShowLineNames           bool     `json:"showLineNames,omitempty"`           // Show line name labels (default: false).
	ShowTrackSizes          bool     `json:"showTrackSizes,omitempty"`          // Show track size labels (default: false).
	GridBorderColor         *DOMRGBA `json:"gridBorderColor,omitempty"`         // The grid container border highlight color (default: transparent).
	CellBorderColor         *DOMRGBA `json:"cellBorderColor,omitempty"`         // The cell border color (default: transparent). Deprecated, please use rowLineColor and columnLineColor instead.
	RowLineColor            *DOMRGBA `json:"rowLineColor,omitempty"`            // The row line color (default: transparent).
	ColumnLineColor         *DOMRGBA `json:"columnLineColor,omitempty"`         // The column line color (default: transparent).
	GridBorderDash          bool     `json:"gridBorderDash,omitempty"`          // Whether the grid border is dashed (default: false).
	CellBorderDash          bool     `json:"cellBorderDash,omitempty"`          // Whether the cell border is dashed (default: false). Deprecated, please us rowLineDash and columnLineDash instead.
	RowLineDash             bool     `json:"rowLineDash,omitempty"`             // Whether row lines are dashed (default: false).
	ColumnLineDash          bool     `json:"columnLineDash,omitempty"`          // Whether column lines are dashed (default: false).
	RowGapColor             *DOMRGBA `json:"rowGapColor,omitempty"`             // The row gap highlight fill color (default: transparent).
	RowHatchColor           *DOMRGBA `json:"rowHatchColor,omitempty"`           // The row gap hatching fill color (default: transparent).
	ColumnGapColor          *DOMRGBA `json:"columnGapColor,omitempty"`          // The column gap highlight fill color (default: transparent).
	ColumnHatchColor        *DOMRGBA `json:"columnHatchColor,omitempty"`        // The column gap hatching fill color (default: transparent).
	AreaBorderColor         *DOMRGBA `json:"areaBorderColor,omitempty"`         // The named grid areas border color (Default: transparent).
	GridBackgroundColor     *DOMRGBA `json:"gridBackgroundColor,omitempty"`     // The grid container background color (Default: transparent).
}

Configuration data for the highlighting of Grid elements.

type OverlayGridNodeHighlightConfig

type OverlayGridNodeHighlightConfig struct {
	GridHighlightConfig *OverlayGridHighlightConfig `json:"gridHighlightConfig"` // A descriptor for the highlight appearance.
	NodeId              int                         `json:"nodeId"`              // Identifier of the node to highlight.
}

Configurations for Persistent Grid Highlight

type OverlayHighlightConfig

type OverlayHighlightConfig 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).
	ShowAccessibilityInfo                  bool                                           `json:"showAccessibilityInfo,omitempty"`                  // Whether the a11y info should be shown (default: true).
	ShowExtensionLines                     bool                                           `json:"showExtensionLines,omitempty"`                     // Whether the extension lines from node to the rulers should be shown (default: false).
	ContentColor                           *DOMRGBA                                       `json:"contentColor,omitempty"`                           // The content box highlight fill color (default: transparent).
	PaddingColor                           *DOMRGBA                                       `json:"paddingColor,omitempty"`                           // The padding highlight fill color (default: transparent).
	BorderColor                            *DOMRGBA                                       `json:"borderColor,omitempty"`                            // The border highlight fill color (default: transparent).
	MarginColor                            *DOMRGBA                                       `json:"marginColor,omitempty"`                            // The margin highlight fill color (default: transparent).
	EventTargetColor                       *DOMRGBA                                       `json:"eventTargetColor,omitempty"`                       // The event target element highlight fill color (default: transparent).
	ShapeColor                             *DOMRGBA                                       `json:"shapeColor,omitempty"`                             // The shape outside fill color (default: transparent).
	ShapeMarginColor                       *DOMRGBA                                       `json:"shapeMarginColor,omitempty"`                       // The shape margin fill color (default: transparent).
	CssGridColor                           *DOMRGBA                                       `json:"cssGridColor,omitempty"`                           // The grid layout color (default: transparent).
	ColorFormat                            string                                         `json:"colorFormat,omitempty"`                            // The color format used to format color styles (default: hex). enum values: rgb, hsl, hwb, hex
	GridHighlightConfig                    *OverlayGridHighlightConfig                    `json:"gridHighlightConfig,omitempty"`                    // The grid layout highlight configuration (default: all transparent).
	FlexContainerHighlightConfig           *OverlayFlexContainerHighlightConfig           `json:"flexContainerHighlightConfig,omitempty"`           // The flex container highlight configuration (default: all transparent).
	FlexItemHighlightConfig                *OverlayFlexItemHighlightConfig                `json:"flexItemHighlightConfig,omitempty"`                // The flex item highlight configuration (default: all transparent).
	ContrastAlgorithm                      string                                         `json:"contrastAlgorithm,omitempty"`                      // The contrast algorithm to use for the contrast ratio (default: aa). enum values: aa, aaa, apca
	ContainerQueryContainerHighlightConfig *OverlayContainerQueryContainerHighlightConfig `json:"containerQueryContainerHighlightConfig,omitempty"` // The container query container highlight configuration (default: all transparent).
}

Configuration data for the highlighting of page elements.

type OverlayHighlightFrameParams

type OverlayHighlightFrameParams struct {
	// Identifier of the frame to highlight.
	FrameId string `json:"frameId"`
	// The content box highlight fill color (default: transparent).
	ContentColor *DOMRGBA `json:"contentColor,omitempty"`
	// The content box highlight outline color (default: transparent).
	ContentOutlineColor *DOMRGBA `json:"contentOutlineColor,omitempty"`
}

type OverlayHighlightNodeParams

type OverlayHighlightNodeParams struct {
	// A descriptor for the highlight appearance.
	HighlightConfig *OverlayHighlightConfig `json:"highlightConfig"`
	// Identifier of the node to highlight.
	NodeId int `json:"nodeId,omitempty"`
	// Identifier of the backend node to highlight.
	BackendNodeId int `json:"backendNodeId,omitempty"`
	// JavaScript object id of the node to be highlighted.
	ObjectId string `json:"objectId,omitempty"`
	// Selectors to highlight relevant nodes.
	Selector string `json:"selector,omitempty"`
}

type OverlayHighlightQuadParams

type OverlayHighlightQuadParams struct {
	// Quad to highlight
	Quad []float64 `json:"quad"`
	// The highlight fill color (default: transparent).
	Color *DOMRGBA `json:"color,omitempty"`
	// The highlight outline color (default: transparent).
	OutlineColor *DOMRGBA `json:"outlineColor,omitempty"`
}

type OverlayHighlightRectParams

type OverlayHighlightRectParams struct {
	// X coordinate
	X int `json:"x"`
	// Y coordinate
	Y int `json:"y"`
	// Rectangle width
	Width int `json:"width"`
	// Rectangle height
	Height int `json:"height"`
	// The highlight fill color (default: transparent).
	Color *DOMRGBA `json:"color,omitempty"`
	// The highlight outline color (default: transparent).
	OutlineColor *DOMRGBA `json:"outlineColor,omitempty"`
}

type OverlayHighlightSourceOrderParams added in v2.0.5

type OverlayHighlightSourceOrderParams struct {
	// A descriptor for the appearance of the overlay drawing.
	SourceOrderConfig *OverlaySourceOrderConfig `json:"sourceOrderConfig"`
	// Identifier of the node to highlight.
	NodeId int `json:"nodeId,omitempty"`
	// Identifier of the backend node to highlight.
	BackendNodeId int `json:"backendNodeId,omitempty"`
	// JavaScript object id of the node to be highlighted.
	ObjectId string `json:"objectId,omitempty"`
}

type OverlayHingeConfig

type OverlayHingeConfig struct {
	Rect         *DOMRect `json:"rect"`                   // A rectangle represent hinge
	ContentColor *DOMRGBA `json:"contentColor,omitempty"` // The content box highlight fill color (default: a dark color).
	OutlineColor *DOMRGBA `json:"outlineColor,omitempty"` // The content box highlight outline color (default: transparent).
}

Configuration for dual screen hinge

type OverlayInspectNodeRequestedEvent

type OverlayInspectNodeRequestedEvent struct {
	Method string `json:"method"`
	Params struct {
		BackendNodeId int `json:"backendNodeId"` // Id of the node to inspect.
	} `json:"Params,omitempty"`
}

Fired when the node should be inspected. This happens after call to `setInspectMode` or when user manually inspects an element.

type OverlayIsolatedElementHighlightConfig added in v2.2.4

type OverlayIsolatedElementHighlightConfig struct {
	IsolationModeHighlightConfig *OverlayIsolationModeHighlightConfig `json:"isolationModeHighlightConfig"` // A descriptor for the highlight appearance of an element in isolation mode.
	NodeId                       int                                  `json:"nodeId"`                       // Identifier of the isolated element to highlight.
}

No Description.

type OverlayIsolationModeHighlightConfig added in v2.2.4

type OverlayIsolationModeHighlightConfig struct {
	ResizerColor       *DOMRGBA `json:"resizerColor,omitempty"`       // The fill color of the resizers (default: transparent).
	ResizerHandleColor *DOMRGBA `json:"resizerHandleColor,omitempty"` // The fill color for resizer handles (default: transparent).
	MaskColor          *DOMRGBA `json:"maskColor,omitempty"`          // The fill color for the mask covering non-isolated elements (default: transparent).
}

No Description.

type OverlayLineStyle added in v2.0.7

type OverlayLineStyle struct {
	Color   *DOMRGBA `json:"color,omitempty"`   // The color of the line (default: transparent)
	Pattern string   `json:"pattern,omitempty"` // The line pattern (default: solid)
}

Style information for drawing a line.

type OverlayNodeHighlightRequestedEvent

type OverlayNodeHighlightRequestedEvent struct {
	Method string `json:"method"`
	Params struct {
		NodeId int `json:"nodeId"` //
	} `json:"Params,omitempty"`
}

Fired when the node should be highlighted. This happens after call to `setInspectMode`.

type OverlayScreenshotRequestedEvent

type OverlayScreenshotRequestedEvent struct {
	Method string `json:"method"`
	Params struct {
		Viewport *PageViewport `json:"viewport"` // Viewport to capture, in device independent pixels (dip).
	} `json:"Params,omitempty"`
}

Fired when user asks to capture screenshot of some area on the page.

type OverlayScrollSnapContainerHighlightConfig added in v2.1.1

type OverlayScrollSnapContainerHighlightConfig struct {
	SnapportBorder     *OverlayLineStyle `json:"snapportBorder,omitempty"`     // The style of the snapport border (default: transparent)
	SnapAreaBorder     *OverlayLineStyle `json:"snapAreaBorder,omitempty"`     // The style of the snap area border (default: transparent)
	ScrollMarginColor  *DOMRGBA          `json:"scrollMarginColor,omitempty"`  // The margin highlight fill color (default: transparent).
	ScrollPaddingColor *DOMRGBA          `json:"scrollPaddingColor,omitempty"` // The padding highlight fill color (default: transparent).
}

No Description.

type OverlayScrollSnapHighlightConfig added in v2.1.1

type OverlayScrollSnapHighlightConfig struct {
	ScrollSnapContainerHighlightConfig *OverlayScrollSnapContainerHighlightConfig `json:"scrollSnapContainerHighlightConfig"` // A descriptor for the highlight appearance of scroll snap containers.
	NodeId                             int                                        `json:"nodeId"`                             // Identifier of the node to highlight.
}

No Description.

type OverlaySetInspectModeParams

type OverlaySetInspectModeParams struct {
	// Set an inspection mode. enum values: searchForNode, searchForUAShadowDOM, captureAreaScreenshot, showDistances, none
	Mode string `json:"mode"`
	// A descriptor for the highlight appearance of hovered-over nodes. May be omitted if `enabled == false`.
	HighlightConfig *OverlayHighlightConfig `json:"highlightConfig,omitempty"`
}

type OverlaySetPausedInDebuggerMessageParams

type OverlaySetPausedInDebuggerMessageParams struct {
	// The message to display, also triggers resume and step over controls.
	Message string `json:"message,omitempty"`
}

type OverlaySetShowAdHighlightsParams

type OverlaySetShowAdHighlightsParams struct {
	// True for showing ad highlights
	Show bool `json:"show"`
}

type OverlaySetShowContainerQueryOverlaysParams added in v2.2.4

type OverlaySetShowContainerQueryOverlaysParams struct {
	// An array of node identifiers and descriptors for the highlight appearance.
	ContainerQueryHighlightConfigs []*OverlayContainerQueryHighlightConfig `json:"containerQueryHighlightConfigs"`
}

type OverlaySetShowDebugBordersParams

type OverlaySetShowDebugBordersParams struct {
	// True for showing debug borders
	Show bool `json:"show"`
}

type OverlaySetShowFPSCounterParams

type OverlaySetShowFPSCounterParams struct {
	// True for showing the FPS counter
	Show bool `json:"show"`
}

type OverlaySetShowFlexOverlaysParams added in v2.0.7

type OverlaySetShowFlexOverlaysParams struct {
	// An array of node identifiers and descriptors for the highlight appearance.
	FlexNodeHighlightConfigs []*OverlayFlexNodeHighlightConfig `json:"flexNodeHighlightConfigs"`
}

type OverlaySetShowGridOverlaysParams

type OverlaySetShowGridOverlaysParams struct {
	// An array of node identifiers and descriptors for the highlight appearance.
	GridNodeHighlightConfigs []*OverlayGridNodeHighlightConfig `json:"gridNodeHighlightConfigs"`
}

type OverlaySetShowHingeParams

type OverlaySetShowHingeParams struct {
	// hinge data, null means hideHinge
	HingeConfig *OverlayHingeConfig `json:"hingeConfig,omitempty"`
}

type OverlaySetShowHitTestBordersParams

type OverlaySetShowHitTestBordersParams struct {
	// True for showing hit-test borders
	Show bool `json:"show"`
}

type OverlaySetShowIsolatedElementsParams added in v2.2.4

type OverlaySetShowIsolatedElementsParams struct {
	// An array of node identifiers and descriptors for the highlight appearance.
	IsolatedElementHighlightConfigs []*OverlayIsolatedElementHighlightConfig `json:"isolatedElementHighlightConfigs"`
}

type OverlaySetShowLayoutShiftRegionsParams

type OverlaySetShowLayoutShiftRegionsParams struct {
	// True for showing layout shift regions
	Result bool `json:"result"`
}

type OverlaySetShowPaintRectsParams

type OverlaySetShowPaintRectsParams struct {
	// True for showing paint rectangles
	Result bool `json:"result"`
}

type OverlaySetShowScrollBottleneckRectsParams

type OverlaySetShowScrollBottleneckRectsParams struct {
	// True for showing scroll bottleneck rects
	Show bool `json:"show"`
}

type OverlaySetShowScrollSnapOverlaysParams added in v2.1.1

type OverlaySetShowScrollSnapOverlaysParams struct {
	// An array of node identifiers and descriptors for the highlight appearance.
	ScrollSnapHighlightConfigs []*OverlayScrollSnapHighlightConfig `json:"scrollSnapHighlightConfigs"`
}

type OverlaySetShowViewportSizeOnResizeParams

type OverlaySetShowViewportSizeOnResizeParams struct {
	// Whether to paint size or not.
	Show bool `json:"show"`
}

type OverlaySetShowWebVitalsParams added in v2.0.7

type OverlaySetShowWebVitalsParams struct {
	//
	Show bool `json:"show"`
}

type OverlaySourceOrderConfig added in v2.0.5

type OverlaySourceOrderConfig struct {
	ParentOutlineColor *DOMRGBA `json:"parentOutlineColor"` // the color to outline the givent element in.
	ChildOutlineColor  *DOMRGBA `json:"childOutlineColor"`  // the color to outline the child elements in.
}

Configuration data for drawing the source order of an elements children.

type Page

type Page struct {
	// contains filtered or unexported fields
}

func NewPage

func NewPage(target gcdmessage.ChromeTargeter) *Page

func (*Page) AddCompilationCache

func (c *Page) AddCompilationCache(ctx context.Context, url string, data string) (*gcdmessage.ChromeResponse, error)

AddCompilationCache - Seeds compilation cache for given url. Compilation cache does not survive cross-process navigation. url - data - Base64-encoded data (Encoded as a base64 string when passed over JSON)

func (*Page) AddCompilationCacheWithParams

func (c *Page) AddCompilationCacheWithParams(ctx context.Context, v *PageAddCompilationCacheParams) (*gcdmessage.ChromeResponse, error)

AddCompilationCacheWithParams - Seeds compilation cache for given url. Compilation cache does not survive cross-process navigation.

func (*Page) AddScriptToEvaluateOnLoad

func (c *Page) AddScriptToEvaluateOnLoad(ctx context.Context, scriptSource string) (string, error)

AddScriptToEvaluateOnLoad - Deprecated, please use addScriptToEvaluateOnNewDocument instead. scriptSource - Returns - identifier - Identifier of the added script.

func (*Page) AddScriptToEvaluateOnLoadWithParams

func (c *Page) AddScriptToEvaluateOnLoadWithParams(ctx context.Context, v *PageAddScriptToEvaluateOnLoadParams) (string, error)

AddScriptToEvaluateOnLoadWithParams - Deprecated, please use addScriptToEvaluateOnNewDocument instead. Returns - identifier - Identifier of the added script.

func (*Page) AddScriptToEvaluateOnNewDocument

func (c *Page) AddScriptToEvaluateOnNewDocument(ctx context.Context, source string, worldName string, includeCommandLineAPI bool) (string, error)

AddScriptToEvaluateOnNewDocument - Evaluates given script in every frame upon creation (before loading frame's scripts). source - worldName - If specified, creates an isolated world with the given name and evaluates given script in it. This world name will be used as the ExecutionContextDescription::name when the corresponding event is emitted. includeCommandLineAPI - Specifies whether command line API should be available to the script, defaults to false. Returns - identifier - Identifier of the added script.

func (*Page) AddScriptToEvaluateOnNewDocumentWithParams

func (c *Page) AddScriptToEvaluateOnNewDocumentWithParams(ctx context.Context, v *PageAddScriptToEvaluateOnNewDocumentParams) (string, error)

AddScriptToEvaluateOnNewDocumentWithParams - Evaluates given script in every frame upon creation (before loading frame's scripts). Returns - identifier - Identifier of the added script.

func (*Page) BringToFront

func (c *Page) BringToFront(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Brings page to front (activates tab).

func (*Page) CaptureScreenshot

func (c *Page) CaptureScreenshot(ctx context.Context, format string, quality int, clip *PageViewport, fromSurface bool, captureBeyondViewport bool, optimizeForSpeed bool) (string, error)

CaptureScreenshot - Capture page screenshot. format - Image compression format (defaults to png). quality - Compression quality from range [0..100] (jpeg only). clip - Capture the screenshot of a given region only. fromSurface - Capture the screenshot from the surface, rather than the view. Defaults to true. captureBeyondViewport - Capture the screenshot beyond the viewport. Defaults to false. optimizeForSpeed - Optimize image encoding for speed, not for resulting size (defaults to false) Returns - data - Base64-encoded image data. (Encoded as a base64 string when passed over JSON)

func (*Page) CaptureScreenshotWithParams

func (c *Page) CaptureScreenshotWithParams(ctx context.Context, v *PageCaptureScreenshotParams) (string, error)

CaptureScreenshotWithParams - Capture page screenshot. Returns - data - Base64-encoded image data. (Encoded as a base64 string when passed over JSON)

func (*Page) CaptureSnapshot

func (c *Page) CaptureSnapshot(ctx context.Context, format string) (string, error)

CaptureSnapshot - Returns a snapshot of the page as a string. For MHTML format, the serialization includes iframes, shadow DOM, external resources, and element-inline styles. format - Format (defaults to mhtml). Returns - data - Serialized page data.

func (*Page) CaptureSnapshotWithParams

func (c *Page) CaptureSnapshotWithParams(ctx context.Context, v *PageCaptureSnapshotParams) (string, error)

CaptureSnapshotWithParams - Returns a snapshot of the page as a string. For MHTML format, the serialization includes iframes, shadow DOM, external resources, and element-inline styles. Returns - data - Serialized page data.

func (*Page) ClearCompilationCache

func (c *Page) ClearCompilationCache(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Clears seeded compilation cache.

func (*Page) ClearDeviceMetricsOverride

func (c *Page) ClearDeviceMetricsOverride(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Clears the overridden device metrics.

func (*Page) ClearDeviceOrientationOverride

func (c *Page) ClearDeviceOrientationOverride(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Clears the overridden Device Orientation.

func (*Page) ClearGeolocationOverride

func (c *Page) ClearGeolocationOverride(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Clears the overridden Geolocation Position and Error.

func (*Page) Close

func (c *Page) Close(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Tries to close page, running its beforeunload hooks, if any.

func (*Page) Crash

func (c *Page) Crash(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Crashes renderer on the IO thread, generates minidumps.

func (*Page) CreateIsolatedWorld

func (c *Page) CreateIsolatedWorld(ctx context.Context, frameId string, worldName string, grantUniveralAccess bool) (int, error)

CreateIsolatedWorld - Creates an isolated world for the given frame. frameId - Id of the frame in which the isolated world should be created. worldName - An optional name which is reported in the Execution Context. grantUniveralAccess - Whether or not universal access should be granted to the isolated world. This is a powerful option, use with caution. Returns - executionContextId - Execution context of the isolated world.

func (*Page) CreateIsolatedWorldWithParams

func (c *Page) CreateIsolatedWorldWithParams(ctx context.Context, v *PageCreateIsolatedWorldParams) (int, error)

CreateIsolatedWorldWithParams - Creates an isolated world for the given frame. Returns - executionContextId - Execution context of the isolated world.

func (*Page) DeleteCookie

func (c *Page) DeleteCookie(ctx context.Context, cookieName string, url string) (*gcdmessage.ChromeResponse, error)

DeleteCookie - Deletes browser cookie with given name, domain and path. cookieName - Name of the cookie to remove. url - URL to match cooke domain and path.

func (*Page) DeleteCookieWithParams

func (c *Page) DeleteCookieWithParams(ctx context.Context, v *PageDeleteCookieParams) (*gcdmessage.ChromeResponse, error)

DeleteCookieWithParams - Deletes browser cookie with given name, domain and path.

func (*Page) Disable

func (c *Page) Disable(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Disables page domain notifications.

func (*Page) Enable

func (c *Page) Enable(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Enables page domain notifications.

func (*Page) GenerateTestReport

func (c *Page) GenerateTestReport(ctx context.Context, message string, group string) (*gcdmessage.ChromeResponse, error)

GenerateTestReport - Generates a report for testing. message - Message to be displayed in the report. group - Specifies the endpoint group to deliver the report to.

func (*Page) GenerateTestReportWithParams

func (c *Page) GenerateTestReportWithParams(ctx context.Context, v *PageGenerateTestReportParams) (*gcdmessage.ChromeResponse, error)

GenerateTestReportWithParams - Generates a report for testing.

func (*Page) GetAdScriptId added in v2.3.0

func (c *Page) GetAdScriptId(ctx context.Context, frameId string) (*PageAdScriptId, error)

GetAdScriptId - frameId - Returns - adScriptId - Identifies the bottom-most script which caused the frame to be labelled as an ad. Only sent if frame is labelled as an ad and id is available.

func (*Page) GetAdScriptIdWithParams added in v2.3.0

func (c *Page) GetAdScriptIdWithParams(ctx context.Context, v *PageGetAdScriptIdParams) (*PageAdScriptId, error)

GetAdScriptIdWithParams - Returns - adScriptId - Identifies the bottom-most script which caused the frame to be labelled as an ad. Only sent if frame is labelled as an ad and id is available.

func (*Page) GetAppId added in v2.2.4

func (c *Page) GetAppId(ctx context.Context) (string, string, error)

GetAppId - Returns the unique (PWA) app id. Only returns values if the feature flag 'WebAppEnableManifestId' is enabled Returns - appId - App id, either from manifest's id attribute or computed from start_url recommendedId - Recommendation for manifest's id attribute to match current id computed from start_url

func (*Page) GetAppManifest

GetAppManifest - Returns - url - Manifest location. errors - data - Manifest content. parsed - Parsed manifest properties

func (*Page) GetCookies

func (c *Page) GetCookies(ctx context.Context) ([]*NetworkCookie, error)

GetCookies - Returns all browser cookies for the page and all of its subframes. Depending on the backend support, will return detailed cookie information in the `cookies` field. Returns - cookies - Array of cookie objects.

func (*Page) GetFrameTree

func (c *Page) GetFrameTree(ctx context.Context) (*PageFrameTree, error)

GetFrameTree - Returns present frame tree structure. Returns - frameTree - Present frame tree structure.

func (*Page) GetInstallabilityErrors

func (c *Page) GetInstallabilityErrors(ctx context.Context) ([]*PageInstallabilityError, error)

GetInstallabilityErrors - Returns - installabilityErrors -

func (*Page) GetLayoutMetrics

GetLayoutMetrics - Returns metrics relating to the layouting of the page, such as viewport bounds/scale. Returns - layoutViewport - Deprecated metrics relating to the layout viewport. Is in device pixels. Use `cssLayoutViewport` instead. visualViewport - Deprecated metrics relating to the visual viewport. Is in device pixels. Use `cssVisualViewport` instead. contentSize - Deprecated size of scrollable area. Is in DP. Use `cssContentSize` instead. cssLayoutViewport - Metrics relating to the layout viewport in CSS pixels. cssVisualViewport - Metrics relating to the visual viewport in CSS pixels. cssContentSize - Size of scrollable area in CSS pixels.

func (*Page) GetManifestIcons

func (c *Page) GetManifestIcons(ctx context.Context) (string, error)

GetManifestIcons - Deprecated because it's not guaranteed that the returned icon is in fact the one used for PWA installation. Returns - primaryIcon -

func (*Page) GetNavigationHistory

func (c *Page) GetNavigationHistory(ctx context.Context) (int, []*PageNavigationEntry, error)

GetNavigationHistory - Returns navigation history for the current page. Returns - currentIndex - Index of the current navigation history entry. entries - Array of navigation history entries.

func (*Page) GetOriginTrials added in v2.2.4

func (c *Page) GetOriginTrials(ctx context.Context, frameId string) ([]*PageOriginTrial, error)

GetOriginTrials - Get Origin Trials on given frame. frameId - Returns - originTrials -

func (*Page) GetOriginTrialsWithParams added in v2.2.4

func (c *Page) GetOriginTrialsWithParams(ctx context.Context, v *PageGetOriginTrialsParams) ([]*PageOriginTrial, error)

GetOriginTrialsWithParams - Get Origin Trials on given frame. Returns - originTrials -

func (*Page) GetPermissionsPolicyState added in v2.1.1

func (c *Page) GetPermissionsPolicyState(ctx context.Context, frameId string) ([]*PagePermissionsPolicyFeatureState, error)

GetPermissionsPolicyState - Get Permissions Policy state on given frame. frameId - Returns - states -

func (*Page) GetPermissionsPolicyStateWithParams added in v2.1.1

func (c *Page) GetPermissionsPolicyStateWithParams(ctx context.Context, v *PageGetPermissionsPolicyStateParams) ([]*PagePermissionsPolicyFeatureState, error)

GetPermissionsPolicyStateWithParams - Get Permissions Policy state on given frame. Returns - states -

func (*Page) GetResourceContent

func (c *Page) GetResourceContent(ctx context.Context, frameId string, url string) (string, bool, error)

GetResourceContent - Returns content of the given resource. frameId - Frame id to get resource for. url - URL of the resource to get content for. Returns - content - Resource content. base64Encoded - True, if content was served as base64.

func (*Page) GetResourceContentWithParams

func (c *Page) GetResourceContentWithParams(ctx context.Context, v *PageGetResourceContentParams) (string, bool, error)

GetResourceContentWithParams - Returns content of the given resource. Returns - content - Resource content. base64Encoded - True, if content was served as base64.

func (*Page) GetResourceTree

func (c *Page) GetResourceTree(ctx context.Context) (*PageFrameResourceTree, error)

GetResourceTree - Returns present frame / resource tree structure. Returns - frameTree - Present frame / resource tree structure.

func (*Page) HandleJavaScriptDialog

func (c *Page) HandleJavaScriptDialog(ctx context.Context, accept bool, promptText string) (*gcdmessage.ChromeResponse, error)

HandleJavaScriptDialog - Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload). accept - Whether to accept or dismiss the dialog. promptText - The text to enter into the dialog prompt before accepting. Used only if this is a prompt dialog.

func (*Page) HandleJavaScriptDialogWithParams

func (c *Page) HandleJavaScriptDialogWithParams(ctx context.Context, v *PageHandleJavaScriptDialogParams) (*gcdmessage.ChromeResponse, error)

HandleJavaScriptDialogWithParams - Accepts or dismisses a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload).

func (*Page) Navigate

func (c *Page) Navigate(ctx context.Context, url string, referrer string, transitionType string, frameId string, referrerPolicy string) (string, string, string, error)

Navigate - Navigates current page to the given URL. url - URL to navigate the page to. referrer - Referrer URL. transitionType - Intended transition type. enum values: link, typed, address_bar, auto_bookmark, auto_subframe, manual_subframe, generated, auto_toplevel, form_submit, reload, keyword, keyword_generated, other frameId - Frame id to navigate, if not specified navigates the top frame. referrerPolicy - Referrer-policy used for the navigation. enum values: noReferrer, noReferrerWhenDowngrade, origin, originWhenCrossOrigin, sameOrigin, strictOrigin, strictOriginWhenCrossOrigin, unsafeUrl Returns - frameId - Frame id that has navigated (or failed to navigate) loaderId - Loader identifier. This is omitted in case of same-document navigation, as the previously committed loaderId would not change. errorText - User friendly error message, present if and only if navigation has failed.

func (*Page) NavigateToHistoryEntry

func (c *Page) NavigateToHistoryEntry(ctx context.Context, entryId int) (*gcdmessage.ChromeResponse, error)

NavigateToHistoryEntry - Navigates current page to the given history entry. entryId - Unique id of the entry to navigate to.

func (*Page) NavigateToHistoryEntryWithParams

func (c *Page) NavigateToHistoryEntryWithParams(ctx context.Context, v *PageNavigateToHistoryEntryParams) (*gcdmessage.ChromeResponse, error)

NavigateToHistoryEntryWithParams - Navigates current page to the given history entry.

func (*Page) NavigateWithParams

func (c *Page) NavigateWithParams(ctx context.Context, v *PageNavigateParams) (string, string, string, error)

NavigateWithParams - Navigates current page to the given URL. Returns - frameId - Frame id that has navigated (or failed to navigate) loaderId - Loader identifier. This is omitted in case of same-document navigation, as the previously committed loaderId would not change. errorText - User friendly error message, present if and only if navigation has failed.

func (*Page) PrintToPDF

func (c *Page) PrintToPDF(ctx context.Context, landscape bool, displayHeaderFooter bool, printBackground bool, scale float64, paperWidth float64, paperHeight float64, marginTop float64, marginBottom float64, marginLeft float64, marginRight float64, pageRanges string, headerTemplate string, footerTemplate string, preferCSSPageSize bool, transferMode string) (string, string, error)

PrintToPDF - Print page as PDF. landscape - Paper orientation. Defaults to false. displayHeaderFooter - Display header and footer. Defaults to false. printBackground - Print background graphics. Defaults to false. scale - Scale of the webpage rendering. Defaults to 1. paperWidth - Paper width in inches. Defaults to 8.5 inches. paperHeight - Paper height in inches. Defaults to 11 inches. marginTop - Top margin in inches. Defaults to 1cm (~0.4 inches). marginBottom - Bottom margin in inches. Defaults to 1cm (~0.4 inches). marginLeft - Left margin in inches. Defaults to 1cm (~0.4 inches). marginRight - Right margin in inches. Defaults to 1cm (~0.4 inches). pageRanges - Paper ranges to print, one based, e.g., '1-5, 8, 11-13'. Pages are printed in the document order, not in the order specified, and no more than once. Defaults to empty string, which implies the entire document is printed. The page numbers are quietly capped to actual page count of the document, and ranges beyond the end of the document are ignored. If this results in no pages to print, an error is reported. It is an error to specify a range with start greater than end. headerTemplate - HTML template for the print header. Should be valid HTML markup with following classes used to inject printing values into them: - `date`: formatted print date - `title`: document title - `url`: document location - `pageNumber`: current page number - `totalPages`: total pages in the document For example, `<span class=title></span>` would generate span containing the title. footerTemplate - HTML template for the print footer. Should use the same format as the `headerTemplate`. preferCSSPageSize - Whether or not to prefer page size as defined by css. Defaults to false, in which case the content will be scaled to fit the paper size. transferMode - return as stream Returns - data - Base64-encoded pdf data. Empty if |returnAsStream| is specified. (Encoded as a base64 string when passed over JSON) stream - A handle of the stream that holds resulting PDF data.

func (*Page) PrintToPDFWithParams

func (c *Page) PrintToPDFWithParams(ctx context.Context, v *PagePrintToPDFParams) (string, string, error)

PrintToPDFWithParams - Print page as PDF. Returns - data - Base64-encoded pdf data. Empty if |returnAsStream| is specified. (Encoded as a base64 string when passed over JSON) stream - A handle of the stream that holds resulting PDF data.

func (*Page) ProduceCompilationCache added in v2.1.1

func (c *Page) ProduceCompilationCache(ctx context.Context, scripts []*PageCompilationCacheParams) (*gcdmessage.ChromeResponse, error)

ProduceCompilationCache - Requests backend to produce compilation cache for the specified scripts. `scripts` are appeneded to the list of scripts for which the cache would be produced. The list may be reset during page navigation. When script with a matching URL is encountered, the cache is optionally produced upon backend discretion, based on internal heuristics. See also: `Page.compilationCacheProduced`. scripts -

func (*Page) ProduceCompilationCacheWithParams added in v2.1.1

func (c *Page) ProduceCompilationCacheWithParams(ctx context.Context, v *PageProduceCompilationCacheParams) (*gcdmessage.ChromeResponse, error)

ProduceCompilationCacheWithParams - Requests backend to produce compilation cache for the specified scripts. `scripts` are appeneded to the list of scripts for which the cache would be produced. The list may be reset during page navigation. When script with a matching URL is encountered, the cache is optionally produced upon backend discretion, based on internal heuristics. See also: `Page.compilationCacheProduced`.

func (*Page) Reload

func (c *Page) Reload(ctx context.Context, ignoreCache bool, scriptToEvaluateOnLoad string) (*gcdmessage.ChromeResponse, error)

Reload - Reloads given page optionally ignoring the cache. ignoreCache - If true, browser cache is ignored (as if the user pressed Shift+refresh). scriptToEvaluateOnLoad - If set, the script will be injected into all frames of the inspected page after reload. Argument will be ignored if reloading dataURL origin.

func (*Page) ReloadWithParams

func (c *Page) ReloadWithParams(ctx context.Context, v *PageReloadParams) (*gcdmessage.ChromeResponse, error)

ReloadWithParams - Reloads given page optionally ignoring the cache.

func (*Page) RemoveScriptToEvaluateOnLoad

func (c *Page) RemoveScriptToEvaluateOnLoad(ctx context.Context, identifier string) (*gcdmessage.ChromeResponse, error)

RemoveScriptToEvaluateOnLoad - Deprecated, please use removeScriptToEvaluateOnNewDocument instead. identifier -

func (*Page) RemoveScriptToEvaluateOnLoadWithParams

func (c *Page) RemoveScriptToEvaluateOnLoadWithParams(ctx context.Context, v *PageRemoveScriptToEvaluateOnLoadParams) (*gcdmessage.ChromeResponse, error)

RemoveScriptToEvaluateOnLoadWithParams - Deprecated, please use removeScriptToEvaluateOnNewDocument instead.

func (*Page) RemoveScriptToEvaluateOnNewDocument

func (c *Page) RemoveScriptToEvaluateOnNewDocument(ctx context.Context, identifier string) (*gcdmessage.ChromeResponse, error)

RemoveScriptToEvaluateOnNewDocument - Removes given script from the list. identifier -

func (*Page) RemoveScriptToEvaluateOnNewDocumentWithParams

func (c *Page) RemoveScriptToEvaluateOnNewDocumentWithParams(ctx context.Context, v *PageRemoveScriptToEvaluateOnNewDocumentParams) (*gcdmessage.ChromeResponse, error)

RemoveScriptToEvaluateOnNewDocumentWithParams - Removes given script from the list.

func (*Page) ResetNavigationHistory

func (c *Page) ResetNavigationHistory(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Resets navigation history for the current page.

func (*Page) ScreencastFrameAck

func (c *Page) ScreencastFrameAck(ctx context.Context, sessionId int) (*gcdmessage.ChromeResponse, error)

ScreencastFrameAck - Acknowledges that a screencast frame has been received by the frontend. sessionId - Frame number.

func (*Page) ScreencastFrameAckWithParams

func (c *Page) ScreencastFrameAckWithParams(ctx context.Context, v *PageScreencastFrameAckParams) (*gcdmessage.ChromeResponse, error)

ScreencastFrameAckWithParams - Acknowledges that a screencast frame has been received by the frontend.

func (*Page) SearchInResource

func (c *Page) SearchInResource(ctx context.Context, frameId string, url string, query string, caseSensitive bool, isRegex bool) ([]*DebuggerSearchMatch, error)

SearchInResource - Searches for given string in resource content. frameId - Frame id for resource to search in. url - URL of the resource to search in. query - String to search for. caseSensitive - If true, search is case sensitive. isRegex - If true, treats string parameter as regex. Returns - result - List of search matches.

func (*Page) SearchInResourceWithParams

func (c *Page) SearchInResourceWithParams(ctx context.Context, v *PageSearchInResourceParams) ([]*DebuggerSearchMatch, error)

SearchInResourceWithParams - Searches for given string in resource content. Returns - result - List of search matches.

func (*Page) SetAdBlockingEnabled

func (c *Page) SetAdBlockingEnabled(ctx context.Context, enabled bool) (*gcdmessage.ChromeResponse, error)

SetAdBlockingEnabled - Enable Chrome's experimental ad filter on all sites. enabled - Whether to block ads.

func (*Page) SetAdBlockingEnabledWithParams

func (c *Page) SetAdBlockingEnabledWithParams(ctx context.Context, v *PageSetAdBlockingEnabledParams) (*gcdmessage.ChromeResponse, error)

SetAdBlockingEnabledWithParams - Enable Chrome's experimental ad filter on all sites.

func (*Page) SetBypassCSP

func (c *Page) SetBypassCSP(ctx context.Context, enabled bool) (*gcdmessage.ChromeResponse, error)

SetBypassCSP - Enable page Content Security Policy by-passing. enabled - Whether to bypass page CSP.

func (*Page) SetBypassCSPWithParams

func (c *Page) SetBypassCSPWithParams(ctx context.Context, v *PageSetBypassCSPParams) (*gcdmessage.ChromeResponse, error)

SetBypassCSPWithParams - Enable page Content Security Policy by-passing.

func (*Page) SetDeviceMetricsOverride

func (c *Page) SetDeviceMetricsOverride(ctx context.Context, width int, height int, deviceScaleFactor float64, mobile bool, scale float64, screenWidth int, screenHeight int, positionX int, positionY int, dontSetVisibleSize bool, screenOrientation *EmulationScreenOrientation, viewport *PageViewport) (*gcdmessage.ChromeResponse, error)

SetDeviceMetricsOverride - Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media query results). width - Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override. height - Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override. deviceScaleFactor - Overriding device scale factor value. 0 disables the override. mobile - Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more. scale - Scale to apply to resulting view image. screenWidth - Overriding screen width value in pixels (minimum 0, maximum 10000000). screenHeight - Overriding screen height value in pixels (minimum 0, maximum 10000000). positionX - Overriding view X position on screen in pixels (minimum 0, maximum 10000000). positionY - Overriding view Y position on screen in pixels (minimum 0, maximum 10000000). dontSetVisibleSize - Do not set visible view size, rely upon explicit setVisibleSize call. screenOrientation - Screen orientation override. viewport - The viewport dimensions and scale. If not set, the override is cleared.

func (*Page) SetDeviceMetricsOverrideWithParams

func (c *Page) SetDeviceMetricsOverrideWithParams(ctx context.Context, v *PageSetDeviceMetricsOverrideParams) (*gcdmessage.ChromeResponse, error)

SetDeviceMetricsOverrideWithParams - Overrides the values of device screen dimensions (window.screen.width, window.screen.height, window.innerWidth, window.innerHeight, and "device-width"/"device-height"-related CSS media query results).

func (*Page) SetDeviceOrientationOverride

func (c *Page) SetDeviceOrientationOverride(ctx context.Context, alpha float64, beta float64, gamma float64) (*gcdmessage.ChromeResponse, error)

SetDeviceOrientationOverride - Overrides the Device Orientation. alpha - Mock alpha beta - Mock beta gamma - Mock gamma

func (*Page) SetDeviceOrientationOverrideWithParams

func (c *Page) SetDeviceOrientationOverrideWithParams(ctx context.Context, v *PageSetDeviceOrientationOverrideParams) (*gcdmessage.ChromeResponse, error)

SetDeviceOrientationOverrideWithParams - Overrides the Device Orientation.

func (*Page) SetDocumentContent

func (c *Page) SetDocumentContent(ctx context.Context, frameId string, html string) (*gcdmessage.ChromeResponse, error)

SetDocumentContent - Sets given markup as the document's HTML. frameId - Frame id to set HTML for. html - HTML content to set.

func (*Page) SetDocumentContentWithParams

func (c *Page) SetDocumentContentWithParams(ctx context.Context, v *PageSetDocumentContentParams) (*gcdmessage.ChromeResponse, error)

SetDocumentContentWithParams - Sets given markup as the document's HTML.

func (*Page) SetDownloadBehavior

func (c *Page) SetDownloadBehavior(ctx context.Context, behavior string, downloadPath string) (*gcdmessage.ChromeResponse, error)

SetDownloadBehavior - Set the behavior when downloading a file. behavior - Whether to allow all or deny all download requests, or use default Chrome behavior if available (otherwise deny). downloadPath - The default path to save downloaded files to. This is required if behavior is set to 'allow'

func (*Page) SetDownloadBehaviorWithParams

func (c *Page) SetDownloadBehaviorWithParams(ctx context.Context, v *PageSetDownloadBehaviorParams) (*gcdmessage.ChromeResponse, error)

SetDownloadBehaviorWithParams - Set the behavior when downloading a file.

func (*Page) SetFontFamilies

func (c *Page) SetFontFamilies(ctx context.Context, fontFamilies *PageFontFamilies, forScripts []*PageScriptFontFamilies) (*gcdmessage.ChromeResponse, error)

SetFontFamilies - Set generic font families. fontFamilies - Specifies font families to set. If a font family is not specified, it won't be changed. forScripts - Specifies font families to set for individual scripts.

func (*Page) SetFontFamiliesWithParams

func (c *Page) SetFontFamiliesWithParams(ctx context.Context, v *PageSetFontFamiliesParams) (*gcdmessage.ChromeResponse, error)

SetFontFamiliesWithParams - Set generic font families.

func (*Page) SetFontSizes

func (c *Page) SetFontSizes(ctx context.Context, fontSizes *PageFontSizes) (*gcdmessage.ChromeResponse, error)

SetFontSizes - Set default font sizes. fontSizes - Specifies font sizes to set. If a font size is not specified, it won't be changed.

func (*Page) SetFontSizesWithParams

func (c *Page) SetFontSizesWithParams(ctx context.Context, v *PageSetFontSizesParams) (*gcdmessage.ChromeResponse, error)

SetFontSizesWithParams - Set default font sizes.

func (*Page) SetGeolocationOverride

func (c *Page) SetGeolocationOverride(ctx context.Context, latitude float64, longitude float64, accuracy float64) (*gcdmessage.ChromeResponse, error)

SetGeolocationOverride - Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable. latitude - Mock latitude longitude - Mock longitude accuracy - Mock accuracy

func (*Page) SetGeolocationOverrideWithParams

func (c *Page) SetGeolocationOverrideWithParams(ctx context.Context, v *PageSetGeolocationOverrideParams) (*gcdmessage.ChromeResponse, error)

SetGeolocationOverrideWithParams - Overrides the Geolocation Position or Error. Omitting any of the parameters emulates position unavailable.

func (*Page) SetInterceptFileChooserDialog

func (c *Page) SetInterceptFileChooserDialog(ctx context.Context, enabled bool) (*gcdmessage.ChromeResponse, error)

SetInterceptFileChooserDialog - Intercept file chooser requests and transfer control to protocol clients. When file chooser interception is enabled, native file chooser dialog is not shown. Instead, a protocol event `Page.fileChooserOpened` is emitted. enabled -

func (*Page) SetInterceptFileChooserDialogWithParams

func (c *Page) SetInterceptFileChooserDialogWithParams(ctx context.Context, v *PageSetInterceptFileChooserDialogParams) (*gcdmessage.ChromeResponse, error)

SetInterceptFileChooserDialogWithParams - Intercept file chooser requests and transfer control to protocol clients. When file chooser interception is enabled, native file chooser dialog is not shown. Instead, a protocol event `Page.fileChooserOpened` is emitted.

func (*Page) SetLifecycleEventsEnabled

func (c *Page) SetLifecycleEventsEnabled(ctx context.Context, enabled bool) (*gcdmessage.ChromeResponse, error)

SetLifecycleEventsEnabled - Controls whether page will emit lifecycle events. enabled - If true, starts emitting lifecycle events.

func (*Page) SetLifecycleEventsEnabledWithParams

func (c *Page) SetLifecycleEventsEnabledWithParams(ctx context.Context, v *PageSetLifecycleEventsEnabledParams) (*gcdmessage.ChromeResponse, error)

SetLifecycleEventsEnabledWithParams - Controls whether page will emit lifecycle events.

func (*Page) SetRPHRegistrationMode added in v2.3.0

func (c *Page) SetRPHRegistrationMode(ctx context.Context, mode string) (*gcdmessage.ChromeResponse, error)

SetRPHRegistrationMode - Extensions for Custom Handlers API: https://html.spec.whatwg.org/multipage/system-state.html#rph-automation mode - enum values: none, autoAccept, autoReject, autoOptOut

func (*Page) SetRPHRegistrationModeWithParams added in v2.3.0

func (c *Page) SetRPHRegistrationModeWithParams(ctx context.Context, v *PageSetRPHRegistrationModeParams) (*gcdmessage.ChromeResponse, error)

SetRPHRegistrationModeWithParams - Extensions for Custom Handlers API: https://html.spec.whatwg.org/multipage/system-state.html#rph-automation

func (*Page) SetSPCTransactionMode added in v2.2.4

func (c *Page) SetSPCTransactionMode(ctx context.Context, mode string) (*gcdmessage.ChromeResponse, error)

SetSPCTransactionMode - Sets the Secure Payment Confirmation transaction mode. https://w3c.github.io/secure-payment-confirmation/#sctn-automation-set-spc-transaction-mode mode - enum values: none, autoAccept, autoReject, autoOptOut

func (*Page) SetSPCTransactionModeWithParams added in v2.2.4

func (c *Page) SetSPCTransactionModeWithParams(ctx context.Context, v *PageSetSPCTransactionModeParams) (*gcdmessage.ChromeResponse, error)

SetSPCTransactionModeWithParams - Sets the Secure Payment Confirmation transaction mode. https://w3c.github.io/secure-payment-confirmation/#sctn-automation-set-spc-transaction-mode

func (*Page) SetTouchEmulationEnabled

func (c *Page) SetTouchEmulationEnabled(ctx context.Context, enabled bool, configuration string) (*gcdmessage.ChromeResponse, error)

SetTouchEmulationEnabled - Toggles mouse event-based touch event emulation. enabled - Whether the touch event emulation should be enabled. configuration - Touch/gesture events configuration. Default: current platform.

func (*Page) SetTouchEmulationEnabledWithParams

func (c *Page) SetTouchEmulationEnabledWithParams(ctx context.Context, v *PageSetTouchEmulationEnabledParams) (*gcdmessage.ChromeResponse, error)

SetTouchEmulationEnabledWithParams - Toggles mouse event-based touch event emulation.

func (*Page) SetWebLifecycleState

func (c *Page) SetWebLifecycleState(ctx context.Context, state string) (*gcdmessage.ChromeResponse, error)

SetWebLifecycleState - Tries to update the web lifecycle state of the page. It will transition the page to the given state according to: https://github.com/WICG/web-lifecycle/ state - Target lifecycle state

func (*Page) SetWebLifecycleStateWithParams

func (c *Page) SetWebLifecycleStateWithParams(ctx context.Context, v *PageSetWebLifecycleStateParams) (*gcdmessage.ChromeResponse, error)

SetWebLifecycleStateWithParams - Tries to update the web lifecycle state of the page. It will transition the page to the given state according to: https://github.com/WICG/web-lifecycle/

func (*Page) StartScreencast

func (c *Page) StartScreencast(ctx context.Context, format string, quality int, maxWidth int, maxHeight int, everyNthFrame int) (*gcdmessage.ChromeResponse, error)

StartScreencast - Starts sending each frame using the `screencastFrame` event. format - Image compression format. quality - Compression quality from range [0..100]. maxWidth - Maximum screenshot width. maxHeight - Maximum screenshot height. everyNthFrame - Send every n-th frame.

func (*Page) StartScreencastWithParams

func (c *Page) StartScreencastWithParams(ctx context.Context, v *PageStartScreencastParams) (*gcdmessage.ChromeResponse, error)

StartScreencastWithParams - Starts sending each frame using the `screencastFrame` event.

func (*Page) StopLoading

func (c *Page) StopLoading(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Force the page stop all navigations and pending resource fetches.

func (*Page) StopScreencast

func (c *Page) StopScreencast(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Stops sending each frame in the `screencastFrame`.

func (*Page) WaitForDebugger

func (c *Page) WaitForDebugger(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Pauses page execution. Can be resumed using generic Runtime.runIfWaitingForDebugger.

type PageAdFrameStatus added in v2.2.4

type PageAdFrameStatus struct {
	AdFrameType  string   `json:"adFrameType"`            //  enum values: none, child, root
	Explanations []string `json:"explanations,omitempty"` //  enum values: ParentIsAd, CreatedByAdScript, MatchedBlockingRule
}

Indicates whether a frame has been identified as an ad and why.

type PageAdScriptId added in v2.2.6

type PageAdScriptId struct {
	ScriptId   string `json:"scriptId"`   // Script Id of the bottom-most script which caused the frame to be labelled as an ad.
	DebuggerId string `json:"debuggerId"` // Id of adScriptId's debugger.
}

Identifies the bottom-most script which caused the frame to be labelled as an ad.

type PageAddCompilationCacheParams

type PageAddCompilationCacheParams struct {
	//
	Url string `json:"url"`
	// Base64-encoded data (Encoded as a base64 string when passed over JSON)
	Data string `json:"data"`
}

type PageAddScriptToEvaluateOnLoadParams

type PageAddScriptToEvaluateOnLoadParams struct {
	//
	ScriptSource string `json:"scriptSource"`
}

type PageAddScriptToEvaluateOnNewDocumentParams

type PageAddScriptToEvaluateOnNewDocumentParams struct {
	//
	Source string `json:"source"`
	// If specified, creates an isolated world with the given name and evaluates given script in it. This world name will be used as the ExecutionContextDescription::name when the corresponding event is emitted.
	WorldName string `json:"worldName,omitempty"`
	// Specifies whether command line API should be available to the script, defaults to false.
	IncludeCommandLineAPI bool `json:"includeCommandLineAPI,omitempty"`
}

type PageAppManifestError

type PageAppManifestError struct {
	Message  string `json:"message"`  // Error message.
	Critical int    `json:"critical"` // If criticial, this is a non-recoverable parse error.
	Line     int    `json:"line"`     // Error line.
	Column   int    `json:"column"`   // Error column.
}

Error while paring app manifest.

type PageAppManifestParsedProperties

type PageAppManifestParsedProperties struct {
	Scope string `json:"scope"` // Computed scope value
}

Parsed app manifest properties.

type PageBackForwardCacheNotRestoredExplanation added in v2.2.4

type PageBackForwardCacheNotRestoredExplanation struct {
	Type    string `json:"type"`              // Type of the reason enum values: SupportPending, PageSupportNeeded, Circumstantial
	Reason  string `json:"reason"`            // Not restored reason enum values: NotPrimaryMainFrame, BackForwardCacheDisabled, RelatedActiveContentsExist, HTTPStatusNotOK, SchemeNotHTTPOrHTTPS, Loading, WasGrantedMediaAccess, DisableForRenderFrameHostCalled, DomainNotAllowed, HTTPMethodNotGET, SubframeIsNavigating, Timeout, CacheLimit, JavaScriptExecution, RendererProcessKilled, RendererProcessCrashed, SchedulerTrackedFeatureUsed, ConflictingBrowsingInstance, CacheFlushed, ServiceWorkerVersionActivation, SessionRestored, ServiceWorkerPostMessage, EnteredBackForwardCacheBeforeServiceWorkerHostAdded, RenderFrameHostReused_SameSite, RenderFrameHostReused_CrossSite, ServiceWorkerClaim, IgnoreEventAndEvict, HaveInnerContents, TimeoutPuttingInCache, BackForwardCacheDisabledByLowMemory, BackForwardCacheDisabledByCommandLine, NetworkRequestDatapipeDrainedAsBytesConsumer, NetworkRequestRedirected, NetworkRequestTimeout, NetworkExceedsBufferLimit, NavigationCancelledWhileRestoring, NotMostRecentNavigationEntry, BackForwardCacheDisabledForPrerender, UserAgentOverrideDiffers, ForegroundCacheLimit, BrowsingInstanceNotSwapped, BackForwardCacheDisabledForDelegate, UnloadHandlerExistsInMainFrame, UnloadHandlerExistsInSubFrame, ServiceWorkerUnregistration, CacheControlNoStore, CacheControlNoStoreCookieModified, CacheControlNoStoreHTTPOnlyCookieModified, NoResponseHead, Unknown, ActivationNavigationsDisallowedForBug1234857, ErrorDocument, FencedFramesEmbedder, WebSocket, WebTransport, WebRTC, MainResourceHasCacheControlNoStore, MainResourceHasCacheControlNoCache, SubresourceHasCacheControlNoStore, SubresourceHasCacheControlNoCache, ContainsPlugins, DocumentLoaded, DedicatedWorkerOrWorklet, OutstandingNetworkRequestOthers, OutstandingIndexedDBTransaction, RequestedMIDIPermission, RequestedAudioCapturePermission, RequestedVideoCapturePermission, RequestedBackForwardCacheBlockedSensors, RequestedBackgroundWorkPermission, BroadcastChannel, IndexedDBConnection, WebXR, SharedWorker, WebLocks, WebHID, WebShare, RequestedStorageAccessGrant, WebNfc, OutstandingNetworkRequestFetch, OutstandingNetworkRequestXHR, AppBanner, Printing, WebDatabase, PictureInPicture, Portal, SpeechRecognizer, IdleManager, PaymentManager, SpeechSynthesis, KeyboardLock, WebOTPService, OutstandingNetworkRequestDirectSocket, InjectedJavascript, InjectedStyleSheet, KeepaliveRequest, IndexedDBEvent, Dummy, AuthorizationHeader, ContentSecurityHandler, ContentWebAuthenticationAPI, ContentFileChooser, ContentSerial, ContentFileSystemAccess, ContentMediaDevicesDispatcherHost, ContentWebBluetooth, ContentWebUSB, ContentMediaSessionService, ContentScreenReader, EmbedderPopupBlockerTabHelper, EmbedderSafeBrowsingTriggeredPopupBlocker, EmbedderSafeBrowsingThreatDetails, EmbedderAppBannerManager, EmbedderDomDistillerViewerSource, EmbedderDomDistillerSelfDeletingRequestDelegate, EmbedderOomInterventionTabHelper, EmbedderOfflinePage, EmbedderChromePasswordManagerClientBindCredentialManager, EmbedderPermissionRequestManager, EmbedderModalDialog, EmbedderExtensions, EmbedderExtensionMessaging, EmbedderExtensionMessagingForOpenPort, EmbedderExtensionSentMessageToCachedFrame
	Context string `json:"context,omitempty"` // Context associated with the reason. The meaning of this context is dependent on the reason: - EmbedderExtensionSentMessageToCachedFrame: the extension ID.
}

No Description.

type PageBackForwardCacheNotRestoredExplanationTree added in v2.2.5

type PageBackForwardCacheNotRestoredExplanationTree struct {
	Url          string                                            `json:"url"`          // URL of each frame
	Explanations []*PageBackForwardCacheNotRestoredExplanation     `json:"explanations"` // Not restored reasons of each frame
	Children     []*PageBackForwardCacheNotRestoredExplanationTree `json:"children"`     // Array of children frame
}

No Description.

type PageBackForwardCacheNotUsedEvent added in v2.1.1

type PageBackForwardCacheNotUsedEvent struct {
	Method string `json:"method"`
	Params struct {
		LoaderId                    string                                          `json:"loaderId"`                              // The loader id for the associated navgation.
		FrameId                     string                                          `json:"frameId"`                               // The frame id of the associated frame.
		NotRestoredExplanations     []*PageBackForwardCacheNotRestoredExplanation   `json:"notRestoredExplanations"`               // Array of reasons why the page could not be cached. This must not be empty.
		NotRestoredExplanationsTree *PageBackForwardCacheNotRestoredExplanationTree `json:"notRestoredExplanationsTree,omitempty"` // Tree structure of reasons why the page could not be cached for each frame.
	} `json:"Params,omitempty"`
}

Fired for failed bfcache history navigations if BackForwardCache feature is enabled. Do not assume any ordering with the Page.frameNavigated event. This event is fired only for main-frame history navigation where the document changes (non-same-document navigations), when bfcache navigation fails.

type PageCaptureScreenshotParams

type PageCaptureScreenshotParams struct {
	// Image compression format (defaults to png).
	Format string `json:"format,omitempty"`
	// Compression quality from range [0..100] (jpeg only).
	Quality int `json:"quality,omitempty"`
	// Capture the screenshot of a given region only.
	Clip *PageViewport `json:"clip,omitempty"`
	// Capture the screenshot from the surface, rather than the view. Defaults to true.
	FromSurface bool `json:"fromSurface,omitempty"`
	// Capture the screenshot beyond the viewport. Defaults to false.
	CaptureBeyondViewport bool `json:"captureBeyondViewport,omitempty"`
	// Optimize image encoding for speed, not for resulting size (defaults to false)
	OptimizeForSpeed bool `json:"optimizeForSpeed,omitempty"`
}

type PageCaptureSnapshotParams

type PageCaptureSnapshotParams struct {
	// Format (defaults to mhtml).
	Format string `json:"format,omitempty"`
}

type PageCompilationCacheParams added in v2.1.1

type PageCompilationCacheParams struct {
	Url   string `json:"url"`             // The URL of the script to produce a compilation cache entry for.
	Eager bool   `json:"eager,omitempty"` // A hint to the backend whether eager compilation is recommended. (the actual compilation mode used is upon backend discretion).
}

Per-script compilation cache parameters for `Page.produceCompilationCache`

type PageCompilationCacheProducedEvent

type PageCompilationCacheProducedEvent struct {
	Method string `json:"method"`
	Params struct {
		Url  string `json:"url"`  //
		Data string `json:"data"` // Base64-encoded data (Encoded as a base64 string when passed over JSON)
	} `json:"Params,omitempty"`
}

Issued for every compilation cache generated. Is only available if Page.setGenerateCompilationCache is enabled.

type PageCreateIsolatedWorldParams

type PageCreateIsolatedWorldParams struct {
	// Id of the frame in which the isolated world should be created.
	FrameId string `json:"frameId"`
	// An optional name which is reported in the Execution Context.
	WorldName string `json:"worldName,omitempty"`
	// Whether or not universal access should be granted to the isolated world. This is a powerful option, use with caution.
	GrantUniveralAccess bool `json:"grantUniveralAccess,omitempty"`
}

type PageDeleteCookieParams

type PageDeleteCookieParams struct {
	// Name of the cookie to remove.
	CookieName string `json:"cookieName"`
	// URL to match cooke domain and path.
	Url string `json:"url"`
}

type PageDocumentOpenedEvent added in v2.0.7

type PageDocumentOpenedEvent struct {
	Method string `json:"method"`
	Params struct {
		Frame *PageFrame `json:"frame"` // Frame object.
	} `json:"Params,omitempty"`
}

Fired when opening document to write to.

type PageDomContentEventFiredEvent

type PageDomContentEventFiredEvent struct {
	Method string `json:"method"`
	Params struct {
		Timestamp float64 `json:"timestamp"` //
	} `json:"Params,omitempty"`
}

type PageDownloadProgressEvent

type PageDownloadProgressEvent struct {
	Method string `json:"method"`
	Params struct {
		Guid          string  `json:"guid"`          // Global unique identifier of the download.
		TotalBytes    float64 `json:"totalBytes"`    // Total expected bytes to download.
		ReceivedBytes float64 `json:"receivedBytes"` // Total bytes received.
		State         string  `json:"state"`         // Download status.
	} `json:"Params,omitempty"`
}

Fired when download makes progress. Last call has |done| == true. Deprecated. Use Browser.downloadProgress instead.

type PageDownloadWillBeginEvent

type PageDownloadWillBeginEvent struct {
	Method string `json:"method"`
	Params struct {
		FrameId           string `json:"frameId"`           // Id of the frame that caused download to begin.
		Guid              string `json:"guid"`              // Global unique identifier of the download.
		Url               string `json:"url"`               // URL of the resource being downloaded.
		SuggestedFilename string `json:"suggestedFilename"` // Suggested file name of the resource (the actual name of the file saved on disk may differ).
	} `json:"Params,omitempty"`
}

Fired when page is about to start a download. Deprecated. Use Browser.downloadWillBegin instead.

type PageFileChooserOpenedEvent

type PageFileChooserOpenedEvent struct {
	Method string `json:"method"`
	Params struct {
		FrameId       string `json:"frameId"`                 // Id of the frame containing input node.
		Mode          string `json:"mode"`                    // Input mode.
		BackendNodeId int    `json:"backendNodeId,omitempty"` // Input node id. Only present for file choosers opened via an <input type="file"> element.
	} `json:"Params,omitempty"`
}

Emitted only when `page.interceptFileChooser` is enabled.

type PageFontFamilies

type PageFontFamilies struct {
	Standard  string `json:"standard,omitempty"`  // The standard font-family.
	Fixed     string `json:"fixed,omitempty"`     // The fixed font-family.
	Serif     string `json:"serif,omitempty"`     // The serif font-family.
	SansSerif string `json:"sansSerif,omitempty"` // The sansSerif font-family.
	Cursive   string `json:"cursive,omitempty"`   // The cursive font-family.
	Fantasy   string `json:"fantasy,omitempty"`   // The fantasy font-family.
	Math      string `json:"math,omitempty"`      // The math font-family.
}

Generic font families collection.

type PageFontSizes

type PageFontSizes struct {
	Standard int `json:"standard,omitempty"` // Default standard font size.
	Fixed    int `json:"fixed,omitempty"`    // Default fixed font size.
}

Default font sizes.

type PageFrame

type PageFrame struct {
	Id                             string             `json:"id"`                             // Frame unique identifier.
	ParentId                       string             `json:"parentId,omitempty"`             // Parent frame identifier.
	LoaderId                       string             `json:"loaderId"`                       // Identifier of the loader associated with this frame.
	Name                           string             `json:"name,omitempty"`                 // Frame's name as specified in the tag.
	Url                            string             `json:"url"`                            // Frame document's URL without fragment.
	UrlFragment                    string             `json:"urlFragment,omitempty"`          // Frame document's URL fragment including the '#'.
	DomainAndRegistry              string             `json:"domainAndRegistry"`              // Frame document's registered domain, taking the public suffixes list into account. Extracted from the Frame's url. Example URLs: http://www.google.com/file.html -> "google.com"               http://a.b.co.uk/file.html      -> "b.co.uk"
	SecurityOrigin                 string             `json:"securityOrigin"`                 // Frame document's security origin.
	MimeType                       string             `json:"mimeType"`                       // Frame document's mimeType as determined by the browser.
	UnreachableUrl                 string             `json:"unreachableUrl,omitempty"`       // If the frame failed to load, this contains the URL that could not be loaded. Note that unlike url above, this URL may contain a fragment.
	AdFrameStatus                  *PageAdFrameStatus `json:"adFrameStatus,omitempty"`        // Indicates whether this frame was tagged as an ad and why.
	SecureContextType              string             `json:"secureContextType"`              // Indicates whether the main document is a secure context and explains why that is the case. enum values: Secure, SecureLocalhost, InsecureScheme, InsecureAncestor
	CrossOriginIsolatedContextType string             `json:"crossOriginIsolatedContextType"` // Indicates whether this is a cross origin isolated context. enum values: Isolated, NotIsolated, NotIsolatedFeatureDisabled
	GatedAPIFeatures               []string           `json:"gatedAPIFeatures"`               // Indicated which gated APIs / features are available. enum values: SharedArrayBuffers, SharedArrayBuffersTransferAllowed, PerformanceMeasureMemory, PerformanceProfile
}

Information about the Frame on the page.

type PageFrameAttachedEvent

type PageFrameAttachedEvent struct {
	Method string `json:"method"`
	Params struct {
		FrameId       string             `json:"frameId"`         // Id of the frame that has been attached.
		ParentFrameId string             `json:"parentFrameId"`   // Parent frame identifier.
		Stack         *RuntimeStackTrace `json:"stack,omitempty"` // JavaScript stack trace of when frame was attached, only set if frame initiated from script.
	} `json:"Params,omitempty"`
}

Fired when frame has been attached to its parent.

type PageFrameClearedScheduledNavigationEvent

type PageFrameClearedScheduledNavigationEvent struct {
	Method string `json:"method"`
	Params struct {
		FrameId string `json:"frameId"` // Id of the frame that has cleared its scheduled navigation.
	} `json:"Params,omitempty"`
}

Fired when frame no longer has a scheduled navigation.

type PageFrameDetachedEvent

type PageFrameDetachedEvent struct {
	Method string `json:"method"`
	Params struct {
		FrameId string `json:"frameId"` // Id of the frame that has been detached.
		Reason  string `json:"reason"`  //
	} `json:"Params,omitempty"`
}

Fired when frame has been detached from its parent.

type PageFrameNavigatedEvent

type PageFrameNavigatedEvent struct {
	Method string `json:"method"`
	Params struct {
		Frame *PageFrame `json:"frame"` // Frame object.
		Type  string     `json:"type"`  //  enum values: Navigation, BackForwardCacheRestore
	} `json:"Params,omitempty"`
}

Fired once navigation of the frame has completed. Frame is now associated with the new loader.

type PageFrameRequestedNavigationEvent

type PageFrameRequestedNavigationEvent struct {
	Method string `json:"method"`
	Params struct {
		FrameId     string `json:"frameId"`     // Id of the frame that is being navigated.
		Reason      string `json:"reason"`      // The reason for the navigation. enum values: formSubmissionGet, formSubmissionPost, httpHeaderRefresh, scriptInitiated, metaTagRefresh, pageBlockInterstitial, reload, anchorClick
		Url         string `json:"url"`         // The destination URL for the requested navigation.
		Disposition string `json:"disposition"` // The disposition for the navigation. enum values: currentTab, newTab, newWindow, download
	} `json:"Params,omitempty"`
}

Fired when a renderer-initiated navigation is requested. Navigation may still be cancelled after the event is issued.

type PageFrameResource

type PageFrameResource struct {
	Url          string  `json:"url"`                    // Resource URL.
	Type         string  `json:"type"`                   // Type of this resource. enum values: Document, Stylesheet, Image, Media, Font, Script, TextTrack, XHR, Fetch, Prefetch, EventSource, WebSocket, Manifest, SignedExchange, Ping, CSPViolationReport, Preflight, Other
	MimeType     string  `json:"mimeType"`               // Resource mimeType as determined by the browser.
	LastModified float64 `json:"lastModified,omitempty"` // last-modified timestamp as reported by server.
	ContentSize  float64 `json:"contentSize,omitempty"`  // Resource content size.
	Failed       bool    `json:"failed,omitempty"`       // True if the resource failed to load.
	Canceled     bool    `json:"canceled,omitempty"`     // True if the resource was canceled during loading.
}

Information about the Resource on the page.

type PageFrameResourceTree

type PageFrameResourceTree struct {
	Frame       *PageFrame               `json:"frame"`                 // Frame information for this tree item.
	ChildFrames []*PageFrameResourceTree `json:"childFrames,omitempty"` // Child frames.
	Resources   []*PageFrameResource     `json:"resources"`             // Information about frame resources.
}

Information about the Frame hierarchy along with their cached resources.

type PageFrameScheduledNavigationEvent

type PageFrameScheduledNavigationEvent struct {
	Method string `json:"method"`
	Params struct {
		FrameId string  `json:"frameId"` // Id of the frame that has scheduled a navigation.
		Delay   float64 `json:"delay"`   // Delay (in seconds) until the navigation is scheduled to begin. The navigation is not guaranteed to start.
		Reason  string  `json:"reason"`  // The reason for the navigation. enum values: formSubmissionGet, formSubmissionPost, httpHeaderRefresh, scriptInitiated, metaTagRefresh, pageBlockInterstitial, reload, anchorClick
		Url     string  `json:"url"`     // The destination URL for the scheduled navigation.
	} `json:"Params,omitempty"`
}

Fired when frame schedules a potential navigation.

type PageFrameStartedLoadingEvent

type PageFrameStartedLoadingEvent struct {
	Method string `json:"method"`
	Params struct {
		FrameId string `json:"frameId"` // Id of the frame that has started loading.
	} `json:"Params,omitempty"`
}

Fired when frame has started loading.

type PageFrameStoppedLoadingEvent

type PageFrameStoppedLoadingEvent struct {
	Method string `json:"method"`
	Params struct {
		FrameId string `json:"frameId"` // Id of the frame that has stopped loading.
	} `json:"Params,omitempty"`
}

Fired when frame has stopped loading.

type PageFrameTree

type PageFrameTree struct {
	Frame       *PageFrame       `json:"frame"`                 // Frame information for this tree item.
	ChildFrames []*PageFrameTree `json:"childFrames,omitempty"` // Child frames.
}

Information about the Frame hierarchy.

type PageGenerateTestReportParams

type PageGenerateTestReportParams struct {
	// Message to be displayed in the report.
	Message string `json:"message"`
	// Specifies the endpoint group to deliver the report to.
	Group string `json:"group,omitempty"`
}

type PageGetAdScriptIdParams added in v2.3.0

type PageGetAdScriptIdParams struct {
	//
	FrameId string `json:"frameId"`
}

type PageGetOriginTrialsParams added in v2.2.4

type PageGetOriginTrialsParams struct {
	//
	FrameId string `json:"frameId"`
}

type PageGetPermissionsPolicyStateParams added in v2.1.1

type PageGetPermissionsPolicyStateParams struct {
	//
	FrameId string `json:"frameId"`
}

type PageGetResourceContentParams

type PageGetResourceContentParams struct {
	// Frame id to get resource for.
	FrameId string `json:"frameId"`
	// URL of the resource to get content for.
	Url string `json:"url"`
}

type PageHandleJavaScriptDialogParams

type PageHandleJavaScriptDialogParams struct {
	// Whether to accept or dismiss the dialog.
	Accept bool `json:"accept"`
	// The text to enter into the dialog prompt before accepting. Used only if this is a prompt dialog.
	PromptText string `json:"promptText,omitempty"`
}

type PageInstallabilityError

type PageInstallabilityError struct {
	ErrorId        string                             `json:"errorId"`        // The error id (e.g. 'manifest-missing-suitable-icon').
	ErrorArguments []*PageInstallabilityErrorArgument `json:"errorArguments"` // The list of error arguments (e.g. {name:'minimum-icon-size-in-pixels', value:'64'}).
}

The installability error

type PageInstallabilityErrorArgument

type PageInstallabilityErrorArgument struct {
	Name  string `json:"name"`  // Argument name (e.g. name:'minimum-icon-size-in-pixels').
	Value string `json:"value"` // Argument value (e.g. value:'64').
}

No Description.

type PageJavascriptDialogClosedEvent

type PageJavascriptDialogClosedEvent struct {
	Method string `json:"method"`
	Params struct {
		Result    bool   `json:"result"`    // Whether dialog was confirmed.
		UserInput string `json:"userInput"` // User input in case of prompt.
	} `json:"Params,omitempty"`
}

Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) has been closed.

type PageJavascriptDialogOpeningEvent

type PageJavascriptDialogOpeningEvent struct {
	Method string `json:"method"`
	Params struct {
		Url               string `json:"url"`                     // Frame url.
		Message           string `json:"message"`                 // Message that will be displayed by the dialog.
		Type              string `json:"type"`                    // Dialog type. enum values: alert, confirm, prompt, beforeunload
		HasBrowserHandler bool   `json:"hasBrowserHandler"`       // True iff browser is capable showing or acting on the given dialog. When browser has no dialog handler for given target, calling alert while Page domain is engaged will stall the page execution. Execution can be resumed via calling Page.handleJavaScriptDialog.
		DefaultPrompt     string `json:"defaultPrompt,omitempty"` // Default dialog prompt.
	} `json:"Params,omitempty"`
}

Fired when a JavaScript initiated dialog (alert, confirm, prompt, or onbeforeunload) is about to open.

type PageLayoutViewport

type PageLayoutViewport struct {
	PageX        int `json:"pageX"`        // Horizontal offset relative to the document (CSS pixels).
	PageY        int `json:"pageY"`        // Vertical offset relative to the document (CSS pixels).
	ClientWidth  int `json:"clientWidth"`  // Width (CSS pixels), excludes scrollbar if present.
	ClientHeight int `json:"clientHeight"` // Height (CSS pixels), excludes scrollbar if present.
}

Layout viewport position and dimensions.

type PageLifecycleEventEvent

type PageLifecycleEventEvent struct {
	Method string `json:"method"`
	Params struct {
		FrameId   string  `json:"frameId"`   // Id of the frame.
		LoaderId  string  `json:"loaderId"`  // Loader identifier. Empty string if the request is fetched from worker.
		Name      string  `json:"name"`      //
		Timestamp float64 `json:"timestamp"` //
	} `json:"Params,omitempty"`
}

Fired for top level page lifecycle events such as navigation, load, paint, etc.

type PageLoadEventFiredEvent

type PageLoadEventFiredEvent struct {
	Method string `json:"method"`
	Params struct {
		Timestamp float64 `json:"timestamp"` //
	} `json:"Params,omitempty"`
}
type PageNavigateParams struct {
	// URL to navigate the page to.
	Url string `json:"url"`
	// Referrer URL.
	Referrer string `json:"referrer,omitempty"`
	// Intended transition type. enum values: link, typed, address_bar, auto_bookmark, auto_subframe, manual_subframe, generated, auto_toplevel, form_submit, reload, keyword, keyword_generated, other
	TransitionType string `json:"transitionType,omitempty"`
	// Frame id to navigate, if not specified navigates the top frame.
	FrameId string `json:"frameId,omitempty"`
	// Referrer-policy used for the navigation. enum values: noReferrer, noReferrerWhenDowngrade, origin, originWhenCrossOrigin, sameOrigin, strictOrigin, strictOriginWhenCrossOrigin, unsafeUrl
	ReferrerPolicy string `json:"referrerPolicy,omitempty"`
}
type PageNavigateToHistoryEntryParams struct {
	// Unique id of the entry to navigate to.
	EntryId int `json:"entryId"`
}
type PageNavigatedWithinDocumentEvent struct {
	Method string `json:"method"`
	Params struct {
		FrameId string `json:"frameId"` // Id of the frame.
		Url     string `json:"url"`     // Frame's new url.
	} `json:"Params,omitempty"`
}

Fired when same-document navigation happens, e.g. due to history API usage or anchor navigation.

type PageNavigationEntry struct {
	Id             int    `json:"id"`             // Unique id of the navigation history entry.
	Url            string `json:"url"`            // URL of the navigation history entry.
	UserTypedURL   string `json:"userTypedURL"`   // URL that the user typed in the url bar.
	Title          string `json:"title"`          // Title of the navigation history entry.
	TransitionType string `json:"transitionType"` // Transition type. enum values: link, typed, address_bar, auto_bookmark, auto_subframe, manual_subframe, generated, auto_toplevel, form_submit, reload, keyword, keyword_generated, other
}

Navigation history entry.

type PageOriginTrial added in v2.1.2

type PageOriginTrial struct {
	TrialName        string                            `json:"trialName"`        //
	Status           string                            `json:"status"`           //  enum values: Enabled, ValidTokenNotProvided, OSNotSupported, TrialNotAllowed
	TokensWithStatus []*PageOriginTrialTokenWithStatus `json:"tokensWithStatus"` //
}

No Description.

type PageOriginTrialToken added in v2.1.2

type PageOriginTrialToken struct {
	Origin           string  `json:"origin"`           //
	MatchSubDomains  bool    `json:"matchSubDomains"`  //
	TrialName        string  `json:"trialName"`        //
	ExpiryTime       float64 `json:"expiryTime"`       //
	IsThirdParty     bool    `json:"isThirdParty"`     //
	UsageRestriction string  `json:"usageRestriction"` //  enum values: None, Subset
}

No Description.

type PageOriginTrialTokenWithStatus added in v2.1.2

type PageOriginTrialTokenWithStatus struct {
	RawTokenText string                `json:"rawTokenText"`          //
	ParsedToken  *PageOriginTrialToken `json:"parsedToken,omitempty"` // `parsedToken` is present only when the token is extractable and parsable.
	Status       string                `json:"status"`                //  enum values: Success, NotSupported, Insecure, Expired, WrongOrigin, InvalidSignature, Malformed, WrongVersion, FeatureDisabled, TokenDisabled, FeatureDisabledForUser, UnknownTrial
}

No Description.

type PagePermissionsPolicyBlockLocator added in v2.1.1

type PagePermissionsPolicyBlockLocator struct {
	FrameId     string `json:"frameId"`     //
	BlockReason string `json:"blockReason"` //  enum values: Header, IframeAttribute, InFencedFrameTree, InIsolatedApp
}

No Description.

type PagePermissionsPolicyFeatureState added in v2.1.1

type PagePermissionsPolicyFeatureState struct {
	Feature string                             `json:"feature"`           //  enum values: accelerometer, ambient-light-sensor, attribution-reporting, autoplay, bluetooth, browsing-topics, camera, ch-dpr, ch-device-memory, ch-downlink, ch-ect, ch-prefers-color-scheme, ch-prefers-reduced-motion, ch-rtt, ch-save-data, ch-ua, ch-ua-arch, ch-ua-bitness, ch-ua-platform, ch-ua-model, ch-ua-mobile, ch-ua-full, ch-ua-full-version, ch-ua-full-version-list, ch-ua-platform-version, ch-ua-reduced, ch-ua-wow64, ch-viewport-height, ch-viewport-width, ch-width, clipboard-read, clipboard-write, compute-pressure, cross-origin-isolated, direct-sockets, display-capture, document-domain, encrypted-media, execution-while-out-of-viewport, execution-while-not-rendered, focus-without-user-activation, fullscreen, frobulate, gamepad, geolocation, gyroscope, hid, identity-credentials-get, idle-detection, interest-cohort, join-ad-interest-group, keyboard-map, local-fonts, magnetometer, microphone, midi, otp-credentials, payment, picture-in-picture, private-aggregation, private-state-token-issuance, private-state-token-redemption, publickey-credentials-get, run-ad-auction, screen-wake-lock, serial, shared-autofill, shared-storage, shared-storage-select-url, smart-card, storage-access, sync-xhr, unload, usb, vertical-scroll, web-share, window-management, window-placement, xr-spatial-tracking
	Allowed bool                               `json:"allowed"`           //
	Locator *PagePermissionsPolicyBlockLocator `json:"locator,omitempty"` //
}

No Description.

type PagePrintToPDFParams

type PagePrintToPDFParams struct {
	// Paper orientation. Defaults to false.
	Landscape bool `json:"landscape,omitempty"`
	// Display header and footer. Defaults to false.
	DisplayHeaderFooter bool `json:"displayHeaderFooter,omitempty"`
	// Print background graphics. Defaults to false.
	PrintBackground bool `json:"printBackground,omitempty"`
	// Scale of the webpage rendering. Defaults to 1.
	Scale float64 `json:"scale,omitempty"`
	// Paper width in inches. Defaults to 8.5 inches.
	PaperWidth float64 `json:"paperWidth,omitempty"`
	// Paper height in inches. Defaults to 11 inches.
	PaperHeight float64 `json:"paperHeight,omitempty"`
	// Top margin in inches. Defaults to 1cm (~0.4 inches).
	MarginTop float64 `json:"marginTop,omitempty"`
	// Bottom margin in inches. Defaults to 1cm (~0.4 inches).
	MarginBottom float64 `json:"marginBottom,omitempty"`
	// Left margin in inches. Defaults to 1cm (~0.4 inches).
	MarginLeft float64 `json:"marginLeft,omitempty"`
	// Right margin in inches. Defaults to 1cm (~0.4 inches).
	MarginRight float64 `json:"marginRight,omitempty"`
	// Paper ranges to print, one based, e.g., '1-5, 8, 11-13'. Pages are printed in the document order, not in the order specified, and no more than once. Defaults to empty string, which implies the entire document is printed. The page numbers are quietly capped to actual page count of the document, and ranges beyond the end of the document are ignored. If this results in no pages to print, an error is reported. It is an error to specify a range with start greater than end.
	PageRanges string `json:"pageRanges,omitempty"`
	// HTML template for the print header. Should be valid HTML markup with following classes used to inject printing values into them: - `date`: formatted print date - `title`: document title - `url`: document location - `pageNumber`: current page number - `totalPages`: total pages in the document  For example, `<span class=title></span>` would generate span containing the title.
	HeaderTemplate string `json:"headerTemplate,omitempty"`
	// HTML template for the print footer. Should use the same format as the `headerTemplate`.
	FooterTemplate string `json:"footerTemplate,omitempty"`
	// Whether or not to prefer page size as defined by css. Defaults to false, in which case the content will be scaled to fit the paper size.
	PreferCSSPageSize bool `json:"preferCSSPageSize,omitempty"`
	// return as stream
	TransferMode string `json:"transferMode,omitempty"`
}

type PageProduceCompilationCacheParams added in v2.1.1

type PageProduceCompilationCacheParams struct {
	//
	Scripts []*PageCompilationCacheParams `json:"scripts"`
}

type PageReloadParams

type PageReloadParams struct {
	// If true, browser cache is ignored (as if the user pressed Shift+refresh).
	IgnoreCache bool `json:"ignoreCache,omitempty"`
	// If set, the script will be injected into all frames of the inspected page after reload. Argument will be ignored if reloading dataURL origin.
	ScriptToEvaluateOnLoad string `json:"scriptToEvaluateOnLoad,omitempty"`
}

type PageRemoveScriptToEvaluateOnLoadParams

type PageRemoveScriptToEvaluateOnLoadParams struct {
	//
	Identifier string `json:"identifier"`
}

type PageRemoveScriptToEvaluateOnNewDocumentParams

type PageRemoveScriptToEvaluateOnNewDocumentParams struct {
	//
	Identifier string `json:"identifier"`
}

type PageScreencastFrameAckParams

type PageScreencastFrameAckParams struct {
	// Frame number.
	SessionId int `json:"sessionId"`
}

type PageScreencastFrameEvent

type PageScreencastFrameEvent struct {
	Method string `json:"method"`
	Params struct {
		Data      string                       `json:"data"`      // Base64-encoded compressed image. (Encoded as a base64 string when passed over JSON)
		Metadata  *PageScreencastFrameMetadata `json:"metadata"`  // Screencast frame metadata.
		SessionId int                          `json:"sessionId"` // Frame number.
	} `json:"Params,omitempty"`
}

Compressed image data requested by the `startScreencast`.

type PageScreencastFrameMetadata

type PageScreencastFrameMetadata struct {
	OffsetTop       float64 `json:"offsetTop"`           // Top offset in DIP.
	PageScaleFactor float64 `json:"pageScaleFactor"`     // Page scale factor.
	DeviceWidth     float64 `json:"deviceWidth"`         // Device screen width in DIP.
	DeviceHeight    float64 `json:"deviceHeight"`        // Device screen height in DIP.
	ScrollOffsetX   float64 `json:"scrollOffsetX"`       // Position of horizontal scroll in CSS pixels.
	ScrollOffsetY   float64 `json:"scrollOffsetY"`       // Position of vertical scroll in CSS pixels.
	Timestamp       float64 `json:"timestamp,omitempty"` // Frame swap timestamp.
}

Screencast frame metadata.

type PageScreencastVisibilityChangedEvent

type PageScreencastVisibilityChangedEvent struct {
	Method string `json:"method"`
	Params struct {
		Visible bool `json:"visible"` // True if the page is visible.
	} `json:"Params,omitempty"`
}

Fired when the page with currently enabled screencast was shown or hidden `.

type PageScriptFontFamilies added in v2.2.5

type PageScriptFontFamilies struct {
	Script       string            `json:"script"`       // Name of the script which these font families are defined for.
	FontFamilies *PageFontFamilies `json:"fontFamilies"` // Generic font families collection for the script.
}

Font families collection for a script.

type PageSearchInResourceParams

type PageSearchInResourceParams struct {
	// Frame id for resource to search in.
	FrameId string `json:"frameId"`
	// URL of the resource to search in.
	Url string `json:"url"`
	// String to search for.
	Query string `json:"query"`
	// If true, search is case sensitive.
	CaseSensitive bool `json:"caseSensitive,omitempty"`
	// If true, treats string parameter as regex.
	IsRegex bool `json:"isRegex,omitempty"`
}

type PageSetAdBlockingEnabledParams

type PageSetAdBlockingEnabledParams struct {
	// Whether to block ads.
	Enabled bool `json:"enabled"`
}

type PageSetBypassCSPParams

type PageSetBypassCSPParams struct {
	// Whether to bypass page CSP.
	Enabled bool `json:"enabled"`
}

type PageSetDeviceMetricsOverrideParams

type PageSetDeviceMetricsOverrideParams struct {
	// Overriding width value in pixels (minimum 0, maximum 10000000). 0 disables the override.
	Width int `json:"width"`
	// Overriding height value in pixels (minimum 0, maximum 10000000). 0 disables the override.
	Height int `json:"height"`
	// Overriding device scale factor value. 0 disables the override.
	DeviceScaleFactor float64 `json:"deviceScaleFactor"`
	// Whether to emulate mobile device. This includes viewport meta tag, overlay scrollbars, text autosizing and more.
	Mobile bool `json:"mobile"`
	// Scale to apply to resulting view image.
	Scale float64 `json:"scale,omitempty"`
	// Overriding screen width value in pixels (minimum 0, maximum 10000000).
	ScreenWidth int `json:"screenWidth,omitempty"`
	// Overriding screen height value in pixels (minimum 0, maximum 10000000).
	ScreenHeight int `json:"screenHeight,omitempty"`
	// Overriding view X position on screen in pixels (minimum 0, maximum 10000000).
	PositionX int `json:"positionX,omitempty"`
	// Overriding view Y position on screen in pixels (minimum 0, maximum 10000000).
	PositionY int `json:"positionY,omitempty"`
	// Do not set visible view size, rely upon explicit setVisibleSize call.
	DontSetVisibleSize bool `json:"dontSetVisibleSize,omitempty"`
	// Screen orientation override.
	ScreenOrientation *EmulationScreenOrientation `json:"screenOrientation,omitempty"`
	// The viewport dimensions and scale. If not set, the override is cleared.
	Viewport *PageViewport `json:"viewport,omitempty"`
}

type PageSetDeviceOrientationOverrideParams

type PageSetDeviceOrientationOverrideParams struct {
	// Mock alpha
	Alpha float64 `json:"alpha"`
	// Mock beta
	Beta float64 `json:"beta"`
	// Mock gamma
	Gamma float64 `json:"gamma"`
}

type PageSetDocumentContentParams

type PageSetDocumentContentParams struct {
	// Frame id to set HTML for.
	FrameId string `json:"frameId"`
	// HTML content to set.
	Html string `json:"html"`
}

type PageSetDownloadBehaviorParams

type PageSetDownloadBehaviorParams struct {
	// Whether to allow all or deny all download requests, or use default Chrome behavior if available (otherwise deny).
	Behavior string `json:"behavior"`
	// The default path to save downloaded files to. This is required if behavior is set to 'allow'
	DownloadPath string `json:"downloadPath,omitempty"`
}

type PageSetFontFamiliesParams

type PageSetFontFamiliesParams struct {
	// Specifies font families to set. If a font family is not specified, it won't be changed.
	FontFamilies *PageFontFamilies `json:"fontFamilies"`
	// Specifies font families to set for individual scripts.
	ForScripts []*PageScriptFontFamilies `json:"forScripts,omitempty"`
}

type PageSetFontSizesParams

type PageSetFontSizesParams struct {
	// Specifies font sizes to set. If a font size is not specified, it won't be changed.
	FontSizes *PageFontSizes `json:"fontSizes"`
}

type PageSetGeolocationOverrideParams

type PageSetGeolocationOverrideParams struct {
	// Mock latitude
	Latitude float64 `json:"latitude,omitempty"`
	// Mock longitude
	Longitude float64 `json:"longitude,omitempty"`
	// Mock accuracy
	Accuracy float64 `json:"accuracy,omitempty"`
}

type PageSetInterceptFileChooserDialogParams

type PageSetInterceptFileChooserDialogParams struct {
	//
	Enabled bool `json:"enabled"`
}

type PageSetLifecycleEventsEnabledParams

type PageSetLifecycleEventsEnabledParams struct {
	// If true, starts emitting lifecycle events.
	Enabled bool `json:"enabled"`
}

type PageSetRPHRegistrationModeParams added in v2.3.0

type PageSetRPHRegistrationModeParams struct {
	//  enum values: none, autoAccept, autoReject, autoOptOut
	Mode string `json:"mode"`
}

type PageSetSPCTransactionModeParams added in v2.2.4

type PageSetSPCTransactionModeParams struct {
	//  enum values: none, autoAccept, autoReject, autoOptOut
	Mode string `json:"mode"`
}

type PageSetTouchEmulationEnabledParams

type PageSetTouchEmulationEnabledParams struct {
	// Whether the touch event emulation should be enabled.
	Enabled bool `json:"enabled"`
	// Touch/gesture events configuration. Default: current platform.
	Configuration string `json:"configuration,omitempty"`
}

type PageSetWebLifecycleStateParams

type PageSetWebLifecycleStateParams struct {
	// Target lifecycle state
	State string `json:"state"`
}

type PageStartScreencastParams

type PageStartScreencastParams struct {
	// Image compression format.
	Format string `json:"format,omitempty"`
	// Compression quality from range [0..100].
	Quality int `json:"quality,omitempty"`
	// Maximum screenshot width.
	MaxWidth int `json:"maxWidth,omitempty"`
	// Maximum screenshot height.
	MaxHeight int `json:"maxHeight,omitempty"`
	// Send every n-th frame.
	EveryNthFrame int `json:"everyNthFrame,omitempty"`
}

type PageViewport

type PageViewport struct {
	X      float64 `json:"x"`      // X offset in device independent pixels (dip).
	Y      float64 `json:"y"`      // Y offset in device independent pixels (dip).
	Width  float64 `json:"width"`  // Rectangle width in device independent pixels (dip).
	Height float64 `json:"height"` // Rectangle height in device independent pixels (dip).
	Scale  float64 `json:"scale"`  // Page scale factor.
}

Viewport for capturing screenshot.

type PageVisualViewport

type PageVisualViewport struct {
	OffsetX      float64 `json:"offsetX"`        // Horizontal offset relative to the layout viewport (CSS pixels).
	OffsetY      float64 `json:"offsetY"`        // Vertical offset relative to the layout viewport (CSS pixels).
	PageX        float64 `json:"pageX"`          // Horizontal offset relative to the document (CSS pixels).
	PageY        float64 `json:"pageY"`          // Vertical offset relative to the document (CSS pixels).
	ClientWidth  float64 `json:"clientWidth"`    // Width (CSS pixels), excludes scrollbar if present.
	ClientHeight float64 `json:"clientHeight"`   // Height (CSS pixels), excludes scrollbar if present.
	Scale        float64 `json:"scale"`          // Scale relative to the ideal viewport (size at width=device-width).
	Zoom         float64 `json:"zoom,omitempty"` // Page zoom factor (CSS to device independent pixels ratio).
}

Visual viewport position, dimensions, and scale.

type PageWindowOpenEvent

type PageWindowOpenEvent struct {
	Method string `json:"method"`
	Params struct {
		Url            string   `json:"url"`            // The URL for the new window.
		WindowName     string   `json:"windowName"`     // Window name.
		WindowFeatures []string `json:"windowFeatures"` // An array of enabled window features.
		UserGesture    bool     `json:"userGesture"`    // Whether or not it was triggered by user gesture.
	} `json:"Params,omitempty"`
}

Fired when a new window is going to be opened, via window.open(), link click, form submission, etc.

type Performance

type Performance struct {
	// contains filtered or unexported fields
}

func NewPerformance

func NewPerformance(target gcdmessage.ChromeTargeter) *Performance

func (*Performance) Disable

Disable collecting and reporting metrics.

func (*Performance) Enable

func (c *Performance) Enable(ctx context.Context, timeDomain string) (*gcdmessage.ChromeResponse, error)

Enable - Enable collecting and reporting metrics. timeDomain - Time domain to use for collecting and reporting duration metrics.

func (*Performance) EnableWithParams

EnableWithParams - Enable collecting and reporting metrics.

func (*Performance) GetMetrics

func (c *Performance) GetMetrics(ctx context.Context) ([]*PerformanceMetric, error)

GetMetrics - Retrieve current values of run-time metrics. Returns - metrics - Current values for run-time metrics.

func (*Performance) SetTimeDomain

func (c *Performance) SetTimeDomain(ctx context.Context, timeDomain string) (*gcdmessage.ChromeResponse, error)

SetTimeDomain - Sets time domain to use for collecting and reporting duration metrics. Note that this must be called before enabling metrics collection. Calling this method while metrics collection is enabled returns an error. timeDomain - Time domain

func (*Performance) SetTimeDomainWithParams

SetTimeDomainWithParams - Sets time domain to use for collecting and reporting duration metrics. Note that this must be called before enabling metrics collection. Calling this method while metrics collection is enabled returns an error.

type PerformanceEnableParams

type PerformanceEnableParams struct {
	// Time domain to use for collecting and reporting duration metrics.
	TimeDomain string `json:"timeDomain,omitempty"`
}

type PerformanceMetric

type PerformanceMetric struct {
	Name  string  `json:"name"`  // Metric name.
	Value float64 `json:"value"` // Metric value.
}

Run-time execution metric.

type PerformanceMetricsEvent

type PerformanceMetricsEvent struct {
	Method string `json:"method"`
	Params struct {
		Metrics []*PerformanceMetric `json:"metrics"` // Current values of the metrics.
		Title   string               `json:"title"`   // Timestamp title.
	} `json:"Params,omitempty"`
}

Current values of the metrics.

type PerformanceSetTimeDomainParams

type PerformanceSetTimeDomainParams struct {
	// Time domain
	TimeDomain string `json:"timeDomain"`
}

type PerformanceTimeline added in v2.0.7

type PerformanceTimeline struct {
	// contains filtered or unexported fields
}

func NewPerformanceTimeline added in v2.0.7

func NewPerformanceTimeline(target gcdmessage.ChromeTargeter) *PerformanceTimeline

func (*PerformanceTimeline) Enable added in v2.0.7

func (c *PerformanceTimeline) Enable(ctx context.Context, eventTypes []string) (*gcdmessage.ChromeResponse, error)

Enable - Previously buffered events would be reported before method returns. See also: timelineEventAdded eventTypes - The types of event to report, as specified in https://w3c.github.io/performance-timeline/#dom-performanceentry-entrytype The specified filter overrides any previous filters, passing empty filter disables recording. Note that not all types exposed to the web platform are currently supported.

func (*PerformanceTimeline) EnableWithParams added in v2.0.7

EnableWithParams - Previously buffered events would be reported before method returns. See also: timelineEventAdded

type PerformanceTimelineEnableParams added in v2.0.7

type PerformanceTimelineEnableParams struct {
	// The types of event to report, as specified in https://w3c.github.io/performance-timeline/#dom-performanceentry-entrytype The specified filter overrides any previous filters, passing empty filter disables recording. Note that not all types exposed to the web platform are currently supported.
	EventTypes []string `json:"eventTypes"`
}

type PerformanceTimelineLargestContentfulPaint added in v2.0.7

type PerformanceTimelineLargestContentfulPaint struct {
	RenderTime float64 `json:"renderTime"`          //
	LoadTime   float64 `json:"loadTime"`            //
	Size       float64 `json:"size"`                // The number of pixels being painted.
	ElementId  string  `json:"elementId,omitempty"` // The id attribute of the element, if available.
	Url        string  `json:"url,omitempty"`       // The URL of the image (may be trimmed).
	NodeId     int     `json:"nodeId,omitempty"`    //
}

See https://github.com/WICG/LargestContentfulPaint and largest_contentful_paint.idl

type PerformanceTimelineLayoutShift added in v2.0.7

type PerformanceTimelineLayoutShift struct {
	Value          float64                                      `json:"value"`          // Score increment produced by this event.
	HadRecentInput bool                                         `json:"hadRecentInput"` //
	LastInputTime  float64                                      `json:"lastInputTime"`  //
	Sources        []*PerformanceTimelineLayoutShiftAttribution `json:"sources"`        //
}

See https://wicg.github.io/layout-instability/#sec-layout-shift and layout_shift.idl

type PerformanceTimelineLayoutShiftAttribution added in v2.0.7

type PerformanceTimelineLayoutShiftAttribution struct {
	PreviousRect *DOMRect `json:"previousRect"`     //
	CurrentRect  *DOMRect `json:"currentRect"`      //
	NodeId       int      `json:"nodeId,omitempty"` //
}

No Description.

type PerformanceTimelineTimelineEvent added in v2.0.7

type PerformanceTimelineTimelineEvent struct {
	FrameId            string                                     `json:"frameId"`                      // Identifies the frame that this event is related to. Empty for non-frame targets.
	Type               string                                     `json:"type"`                         // The event type, as specified in https://w3c.github.io/performance-timeline/#dom-performanceentry-entrytype This determines which of the optional "details" fiedls is present.
	Name               string                                     `json:"name"`                         // Name may be empty depending on the type.
	Time               float64                                    `json:"time"`                         // Time in seconds since Epoch, monotonically increasing within document lifetime.
	Duration           float64                                    `json:"duration,omitempty"`           // Event duration, if applicable.
	LcpDetails         *PerformanceTimelineLargestContentfulPaint `json:"lcpDetails,omitempty"`         //
	LayoutShiftDetails *PerformanceTimelineLayoutShift            `json:"layoutShiftDetails,omitempty"` //
}

No Description.

type PerformanceTimelineTimelineEventAddedEvent added in v2.0.7

type PerformanceTimelineTimelineEventAddedEvent struct {
	Method string `json:"method"`
	Params struct {
		Event *PerformanceTimelineTimelineEvent `json:"event"` //
	} `json:"Params,omitempty"`
}

Sent when a performance timeline event is added. See reportPerformanceTimeline method.

type Preload added in v2.3.0

type Preload struct {
	// contains filtered or unexported fields
}

func NewPreload added in v2.3.0

func NewPreload(target gcdmessage.ChromeTargeter) *Preload

func (*Preload) Disable added in v2.3.0

func (c *Preload) Disable(ctx context.Context) (*gcdmessage.ChromeResponse, error)

func (*Preload) Enable added in v2.3.0

type PreloadPrefetchStatusUpdatedEvent added in v2.3.0

type PreloadPrefetchStatusUpdatedEvent struct {
	Method string `json:"method"`
	Params struct {
		Key               *PreloadPreloadingAttemptKey `json:"key"`               //
		InitiatingFrameId string                       `json:"initiatingFrameId"` // The frame id of the frame initiating prefetch.
		PrefetchUrl       string                       `json:"prefetchUrl"`       //
		Status            string                       `json:"status"`            //  enum values: Pending, Running, Ready, Success, Failure, NotSupported
	} `json:"Params,omitempty"`
}

Fired when a prefetch attempt is updated.

type PreloadPreloadEnabledStateUpdatedEvent added in v2.3.1

type PreloadPreloadEnabledStateUpdatedEvent struct {
	Method string `json:"method"`
	Params struct {
		State string `json:"state"` //  enum values: Enabled, DisabledByDataSaver, DisabledByBatterySaver, DisabledByPreference, NotSupported
	} `json:"Params,omitempty"`
}

Fired when a preload enabled state is updated.

type PreloadPreloadingAttemptKey added in v2.3.0

type PreloadPreloadingAttemptKey struct {
	LoaderId   string `json:"loaderId"`             //
	Action     string `json:"action"`               //  enum values: Prefetch, Prerender
	Url        string `json:"url"`                  //
	TargetHint string `json:"targetHint,omitempty"` //  enum values: Blank, Self
}

A key that identifies a preloading attempt. The url used is the url specified by the trigger (i.e. the initial URL), and not the final url that is navigated to. For example, prerendering allows same-origin main frame navigations during the attempt, but the attempt is still keyed with the initial URL.

type PreloadPreloadingAttemptSource added in v2.3.0

type PreloadPreloadingAttemptSource struct {
	Key        *PreloadPreloadingAttemptKey `json:"key"`        //
	RuleSetIds []string                     `json:"ruleSetIds"` //
	NodeIds    []int                        `json:"nodeIds"`    //
}

Lists sources for a preloading attempt, specifically the ids of rule sets that had a speculation rule that triggered the attempt, and the BackendNodeIds of <a href> or <area href> elements that triggered the attempt (in the case of attempts triggered by a document rule). It is possible for mulitple rule sets and links to trigger a single attempt.

type PreloadPreloadingAttemptSourcesUpdatedEvent added in v2.3.0

type PreloadPreloadingAttemptSourcesUpdatedEvent struct {
	Method string `json:"method"`
	Params struct {
		LoaderId                 string                            `json:"loaderId"`                 //
		PreloadingAttemptSources []*PreloadPreloadingAttemptSource `json:"preloadingAttemptSources"` //
	} `json:"Params,omitempty"`
}

Send a list of sources for all preloading attempts in a document.

type PreloadPrerenderAttemptCompletedEvent added in v2.3.0

type PreloadPrerenderAttemptCompletedEvent struct {
	Method string `json:"method"`
	Params struct {
		Key                 *PreloadPreloadingAttemptKey `json:"key"`                           //
		InitiatingFrameId   string                       `json:"initiatingFrameId"`             // The frame id of the frame initiating prerendering.
		PrerenderingUrl     string                       `json:"prerenderingUrl"`               //
		FinalStatus         string                       `json:"finalStatus"`                   //  enum values: Activated, Destroyed, LowEndDevice, InvalidSchemeRedirect, InvalidSchemeNavigation, InProgressNavigation, NavigationRequestBlockedByCsp, MainFrameNavigation, MojoBinderPolicy, RendererProcessCrashed, RendererProcessKilled, Download, TriggerDestroyed, NavigationNotCommitted, NavigationBadHttpStatus, ClientCertRequested, NavigationRequestNetworkError, MaxNumOfRunningPrerendersExceeded, CancelAllHostsForTesting, DidFailLoad, Stop, SslCertificateError, LoginAuthRequested, UaChangeRequiresReload, BlockedByClient, AudioOutputDeviceRequested, MixedContent, TriggerBackgrounded, EmbedderTriggeredAndCrossOriginRedirected, MemoryLimitExceeded, FailToGetMemoryUsage, DataSaverEnabled, HasEffectiveUrl, ActivatedBeforeStarted, InactivePageRestriction, StartFailed, TimeoutBackgrounded, CrossSiteRedirectInInitialNavigation, CrossSiteNavigationInInitialNavigation, SameSiteCrossOriginRedirectNotOptInInInitialNavigation, SameSiteCrossOriginNavigationNotOptInInInitialNavigation, ActivationNavigationParameterMismatch, ActivatedInBackground, EmbedderHostDisallowed, ActivationNavigationDestroyedBeforeSuccess, TabClosedByUserGesture, TabClosedWithoutUserGesture, PrimaryMainFrameRendererProcessCrashed, PrimaryMainFrameRendererProcessKilled, ActivationFramePolicyNotCompatible, PreloadingDisabled, BatterySaverEnabled, ActivatedDuringMainFrameNavigation, PreloadingUnsupportedByWebContents, CrossSiteRedirectInMainFrameNavigation, CrossSiteNavigationInMainFrameNavigation, SameSiteCrossOriginRedirectNotOptInInMainFrameNavigation, SameSiteCrossOriginNavigationNotOptInInMainFrameNavigation, MemoryPressureOnTrigger, MemoryPressureAfterTriggered
		DisallowedApiMethod string                       `json:"disallowedApiMethod,omitempty"` // This is used to give users more information about the name of the API call that is incompatible with prerender and has caused the cancellation of the attempt
	} `json:"Params,omitempty"`
}

Fired when a prerender attempt is completed.

type PreloadPrerenderStatusUpdatedEvent added in v2.3.0

type PreloadPrerenderStatusUpdatedEvent struct {
	Method string `json:"method"`
	Params struct {
		Key               *PreloadPreloadingAttemptKey `json:"key"`               //
		InitiatingFrameId string                       `json:"initiatingFrameId"` // The frame id of the frame initiating prerender.
		PrerenderingUrl   string                       `json:"prerenderingUrl"`   //
		Status            string                       `json:"status"`            //  enum values: Pending, Running, Ready, Success, Failure, NotSupported
	} `json:"Params,omitempty"`
}

Fired when a prerender attempt is updated.

type PreloadRuleSet added in v2.3.0

type PreloadRuleSet struct {
	Id            string `json:"id"`                      //
	LoaderId      string `json:"loaderId"`                // Identifies a document which the rule set is associated with.
	SourceText    string `json:"sourceText"`              // Source text of JSON representing the rule set. If it comes from <script> tag, it is the textContent of the node. Note that it is a JSON for valid case.  See also: - https://wicg.github.io/nav-speculation/speculation-rules.html - https://github.com/WICG/nav-speculation/blob/main/triggers.md
	BackendNodeId int    `json:"backendNodeId,omitempty"` // A speculation rule set is either added through an inline <script> tag or through an external resource via the 'Speculation-Rules' HTTP header. For the first case, we include the BackendNodeId of the relevant <script> tag. For the second case, we include the external URL where the rule set was loaded from, and also RequestId if Network domain is enabled.  See also: - https://wicg.github.io/nav-speculation/speculation-rules.html#speculation-rules-script - https://wicg.github.io/nav-speculation/speculation-rules.html#speculation-rules-header
	Url           string `json:"url,omitempty"`           //
	RequestId     string `json:"requestId,omitempty"`     //
	ErrorType     string `json:"errorType,omitempty"`     // Error information `errorMessage` is null iff `errorType` is null. enum values: SourceIsNotJsonObject, InvalidRulesSkipped
	ErrorMessage  string `json:"errorMessage,omitempty"`  // TODO(https://crbug.com/1425354): Replace this property with structured error.
}

Corresponds to SpeculationRuleSet

type PreloadRuleSetRemovedEvent added in v2.3.0

type PreloadRuleSetRemovedEvent struct {
	Method string `json:"method"`
	Params struct {
		Id string `json:"id"` //
	} `json:"Params,omitempty"`
}

type PreloadRuleSetUpdatedEvent added in v2.3.0

type PreloadRuleSetUpdatedEvent struct {
	Method string `json:"method"`
	Params struct {
		RuleSet *PreloadRuleSet `json:"ruleSet"` //
	} `json:"Params,omitempty"`
}

Upsert. Currently, it is only emitted when a rule set added.

type Profiler

type Profiler struct {
	// contains filtered or unexported fields
}

func NewProfiler

func NewProfiler(target gcdmessage.ChromeTargeter) *Profiler

func (*Profiler) Disable

func (c *Profiler) Disable(ctx context.Context) (*gcdmessage.ChromeResponse, error)

func (*Profiler) Enable

func (*Profiler) GetBestEffortCoverage

func (c *Profiler) GetBestEffortCoverage(ctx context.Context) ([]*ProfilerScriptCoverage, error)

GetBestEffortCoverage - Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection. Returns - result - Coverage data for the current isolate.

func (*Profiler) SetSamplingInterval

func (c *Profiler) SetSamplingInterval(ctx context.Context, interval int) (*gcdmessage.ChromeResponse, error)

SetSamplingInterval - Changes CPU profiler sampling interval. Must be called before CPU profiles recording started. interval - New sampling interval in microseconds.

func (*Profiler) SetSamplingIntervalWithParams

func (c *Profiler) SetSamplingIntervalWithParams(ctx context.Context, v *ProfilerSetSamplingIntervalParams) (*gcdmessage.ChromeResponse, error)

SetSamplingIntervalWithParams - Changes CPU profiler sampling interval. Must be called before CPU profiles recording started.

func (*Profiler) Start

func (*Profiler) StartPreciseCoverage

func (c *Profiler) StartPreciseCoverage(ctx context.Context, callCount bool, detailed bool, allowTriggeredUpdates bool) (float64, error)

StartPreciseCoverage - Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters. callCount - Collect accurate call counts beyond simple 'covered' or 'not covered'. detailed - Collect block-based coverage. allowTriggeredUpdates - Allow the backend to send updates on its own initiative Returns - timestamp - Monotonically increasing time (in seconds) when the coverage update was taken in the backend.

func (*Profiler) StartPreciseCoverageWithParams

func (c *Profiler) StartPreciseCoverageWithParams(ctx context.Context, v *ProfilerStartPreciseCoverageParams) (float64, error)

StartPreciseCoverageWithParams - Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters. Returns - timestamp - Monotonically increasing time (in seconds) when the coverage update was taken in the backend.

func (*Profiler) Stop

func (c *Profiler) Stop(ctx context.Context) (*ProfilerProfile, error)

Stop - Returns - profile - Recorded profile.

func (*Profiler) StopPreciseCoverage

func (c *Profiler) StopPreciseCoverage(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code.

func (*Profiler) TakePreciseCoverage

func (c *Profiler) TakePreciseCoverage(ctx context.Context) ([]*ProfilerScriptCoverage, float64, error)

TakePreciseCoverage - Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started. Returns - result - Coverage data for the current isolate. timestamp - Monotonically increasing time (in seconds) when the coverage update was taken in the backend.

type ProfilerConsoleProfileFinishedEvent

type ProfilerConsoleProfileFinishedEvent struct {
	Method string `json:"method"`
	Params struct {
		Id       string            `json:"id"`              //
		Location *DebuggerLocation `json:"location"`        // Location of console.profileEnd().
		Profile  *ProfilerProfile  `json:"profile"`         //
		Title    string            `json:"title,omitempty"` // Profile title passed as an argument to console.profile().
	} `json:"Params,omitempty"`
}

type ProfilerConsoleProfileStartedEvent

type ProfilerConsoleProfileStartedEvent struct {
	Method string `json:"method"`
	Params struct {
		Id       string            `json:"id"`              //
		Location *DebuggerLocation `json:"location"`        // Location of console.profile().
		Title    string            `json:"title,omitempty"` // Profile title passed as an argument to console.profile().
	} `json:"Params,omitempty"`
}

Sent when new profile recording is started using console.profile() call.

type ProfilerCoverageRange

type ProfilerCoverageRange struct {
	StartOffset int `json:"startOffset"` // JavaScript script source offset for the range start.
	EndOffset   int `json:"endOffset"`   // JavaScript script source offset for the range end.
	Count       int `json:"count"`       // Collected execution count of the source range.
}

Coverage data for a source range.

type ProfilerFunctionCoverage

type ProfilerFunctionCoverage struct {
	FunctionName    string                   `json:"functionName"`    // JavaScript function name.
	Ranges          []*ProfilerCoverageRange `json:"ranges"`          // Source ranges inside the function with coverage data.
	IsBlockCoverage bool                     `json:"isBlockCoverage"` // Whether coverage data for this function has block granularity.
}

Coverage data for a JavaScript function.

type ProfilerPositionTickInfo

type ProfilerPositionTickInfo struct {
	Line  int `json:"line"`  // Source line number (1-based).
	Ticks int `json:"ticks"` // Number of samples attributed to the source line.
}

Specifies a number of samples attributed to a certain source position.

type ProfilerPreciseCoverageDeltaUpdateEvent

type ProfilerPreciseCoverageDeltaUpdateEvent struct {
	Method string `json:"method"`
	Params struct {
		Timestamp float64                   `json:"timestamp"` // Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
		Occasion  string                    `json:"occasion"`  // Identifier for distinguishing coverage events.
		Result    []*ProfilerScriptCoverage `json:"result"`    // Coverage data for the current isolate.
	} `json:"Params,omitempty"`
}

Reports coverage delta since the last poll (either from an event like this, or from `takePreciseCoverage` for the current isolate. May only be sent if precise code coverage has been started. This event can be trigged by the embedder to, for example, trigger collection of coverage data immediately at a certain point in time.

type ProfilerProfile

type ProfilerProfile struct {
	Nodes      []*ProfilerProfileNode `json:"nodes"`                // The list of profile nodes. First item is the root node.
	StartTime  float64                `json:"startTime"`            // Profiling start timestamp in microseconds.
	EndTime    float64                `json:"endTime"`              // Profiling end timestamp in microseconds.
	Samples    []int                  `json:"samples,omitempty"`    // Ids of samples top nodes.
	TimeDeltas []int                  `json:"timeDeltas,omitempty"` // Time intervals between adjacent samples in microseconds. The first delta is relative to the profile startTime.
}

Profile.

type ProfilerProfileNode

type ProfilerProfileNode struct {
	Id            int                         `json:"id"`                      // Unique id of the node.
	CallFrame     *RuntimeCallFrame           `json:"callFrame"`               // Function location.
	HitCount      int                         `json:"hitCount,omitempty"`      // Number of samples where this node was on top of the call stack.
	Children      []int                       `json:"children,omitempty"`      // Child node ids.
	DeoptReason   string                      `json:"deoptReason,omitempty"`   // The reason of being not optimized. The function may be deoptimized or marked as don't optimize.
	PositionTicks []*ProfilerPositionTickInfo `json:"positionTicks,omitempty"` // An array of source position ticks.
}

Profile node. Holds callsite information, execution statistics and child nodes.

type ProfilerScriptCoverage

type ProfilerScriptCoverage struct {
	ScriptId  string                      `json:"scriptId"`  // JavaScript script id.
	Url       string                      `json:"url"`       // JavaScript script name or url.
	Functions []*ProfilerFunctionCoverage `json:"functions"` // Functions contained in the script that has coverage data.
}

Coverage data for a JavaScript script.

type ProfilerSetSamplingIntervalParams

type ProfilerSetSamplingIntervalParams struct {
	// New sampling interval in microseconds.
	Interval int `json:"interval"`
}

type ProfilerStartPreciseCoverageParams

type ProfilerStartPreciseCoverageParams struct {
	// Collect accurate call counts beyond simple 'covered' or 'not covered'.
	CallCount bool `json:"callCount,omitempty"`
	// Collect block-based coverage.
	Detailed bool `json:"detailed,omitempty"`
	// Allow the backend to send updates on its own initiative
	AllowTriggeredUpdates bool `json:"allowTriggeredUpdates,omitempty"`
}

type Runtime

type Runtime struct {
	// contains filtered or unexported fields
}

func NewRuntime

func NewRuntime(target gcdmessage.ChromeTargeter) *Runtime

func (*Runtime) AddBinding

func (c *Runtime) AddBinding(ctx context.Context, name string, executionContextId int, executionContextName string) (*gcdmessage.ChromeResponse, error)

AddBinding - If executionContextId is empty, adds binding with the given name on the global objects of all inspected contexts, including those created later, bindings survive reloads. Binding function takes exactly one argument, this argument should be string, in case of any other input, function throws an exception. Each binding function call produces Runtime.bindingCalled notification. name - executionContextId - If specified, the binding would only be exposed to the specified execution context. If omitted and `executionContextName` is not set, the binding is exposed to all execution contexts of the target. This parameter is mutually exclusive with `executionContextName`. Deprecated in favor of `executionContextName` due to an unclear use case and bugs in implementation (crbug.com/1169639). `executionContextId` will be removed in the future. executionContextName - If specified, the binding is exposed to the executionContext with matching name, even for contexts created after the binding is added. See also `ExecutionContext.name` and `worldName` parameter to `Page.addScriptToEvaluateOnNewDocument`. This parameter is mutually exclusive with `executionContextId`.

func (*Runtime) AddBindingWithParams

func (c *Runtime) AddBindingWithParams(ctx context.Context, v *RuntimeAddBindingParams) (*gcdmessage.ChromeResponse, error)

AddBindingWithParams - If executionContextId is empty, adds binding with the given name on the global objects of all inspected contexts, including those created later, bindings survive reloads. Binding function takes exactly one argument, this argument should be string, in case of any other input, function throws an exception. Each binding function call produces Runtime.bindingCalled notification.

func (*Runtime) AwaitPromise

func (c *Runtime) AwaitPromise(ctx context.Context, promiseObjectId string, returnByValue bool, generatePreview bool) (*RuntimeRemoteObject, *RuntimeExceptionDetails, error)

AwaitPromise - Add handler to promise with given promise object id. promiseObjectId - Identifier of the promise. returnByValue - Whether the result is expected to be a JSON object that should be sent by value. generatePreview - Whether preview should be generated for the result. Returns - result - Promise result. Will contain rejected value if promise was rejected. exceptionDetails - Exception details if stack strace is available.

func (*Runtime) AwaitPromiseWithParams

AwaitPromiseWithParams - Add handler to promise with given promise object id. Returns - result - Promise result. Will contain rejected value if promise was rejected. exceptionDetails - Exception details if stack strace is available.

func (*Runtime) CallFunctionOn

func (c *Runtime) CallFunctionOn(ctx context.Context, functionDeclaration string, objectId string, arguments []*RuntimeCallArgument, silent bool, returnByValue bool, generatePreview bool, userGesture bool, awaitPromise bool, executionContextId int, objectGroup string, throwOnSideEffect bool, uniqueContextId string, generateWebDriverValue bool) (*RuntimeRemoteObject, *RuntimeExceptionDetails, error)

CallFunctionOn - Calls function with given declaration on the given object. Object group of the result is inherited from the target object. functionDeclaration - Declaration of the function to call. objectId - Identifier of the object to call function on. Either objectId or executionContextId should be specified. arguments - Call arguments. All call arguments must belong to the same JavaScript world as the target object. silent - In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides `setPauseOnException` state. returnByValue - Whether the result is expected to be a JSON object which should be sent by value. generatePreview - Whether preview should be generated for the result. userGesture - Whether execution should be treated as initiated by user in the UI. awaitPromise - Whether execution should `await` for resulting value and return once awaited promise is resolved. executionContextId - Specifies execution context which global object will be used to call function on. Either executionContextId or objectId should be specified. objectGroup - Symbolic group name that can be used to release multiple objects. If objectGroup is not specified and objectId is, objectGroup will be inherited from object. throwOnSideEffect - Whether to throw an exception if side effect cannot be ruled out during evaluation. uniqueContextId - An alternative way to specify the execution context to call function on. Compared to contextId that may be reused across processes, this is guaranteed to be system-unique, so it can be used to prevent accidental function call in context different than intended (e.g. as a result of navigation across process boundaries). This is mutually exclusive with `executionContextId`. generateWebDriverValue - Whether the result should contain `webDriverValue`, serialized according to https://w3c.github.io/webdriver-bidi. This is mutually exclusive with `returnByValue`, but resulting `objectId` is still provided. Returns - result - Call result. exceptionDetails - Exception details.

func (*Runtime) CallFunctionOnWithParams

CallFunctionOnWithParams - Calls function with given declaration on the given object. Object group of the result is inherited from the target object. Returns - result - Call result. exceptionDetails - Exception details.

func (*Runtime) CompileScript

func (c *Runtime) CompileScript(ctx context.Context, expression string, sourceURL string, persistScript bool, executionContextId int) (string, *RuntimeExceptionDetails, error)

CompileScript - Compiles expression. expression - Expression to compile. sourceURL - Source url to be set for the script. persistScript - Specifies whether the compiled script should be persisted. executionContextId - Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page. Returns - scriptId - Id of the script. exceptionDetails - Exception details.

func (*Runtime) CompileScriptWithParams

func (c *Runtime) CompileScriptWithParams(ctx context.Context, v *RuntimeCompileScriptParams) (string, *RuntimeExceptionDetails, error)

CompileScriptWithParams - Compiles expression. Returns - scriptId - Id of the script. exceptionDetails - Exception details.

func (*Runtime) Disable

func (c *Runtime) Disable(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Disables reporting of execution contexts creation.

func (*Runtime) DiscardConsoleEntries

func (c *Runtime) DiscardConsoleEntries(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Discards collected exceptions and console API calls.

func (*Runtime) Enable

Enables reporting of execution contexts creation by means of `executionContextCreated` event. When the reporting gets enabled the event will be sent immediately for each existing execution context.

func (*Runtime) Evaluate

func (c *Runtime) Evaluate(ctx context.Context, expression string, objectGroup string, includeCommandLineAPI bool, silent bool, contextId int, returnByValue bool, generatePreview bool, userGesture bool, awaitPromise bool, throwOnSideEffect bool, timeout float64, disableBreaks bool, replMode bool, allowUnsafeEvalBlockedByCSP bool, uniqueContextId string, generateWebDriverValue bool) (*RuntimeRemoteObject, *RuntimeExceptionDetails, error)

Evaluate - Evaluates expression on global object. expression - Expression to evaluate. objectGroup - Symbolic group name that can be used to release multiple objects. includeCommandLineAPI - Determines whether Command Line API should be available during the evaluation. silent - In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides `setPauseOnException` state. contextId - Specifies in which execution context to perform evaluation. If the parameter is omitted the evaluation will be performed in the context of the inspected page. This is mutually exclusive with `uniqueContextId`, which offers an alternative way to identify the execution context that is more reliable in a multi-process environment. returnByValue - Whether the result is expected to be a JSON object that should be sent by value. generatePreview - Whether preview should be generated for the result. userGesture - Whether execution should be treated as initiated by user in the UI. awaitPromise - Whether execution should `await` for resulting value and return once awaited promise is resolved. throwOnSideEffect - Whether to throw an exception if side effect cannot be ruled out during evaluation. This implies `disableBreaks` below. timeout - Terminate execution after timing out (number of milliseconds). disableBreaks - Disable breakpoints during execution. replMode - Setting this flag to true enables `let` re-declaration and top-level `await`. Note that `let` variables can only be re-declared if they originate from `replMode` themselves. allowUnsafeEvalBlockedByCSP - The Content Security Policy (CSP) for the target might block 'unsafe-eval' which includes eval(), Function(), setTimeout() and setInterval() when called with non-callable arguments. This flag bypasses CSP for this evaluation and allows unsafe-eval. Defaults to true. uniqueContextId - An alternative way to specify the execution context to evaluate in. Compared to contextId that may be reused across processes, this is guaranteed to be system-unique, so it can be used to prevent accidental evaluation of the expression in context different than intended (e.g. as a result of navigation across process boundaries). This is mutually exclusive with `contextId`. generateWebDriverValue - Whether the result should be serialized according to https://w3c.github.io/webdriver-bidi. Returns - result - Evaluation result. exceptionDetails - Exception details.

func (*Runtime) EvaluateWithParams

EvaluateWithParams - Evaluates expression on global object. Returns - result - Evaluation result. exceptionDetails - Exception details.

func (*Runtime) GetExceptionDetails added in v2.2.6

func (c *Runtime) GetExceptionDetails(ctx context.Context, errorObjectId string) (*RuntimeExceptionDetails, error)

GetExceptionDetails - This method tries to lookup and populate exception details for a JavaScript Error object. Note that the stackTrace portion of the resulting exceptionDetails will only be populated if the Runtime domain was enabled at the time when the Error was thrown. errorObjectId - The error object for which to resolve the exception details. Returns - exceptionDetails -

func (*Runtime) GetExceptionDetailsWithParams added in v2.2.6

func (c *Runtime) GetExceptionDetailsWithParams(ctx context.Context, v *RuntimeGetExceptionDetailsParams) (*RuntimeExceptionDetails, error)

GetExceptionDetailsWithParams - This method tries to lookup and populate exception details for a JavaScript Error object. Note that the stackTrace portion of the resulting exceptionDetails will only be populated if the Runtime domain was enabled at the time when the Error was thrown. Returns - exceptionDetails -

func (*Runtime) GetHeapUsage

func (c *Runtime) GetHeapUsage(ctx context.Context) (float64, float64, error)

GetHeapUsage - Returns the JavaScript heap usage. It is the total usage of the corresponding isolate not scoped to a particular Runtime. Returns - usedSize - Used heap size in bytes. totalSize - Allocated heap size in bytes.

func (*Runtime) GetIsolateId

func (c *Runtime) GetIsolateId(ctx context.Context) (string, error)

GetIsolateId - Returns the isolate id. Returns - id - The isolate id.

func (*Runtime) GetProperties

func (c *Runtime) GetProperties(ctx context.Context, objectId string, ownProperties bool, accessorPropertiesOnly bool, generatePreview bool, nonIndexedPropertiesOnly bool) ([]*RuntimePropertyDescriptor, []*RuntimeInternalPropertyDescriptor, []*RuntimePrivatePropertyDescriptor, *RuntimeExceptionDetails, error)

GetProperties - Returns properties of a given object. Object group of the result is inherited from the target object. objectId - Identifier of the object to return properties for. ownProperties - If true, returns properties belonging only to the element itself, not to its prototype chain. accessorPropertiesOnly - If true, returns accessor properties (with getter/setter) only; internal properties are not returned either. generatePreview - Whether preview should be generated for the results. nonIndexedPropertiesOnly - If true, returns non-indexed properties only. Returns - result - Object properties. internalProperties - Internal object properties (only of the element itself). privateProperties - Object private properties. exceptionDetails - Exception details.

func (*Runtime) GetPropertiesWithParams

GetPropertiesWithParams - Returns properties of a given object. Object group of the result is inherited from the target object. Returns - result - Object properties. internalProperties - Internal object properties (only of the element itself). privateProperties - Object private properties. exceptionDetails - Exception details.

func (*Runtime) GlobalLexicalScopeNames

func (c *Runtime) GlobalLexicalScopeNames(ctx context.Context, executionContextId int) ([]string, error)

GlobalLexicalScopeNames - Returns all let, const and class variables from global scope. executionContextId - Specifies in which execution context to lookup global scope variables. Returns - names -

func (*Runtime) GlobalLexicalScopeNamesWithParams

func (c *Runtime) GlobalLexicalScopeNamesWithParams(ctx context.Context, v *RuntimeGlobalLexicalScopeNamesParams) ([]string, error)

GlobalLexicalScopeNamesWithParams - Returns all let, const and class variables from global scope. Returns - names -

func (*Runtime) QueryObjects

func (c *Runtime) QueryObjects(ctx context.Context, prototypeObjectId string, objectGroup string) (*RuntimeRemoteObject, error)

QueryObjects - prototypeObjectId - Identifier of the prototype to return objects for. objectGroup - Symbolic group name that can be used to release the results. Returns - objects - Array with objects.

func (*Runtime) QueryObjectsWithParams

func (c *Runtime) QueryObjectsWithParams(ctx context.Context, v *RuntimeQueryObjectsParams) (*RuntimeRemoteObject, error)

QueryObjectsWithParams - Returns - objects - Array with objects.

func (*Runtime) ReleaseObject

func (c *Runtime) ReleaseObject(ctx context.Context, objectId string) (*gcdmessage.ChromeResponse, error)

ReleaseObject - Releases remote object with given id. objectId - Identifier of the object to release.

func (*Runtime) ReleaseObjectGroup

func (c *Runtime) ReleaseObjectGroup(ctx context.Context, objectGroup string) (*gcdmessage.ChromeResponse, error)

ReleaseObjectGroup - Releases all remote objects that belong to a given group. objectGroup - Symbolic object group name.

func (*Runtime) ReleaseObjectGroupWithParams

func (c *Runtime) ReleaseObjectGroupWithParams(ctx context.Context, v *RuntimeReleaseObjectGroupParams) (*gcdmessage.ChromeResponse, error)

ReleaseObjectGroupWithParams - Releases all remote objects that belong to a given group.

func (*Runtime) ReleaseObjectWithParams

func (c *Runtime) ReleaseObjectWithParams(ctx context.Context, v *RuntimeReleaseObjectParams) (*gcdmessage.ChromeResponse, error)

ReleaseObjectWithParams - Releases remote object with given id.

func (*Runtime) RemoveBinding

func (c *Runtime) RemoveBinding(ctx context.Context, name string) (*gcdmessage.ChromeResponse, error)

RemoveBinding - This method does not remove binding function from global object but unsubscribes current runtime agent from Runtime.bindingCalled notifications. name -

func (*Runtime) RemoveBindingWithParams

func (c *Runtime) RemoveBindingWithParams(ctx context.Context, v *RuntimeRemoveBindingParams) (*gcdmessage.ChromeResponse, error)

RemoveBindingWithParams - This method does not remove binding function from global object but unsubscribes current runtime agent from Runtime.bindingCalled notifications.

func (*Runtime) RunIfWaitingForDebugger

func (c *Runtime) RunIfWaitingForDebugger(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Tells inspected instance to run if it was waiting for debugger to attach.

func (*Runtime) RunScript

func (c *Runtime) RunScript(ctx context.Context, scriptId string, executionContextId int, objectGroup string, silent bool, includeCommandLineAPI bool, returnByValue bool, generatePreview bool, awaitPromise bool) (*RuntimeRemoteObject, *RuntimeExceptionDetails, error)

RunScript - Runs script with given id in a given context. scriptId - Id of the script to run. executionContextId - Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page. objectGroup - Symbolic group name that can be used to release multiple objects. silent - In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides `setPauseOnException` state. includeCommandLineAPI - Determines whether Command Line API should be available during the evaluation. returnByValue - Whether the result is expected to be a JSON object which should be sent by value. generatePreview - Whether preview should be generated for the result. awaitPromise - Whether execution should `await` for resulting value and return once awaited promise is resolved. Returns - result - Run result. exceptionDetails - Exception details.

func (*Runtime) RunScriptWithParams

RunScriptWithParams - Runs script with given id in a given context. Returns - result - Run result. exceptionDetails - Exception details.

func (*Runtime) SetAsyncCallStackDepth

func (c *Runtime) SetAsyncCallStackDepth(ctx context.Context, maxDepth int) (*gcdmessage.ChromeResponse, error)

SetAsyncCallStackDepth - Enables or disables async call stacks tracking. maxDepth - Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async call stacks (default).

func (*Runtime) SetAsyncCallStackDepthWithParams

func (c *Runtime) SetAsyncCallStackDepthWithParams(ctx context.Context, v *RuntimeSetAsyncCallStackDepthParams) (*gcdmessage.ChromeResponse, error)

SetAsyncCallStackDepthWithParams - Enables or disables async call stacks tracking.

func (*Runtime) SetCustomObjectFormatterEnabled

func (c *Runtime) SetCustomObjectFormatterEnabled(ctx context.Context, enabled bool) (*gcdmessage.ChromeResponse, error)

SetCustomObjectFormatterEnabled - enabled -

func (*Runtime) SetCustomObjectFormatterEnabledWithParams

func (c *Runtime) SetCustomObjectFormatterEnabledWithParams(ctx context.Context, v *RuntimeSetCustomObjectFormatterEnabledParams) (*gcdmessage.ChromeResponse, error)

SetCustomObjectFormatterEnabledWithParams -

func (*Runtime) SetMaxCallStackSizeToCapture

func (c *Runtime) SetMaxCallStackSizeToCapture(ctx context.Context, size int) (*gcdmessage.ChromeResponse, error)

SetMaxCallStackSizeToCapture - size -

func (*Runtime) SetMaxCallStackSizeToCaptureWithParams

func (c *Runtime) SetMaxCallStackSizeToCaptureWithParams(ctx context.Context, v *RuntimeSetMaxCallStackSizeToCaptureParams) (*gcdmessage.ChromeResponse, error)

SetMaxCallStackSizeToCaptureWithParams -

func (*Runtime) TerminateExecution

func (c *Runtime) TerminateExecution(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Terminate current or next JavaScript execution. Will cancel the termination when the outer-most script execution ends.

type RuntimeAddBindingParams

type RuntimeAddBindingParams struct {
	//
	Name string `json:"name"`
	// If specified, the binding would only be exposed to the specified execution context. If omitted and `executionContextName` is not set, the binding is exposed to all execution contexts of the target. This parameter is mutually exclusive with `executionContextName`. Deprecated in favor of `executionContextName` due to an unclear use case and bugs in implementation (crbug.com/1169639). `executionContextId` will be removed in the future.
	ExecutionContextId int `json:"executionContextId,omitempty"`
	// If specified, the binding is exposed to the executionContext with matching name, even for contexts created after the binding is added. See also `ExecutionContext.name` and `worldName` parameter to `Page.addScriptToEvaluateOnNewDocument`. This parameter is mutually exclusive with `executionContextId`.
	ExecutionContextName string `json:"executionContextName,omitempty"`
}

type RuntimeAwaitPromiseParams

type RuntimeAwaitPromiseParams struct {
	// Identifier of the promise.
	PromiseObjectId string `json:"promiseObjectId"`
	// Whether the result is expected to be a JSON object that should be sent by value.
	ReturnByValue bool `json:"returnByValue,omitempty"`
	// Whether preview should be generated for the result.
	GeneratePreview bool `json:"generatePreview,omitempty"`
}

type RuntimeBindingCalledEvent

type RuntimeBindingCalledEvent struct {
	Method string `json:"method"`
	Params struct {
		Name               string `json:"name"`               //
		Payload            string `json:"payload"`            //
		ExecutionContextId int    `json:"executionContextId"` // Identifier of the context where the call was made.
	} `json:"Params,omitempty"`
}

Notification is issued every time when binding is called.

type RuntimeCallArgument

type RuntimeCallArgument struct {
	Value               interface{} `json:"value,omitempty"`               // Primitive value or serializable javascript object.
	UnserializableValue string      `json:"unserializableValue,omitempty"` // Primitive value which can not be JSON-stringified.
	ObjectId            string      `json:"objectId,omitempty"`            // Remote object handle.
}

Represents function call argument. Either remote object id `objectId`, primitive `value`, unserializable primitive value or neither of (for undefined) them should be specified.

type RuntimeCallFrame

type RuntimeCallFrame struct {
	FunctionName string `json:"functionName"` // JavaScript function name.
	ScriptId     string `json:"scriptId"`     // JavaScript script id.
	Url          string `json:"url"`          // JavaScript script name or url.
	LineNumber   int    `json:"lineNumber"`   // JavaScript script line number (0-based).
	ColumnNumber int    `json:"columnNumber"` // JavaScript script column number (0-based).
}

Stack entry for runtime errors and assertions.

type RuntimeCallFunctionOnParams

type RuntimeCallFunctionOnParams struct {
	// Declaration of the function to call.
	FunctionDeclaration string `json:"functionDeclaration"`
	// Identifier of the object to call function on. Either objectId or executionContextId should be specified.
	ObjectId string `json:"objectId,omitempty"`
	// Call arguments. All call arguments must belong to the same JavaScript world as the target object.
	Arguments []*RuntimeCallArgument `json:"arguments,omitempty"`
	// In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides `setPauseOnException` state.
	Silent bool `json:"silent,omitempty"`
	// Whether the result is expected to be a JSON object which should be sent by value.
	ReturnByValue bool `json:"returnByValue,omitempty"`
	// Whether preview should be generated for the result.
	GeneratePreview bool `json:"generatePreview,omitempty"`
	// Whether execution should be treated as initiated by user in the UI.
	UserGesture bool `json:"userGesture,omitempty"`
	// Whether execution should `await` for resulting value and return once awaited promise is resolved.
	AwaitPromise bool `json:"awaitPromise,omitempty"`
	// Specifies execution context which global object will be used to call function on. Either executionContextId or objectId should be specified.
	ExecutionContextId int `json:"executionContextId,omitempty"`
	// Symbolic group name that can be used to release multiple objects. If objectGroup is not specified and objectId is, objectGroup will be inherited from object.
	ObjectGroup string `json:"objectGroup,omitempty"`
	// Whether to throw an exception if side effect cannot be ruled out during evaluation.
	ThrowOnSideEffect bool `json:"throwOnSideEffect,omitempty"`
	// An alternative way to specify the execution context to call function on. Compared to contextId that may be reused across processes, this is guaranteed to be system-unique, so it can be used to prevent accidental function call in context different than intended (e.g. as a result of navigation across process boundaries). This is mutually exclusive with `executionContextId`.
	UniqueContextId string `json:"uniqueContextId,omitempty"`
	// Whether the result should contain `webDriverValue`, serialized according to https://w3c.github.io/webdriver-bidi. This is mutually exclusive with `returnByValue`, but resulting `objectId` is still provided.
	GenerateWebDriverValue bool `json:"generateWebDriverValue,omitempty"`
}

type RuntimeCompileScriptParams

type RuntimeCompileScriptParams struct {
	// Expression to compile.
	Expression string `json:"expression"`
	// Source url to be set for the script.
	SourceURL string `json:"sourceURL"`
	// Specifies whether the compiled script should be persisted.
	PersistScript bool `json:"persistScript"`
	// Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page.
	ExecutionContextId int `json:"executionContextId,omitempty"`
}

type RuntimeConsoleAPICalledEvent

type RuntimeConsoleAPICalledEvent struct {
	Method string `json:"method"`
	Params struct {
		Type               string                 `json:"type"`                 // Type of the call.
		Args               []*RuntimeRemoteObject `json:"args"`                 // Call arguments.
		ExecutionContextId int                    `json:"executionContextId"`   // Identifier of the context where the call was made.
		Timestamp          float64                `json:"timestamp"`            // Call timestamp.
		StackTrace         *RuntimeStackTrace     `json:"stackTrace,omitempty"` // Stack trace captured when the call was made. The async stack chain is automatically reported for the following call types: `assert`, `error`, `trace`, `warning`. For other types the async call chain can be retrieved using `Debugger.getStackTrace` and `stackTrace.parentId` field.
		Context            string                 `json:"context,omitempty"`    // Console context descriptor for calls on non-default console context (not console.*): 'anonymous#unique-logger-id' for call on unnamed context, 'name#unique-logger-id' for call on named context.
	} `json:"Params,omitempty"`
}

Issued when console API was called.

type RuntimeCustomPreview

type RuntimeCustomPreview struct {
	Header       string `json:"header"`                 // The JSON-stringified result of formatter.header(object, config) call. It contains json ML array that represents RemoteObject.
	BodyGetterId string `json:"bodyGetterId,omitempty"` // If formatter returns true as a result of formatter.hasBody call then bodyGetterId will contain RemoteObjectId for the function that returns result of formatter.body(object, config) call. The result value is json ML array.
}

No Description.

type RuntimeEntryPreview

type RuntimeEntryPreview struct {
	Key   *RuntimeObjectPreview `json:"key,omitempty"` // Preview of the key. Specified for map-like collection entries.
	Value *RuntimeObjectPreview `json:"value"`         // Preview of the value.
}

No Description.

type RuntimeEvaluateParams

type RuntimeEvaluateParams struct {
	// Expression to evaluate.
	Expression string `json:"expression"`
	// Symbolic group name that can be used to release multiple objects.
	ObjectGroup string `json:"objectGroup,omitempty"`
	// Determines whether Command Line API should be available during the evaluation.
	IncludeCommandLineAPI bool `json:"includeCommandLineAPI,omitempty"`
	// In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides `setPauseOnException` state.
	Silent bool `json:"silent,omitempty"`
	// Specifies in which execution context to perform evaluation. If the parameter is omitted the evaluation will be performed in the context of the inspected page. This is mutually exclusive with `uniqueContextId`, which offers an alternative way to identify the execution context that is more reliable in a multi-process environment.
	ContextId int `json:"contextId,omitempty"`
	// Whether the result is expected to be a JSON object that should be sent by value.
	ReturnByValue bool `json:"returnByValue,omitempty"`
	// Whether preview should be generated for the result.
	GeneratePreview bool `json:"generatePreview,omitempty"`
	// Whether execution should be treated as initiated by user in the UI.
	UserGesture bool `json:"userGesture,omitempty"`
	// Whether execution should `await` for resulting value and return once awaited promise is resolved.
	AwaitPromise bool `json:"awaitPromise,omitempty"`
	// Whether to throw an exception if side effect cannot be ruled out during evaluation. This implies `disableBreaks` below.
	ThrowOnSideEffect bool `json:"throwOnSideEffect,omitempty"`
	// Terminate execution after timing out (number of milliseconds).
	Timeout float64 `json:"timeout,omitempty"`
	// Disable breakpoints during execution.
	DisableBreaks bool `json:"disableBreaks,omitempty"`
	// Setting this flag to true enables `let` re-declaration and top-level `await`. Note that `let` variables can only be re-declared if they originate from `replMode` themselves.
	ReplMode bool `json:"replMode,omitempty"`
	// The Content Security Policy (CSP) for the target might block 'unsafe-eval' which includes eval(), Function(), setTimeout() and setInterval() when called with non-callable arguments. This flag bypasses CSP for this evaluation and allows unsafe-eval. Defaults to true.
	AllowUnsafeEvalBlockedByCSP bool `json:"allowUnsafeEvalBlockedByCSP,omitempty"`
	// An alternative way to specify the execution context to evaluate in. Compared to contextId that may be reused across processes, this is guaranteed to be system-unique, so it can be used to prevent accidental evaluation of the expression in context different than intended (e.g. as a result of navigation across process boundaries). This is mutually exclusive with `contextId`.
	UniqueContextId string `json:"uniqueContextId,omitempty"`
	// Whether the result should be serialized according to https://w3c.github.io/webdriver-bidi.
	GenerateWebDriverValue bool `json:"generateWebDriverValue,omitempty"`
}

type RuntimeExceptionDetails

type RuntimeExceptionDetails struct {
	ExceptionId        int                    `json:"exceptionId"`                  // Exception id.
	Text               string                 `json:"text"`                         // Exception text, which should be used together with exception object when available.
	LineNumber         int                    `json:"lineNumber"`                   // Line number of the exception location (0-based).
	ColumnNumber       int                    `json:"columnNumber"`                 // Column number of the exception location (0-based).
	ScriptId           string                 `json:"scriptId,omitempty"`           // Script ID of the exception location.
	Url                string                 `json:"url,omitempty"`                // URL of the exception location, to be used when the script was not reported.
	StackTrace         *RuntimeStackTrace     `json:"stackTrace,omitempty"`         // JavaScript stack trace if available.
	Exception          *RuntimeRemoteObject   `json:"exception,omitempty"`          // Exception object if available.
	ExecutionContextId int                    `json:"executionContextId,omitempty"` // Identifier of the context where exception happened.
	ExceptionMetaData  map[string]interface{} `json:"exceptionMetaData,omitempty"`  // Dictionary with entries of meta data that the client associated with this exception, such as information about associated network requests, etc.
}

Detailed information about exception (or error) that was thrown during script compilation or execution.

type RuntimeExceptionRevokedEvent

type RuntimeExceptionRevokedEvent struct {
	Method string `json:"method"`
	Params struct {
		Reason      string `json:"reason"`      // Reason describing why exception was revoked.
		ExceptionId int    `json:"exceptionId"` // The id of revoked exception, as reported in `exceptionThrown`.
	} `json:"Params,omitempty"`
}

Issued when unhandled exception was revoked.

type RuntimeExceptionThrownEvent

type RuntimeExceptionThrownEvent struct {
	Method string `json:"method"`
	Params struct {
		Timestamp        float64                  `json:"timestamp"`        // Timestamp of the exception.
		ExceptionDetails *RuntimeExceptionDetails `json:"exceptionDetails"` //
	} `json:"Params,omitempty"`
}

Issued when exception was thrown and unhandled.

type RuntimeExecutionContextCreatedEvent

type RuntimeExecutionContextCreatedEvent struct {
	Method string `json:"method"`
	Params struct {
		Context *RuntimeExecutionContextDescription `json:"context"` // A newly created execution context.
	} `json:"Params,omitempty"`
}

Issued when new execution context is created.

type RuntimeExecutionContextDescription

type RuntimeExecutionContextDescription struct {
	Id       int                    `json:"id"`                // Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed.
	Origin   string                 `json:"origin"`            // Execution context origin.
	Name     string                 `json:"name"`              // Human readable name describing given context.
	UniqueId string                 `json:"uniqueId"`          // A system-unique execution context identifier. Unlike the id, this is unique across multiple processes, so can be reliably used to identify specific context while backend performs a cross-process navigation.
	AuxData  map[string]interface{} `json:"auxData,omitempty"` // Embedder-specific auxiliary data likely matching {isDefault: boolean, type: 'default'|'isolated'|'worker', frameId: string}
}

Description of an isolated world.

type RuntimeExecutionContextDestroyedEvent

type RuntimeExecutionContextDestroyedEvent struct {
	Method string `json:"method"`
	Params struct {
		ExecutionContextId       int    `json:"executionContextId"`       // Id of the destroyed context
		ExecutionContextUniqueId string `json:"executionContextUniqueId"` // Unique Id of the destroyed context
	} `json:"Params,omitempty"`
}

Issued when execution context is destroyed.

type RuntimeGetExceptionDetailsParams added in v2.2.6

type RuntimeGetExceptionDetailsParams struct {
	// The error object for which to resolve the exception details.
	ErrorObjectId string `json:"errorObjectId"`
}

type RuntimeGetPropertiesParams

type RuntimeGetPropertiesParams struct {
	// Identifier of the object to return properties for.
	ObjectId string `json:"objectId"`
	// If true, returns properties belonging only to the element itself, not to its prototype chain.
	OwnProperties bool `json:"ownProperties,omitempty"`
	// If true, returns accessor properties (with getter/setter) only; internal properties are not returned either.
	AccessorPropertiesOnly bool `json:"accessorPropertiesOnly,omitempty"`
	// Whether preview should be generated for the results.
	GeneratePreview bool `json:"generatePreview,omitempty"`
	// If true, returns non-indexed properties only.
	NonIndexedPropertiesOnly bool `json:"nonIndexedPropertiesOnly,omitempty"`
}

type RuntimeGlobalLexicalScopeNamesParams

type RuntimeGlobalLexicalScopeNamesParams struct {
	// Specifies in which execution context to lookup global scope variables.
	ExecutionContextId int `json:"executionContextId,omitempty"`
}

type RuntimeInspectRequestedEvent

type RuntimeInspectRequestedEvent struct {
	Method string `json:"method"`
	Params struct {
		Object             *RuntimeRemoteObject   `json:"object"`                       //
		Hints              map[string]interface{} `json:"hints"`                        //
		ExecutionContextId int                    `json:"executionContextId,omitempty"` // Identifier of the context where the call was made.
	} `json:"Params,omitempty"`
}

Issued when object should be inspected (for example, as a result of inspect() command line API call).

type RuntimeInternalPropertyDescriptor

type RuntimeInternalPropertyDescriptor struct {
	Name  string               `json:"name"`            // Conventional property name.
	Value *RuntimeRemoteObject `json:"value,omitempty"` // The value associated with the property.
}

Object internal property descriptor. This property isn't normally visible in JavaScript code.

type RuntimeObjectPreview

type RuntimeObjectPreview struct {
	Type        string                    `json:"type"`                  // Object type.
	Subtype     string                    `json:"subtype,omitempty"`     // Object subtype hint. Specified for `object` type values only.
	Description string                    `json:"description,omitempty"` // String representation of the object.
	Overflow    bool                      `json:"overflow"`              // True iff some of the properties or entries of the original object did not fit.
	Properties  []*RuntimePropertyPreview `json:"properties"`            // List of the properties.
	Entries     []*RuntimeEntryPreview    `json:"entries,omitempty"`     // List of the entries. Specified for `map` and `set` subtype values only.
}

Object containing abbreviated remote object value.

type RuntimePrivatePropertyDescriptor

type RuntimePrivatePropertyDescriptor struct {
	Name  string               `json:"name"`            // Private property name.
	Value *RuntimeRemoteObject `json:"value,omitempty"` // The value associated with the private property.
	Get   *RuntimeRemoteObject `json:"get,omitempty"`   // A function which serves as a getter for the private property, or `undefined` if there is no getter (accessor descriptors only).
	Set   *RuntimeRemoteObject `json:"set,omitempty"`   // A function which serves as a setter for the private property, or `undefined` if there is no setter (accessor descriptors only).
}

Object private field descriptor.

type RuntimePropertyDescriptor

type RuntimePropertyDescriptor struct {
	Name         string               `json:"name"`                // Property name or symbol description.
	Value        *RuntimeRemoteObject `json:"value,omitempty"`     // The value associated with the property.
	Writable     bool                 `json:"writable,omitempty"`  // True if the value associated with the property may be changed (data descriptors only).
	Get          *RuntimeRemoteObject `json:"get,omitempty"`       // A function which serves as a getter for the property, or `undefined` if there is no getter (accessor descriptors only).
	Set          *RuntimeRemoteObject `json:"set,omitempty"`       // A function which serves as a setter for the property, or `undefined` if there is no setter (accessor descriptors only).
	Configurable bool                 `json:"configurable"`        // True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object.
	Enumerable   bool                 `json:"enumerable"`          // True if this property shows up during enumeration of the properties on the corresponding object.
	WasThrown    bool                 `json:"wasThrown,omitempty"` // True if the result was thrown during the evaluation.
	IsOwn        bool                 `json:"isOwn,omitempty"`     // True if the property is owned for the object.
	Symbol       *RuntimeRemoteObject `json:"symbol,omitempty"`    // Property symbol object, if the property is of the `symbol` type.
}

Object property descriptor.

type RuntimePropertyPreview

type RuntimePropertyPreview struct {
	Name         string                `json:"name"`                   // Property name.
	Type         string                `json:"type"`                   // Object type. Accessor means that the property itself is an accessor property.
	Value        string                `json:"value,omitempty"`        // User-friendly property value string.
	ValuePreview *RuntimeObjectPreview `json:"valuePreview,omitempty"` // Nested value preview.
	Subtype      string                `json:"subtype,omitempty"`      // Object subtype hint. Specified for `object` type values only.
}

No Description.

type RuntimeQueryObjectsParams

type RuntimeQueryObjectsParams struct {
	// Identifier of the prototype to return objects for.
	PrototypeObjectId string `json:"prototypeObjectId"`
	// Symbolic group name that can be used to release the results.
	ObjectGroup string `json:"objectGroup,omitempty"`
}

type RuntimeReleaseObjectGroupParams

type RuntimeReleaseObjectGroupParams struct {
	// Symbolic object group name.
	ObjectGroup string `json:"objectGroup"`
}

type RuntimeReleaseObjectParams

type RuntimeReleaseObjectParams struct {
	// Identifier of the object to release.
	ObjectId string `json:"objectId"`
}

type RuntimeRemoteObject

type RuntimeRemoteObject struct {
	Type                string                 `json:"type"`                          // Object type.
	Subtype             string                 `json:"subtype,omitempty"`             // Object subtype hint. Specified for `object` type values only. NOTE: If you change anything here, make sure to also update `subtype` in `ObjectPreview` and `PropertyPreview` below.
	ClassName           string                 `json:"className,omitempty"`           // Object class (constructor) name. Specified for `object` type values only.
	Value               interface{}            `json:"value,omitempty"`               // Remote object value in case of primitive values or JSON values (if it was requested).
	UnserializableValue string                 `json:"unserializableValue,omitempty"` // Primitive value which can not be JSON-stringified does not have `value`, but gets this property.
	Description         string                 `json:"description,omitempty"`         // String representation of the object.
	WebDriverValue      *RuntimeWebDriverValue `json:"webDriverValue,omitempty"`      // WebDriver BiDi representation of the value.
	ObjectId            string                 `json:"objectId,omitempty"`            // Unique object identifier (for non-primitive values).
	Preview             *RuntimeObjectPreview  `json:"preview,omitempty"`             // Preview containing abbreviated property values. Specified for `object` type values only.
	CustomPreview       *RuntimeCustomPreview  `json:"customPreview,omitempty"`       //
}

Mirror object referencing original JavaScript object.

type RuntimeRemoveBindingParams

type RuntimeRemoveBindingParams struct {
	//
	Name string `json:"name"`
}

type RuntimeRunScriptParams

type RuntimeRunScriptParams struct {
	// Id of the script to run.
	ScriptId string `json:"scriptId"`
	// Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page.
	ExecutionContextId int `json:"executionContextId,omitempty"`
	// Symbolic group name that can be used to release multiple objects.
	ObjectGroup string `json:"objectGroup,omitempty"`
	// In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides `setPauseOnException` state.
	Silent bool `json:"silent,omitempty"`
	// Determines whether Command Line API should be available during the evaluation.
	IncludeCommandLineAPI bool `json:"includeCommandLineAPI,omitempty"`
	// Whether the result is expected to be a JSON object which should be sent by value.
	ReturnByValue bool `json:"returnByValue,omitempty"`
	// Whether preview should be generated for the result.
	GeneratePreview bool `json:"generatePreview,omitempty"`
	// Whether execution should `await` for resulting value and return once awaited promise is resolved.
	AwaitPromise bool `json:"awaitPromise,omitempty"`
}

type RuntimeSetAsyncCallStackDepthParams

type RuntimeSetAsyncCallStackDepthParams struct {
	// Maximum depth of async call stacks. Setting to `0` will effectively disable collecting async call stacks (default).
	MaxDepth int `json:"maxDepth"`
}

type RuntimeSetCustomObjectFormatterEnabledParams

type RuntimeSetCustomObjectFormatterEnabledParams struct {
	//
	Enabled bool `json:"enabled"`
}

type RuntimeSetMaxCallStackSizeToCaptureParams

type RuntimeSetMaxCallStackSizeToCaptureParams struct {
	//
	Size int `json:"size"`
}

type RuntimeStackTrace

type RuntimeStackTrace struct {
	Description string               `json:"description,omitempty"` // String label of this stack trace. For async traces this may be a name of the function that initiated the async call.
	CallFrames  []*RuntimeCallFrame  `json:"callFrames"`            // JavaScript function name.
	Parent      *RuntimeStackTrace   `json:"parent,omitempty"`      // Asynchronous JavaScript stack trace that preceded this stack, if available.
	ParentId    *RuntimeStackTraceId `json:"parentId,omitempty"`    // Asynchronous JavaScript stack trace that preceded this stack, if available.
}

Call frames for assertions or error messages.

type RuntimeStackTraceId

type RuntimeStackTraceId struct {
	Id         string `json:"id"`                   //
	DebuggerId string `json:"debuggerId,omitempty"` //
}

If `debuggerId` is set stack trace comes from another debugger and can be resolved there. This allows to track cross-debugger calls. See `Runtime.StackTrace` and `Debugger.paused` for usages.

type RuntimeWebDriverValue added in v2.2.6

type RuntimeWebDriverValue struct {
	Type     string      `json:"type"`               //
	Value    interface{} `json:"value,omitempty"`    //
	ObjectId string      `json:"objectId,omitempty"` //
}

Represents the value serialiazed by the WebDriver BiDi specification https://w3c.github.io/webdriver-bidi.

type Schema

type Schema struct {
	// contains filtered or unexported fields
}

func NewSchema

func NewSchema(target gcdmessage.ChromeTargeter) *Schema

func (*Schema) GetDomains

func (c *Schema) GetDomains(ctx context.Context) ([]*SchemaDomain, error)

GetDomains - Returns supported domains. Returns - domains - List of supported domains.

type SchemaDomain

type SchemaDomain struct {
	Name    string `json:"name"`    // Domain name.
	Version string `json:"version"` // Domain version.
}

Description of the protocol domain.

type Security

type Security struct {
	// contains filtered or unexported fields
}

func NewSecurity

func NewSecurity(target gcdmessage.ChromeTargeter) *Security

func (*Security) Disable

func (c *Security) Disable(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Disables tracking security state changes.

func (*Security) Enable

Enables tracking security state changes.

func (*Security) HandleCertificateError

func (c *Security) HandleCertificateError(ctx context.Context, eventId int, action string) (*gcdmessage.ChromeResponse, error)

HandleCertificateError - Handles a certificate error that fired a certificateError event. eventId - The ID of the event. action - The action to take on the certificate error. enum values: continue, cancel

func (*Security) HandleCertificateErrorWithParams

func (c *Security) HandleCertificateErrorWithParams(ctx context.Context, v *SecurityHandleCertificateErrorParams) (*gcdmessage.ChromeResponse, error)

HandleCertificateErrorWithParams - Handles a certificate error that fired a certificateError event.

func (*Security) SetIgnoreCertificateErrors

func (c *Security) SetIgnoreCertificateErrors(ctx context.Context, ignore bool) (*gcdmessage.ChromeResponse, error)

SetIgnoreCertificateErrors - Enable/disable whether all certificate errors should be ignored. ignore - If true, all certificate errors will be ignored.

func (*Security) SetIgnoreCertificateErrorsWithParams

func (c *Security) SetIgnoreCertificateErrorsWithParams(ctx context.Context, v *SecuritySetIgnoreCertificateErrorsParams) (*gcdmessage.ChromeResponse, error)

SetIgnoreCertificateErrorsWithParams - Enable/disable whether all certificate errors should be ignored.

func (*Security) SetOverrideCertificateErrors

func (c *Security) SetOverrideCertificateErrors(ctx context.Context, override bool) (*gcdmessage.ChromeResponse, error)

SetOverrideCertificateErrors - Enable/disable overriding certificate errors. If enabled, all certificate error events need to be handled by the DevTools client and should be answered with `handleCertificateError` commands. override - If true, certificate errors will be overridden.

func (*Security) SetOverrideCertificateErrorsWithParams

func (c *Security) SetOverrideCertificateErrorsWithParams(ctx context.Context, v *SecuritySetOverrideCertificateErrorsParams) (*gcdmessage.ChromeResponse, error)

SetOverrideCertificateErrorsWithParams - Enable/disable overriding certificate errors. If enabled, all certificate error events need to be handled by the DevTools client and should be answered with `handleCertificateError` commands.

type SecurityCertificateErrorEvent

type SecurityCertificateErrorEvent struct {
	Method string `json:"method"`
	Params struct {
		EventId    int    `json:"eventId"`    // The ID of the event.
		ErrorType  string `json:"errorType"`  // The type of the error.
		RequestURL string `json:"requestURL"` // The url that was requested.
	} `json:"Params,omitempty"`
}

There is a certificate error. If overriding certificate errors is enabled, then it should be handled with the `handleCertificateError` command. Note: this event does not fire if the certificate error has been allowed internally. Only one client per target should override certificate errors at the same time.

type SecurityCertificateSecurityState

type SecurityCertificateSecurityState struct {
	Protocol                    string   `json:"protocol"`                          // Protocol name (e.g. "TLS 1.2" or "QUIC").
	KeyExchange                 string   `json:"keyExchange"`                       // Key Exchange used by the connection, or the empty string if not applicable.
	KeyExchangeGroup            string   `json:"keyExchangeGroup,omitempty"`        // (EC)DH group used by the connection, if applicable.
	Cipher                      string   `json:"cipher"`                            // Cipher name.
	Mac                         string   `json:"mac,omitempty"`                     // TLS MAC. Note that AEAD ciphers do not have separate MACs.
	Certificate                 []string `json:"certificate"`                       // Page certificate.
	SubjectName                 string   `json:"subjectName"`                       // Certificate subject name.
	Issuer                      string   `json:"issuer"`                            // Name of the issuing CA.
	ValidFrom                   float64  `json:"validFrom"`                         // Certificate valid from date.
	ValidTo                     float64  `json:"validTo"`                           // Certificate valid to (expiration) date
	CertificateNetworkError     string   `json:"certificateNetworkError,omitempty"` // The highest priority network error code, if the certificate has an error.
	CertificateHasWeakSignature bool     `json:"certificateHasWeakSignature"`       // True if the certificate uses a weak signature aglorithm.
	CertificateHasSha1Signature bool     `json:"certificateHasSha1Signature"`       // True if the certificate has a SHA1 signature in the chain.
	ModernSSL                   bool     `json:"modernSSL"`                         // True if modern SSL
	ObsoleteSslProtocol         bool     `json:"obsoleteSslProtocol"`               // True if the connection is using an obsolete SSL protocol.
	ObsoleteSslKeyExchange      bool     `json:"obsoleteSslKeyExchange"`            // True if the connection is using an obsolete SSL key exchange.
	ObsoleteSslCipher           bool     `json:"obsoleteSslCipher"`                 // True if the connection is using an obsolete SSL cipher.
	ObsoleteSslSignature        bool     `json:"obsoleteSslSignature"`              // True if the connection is using an obsolete SSL signature.
}

Details about the security state of the page certificate.

type SecurityHandleCertificateErrorParams

type SecurityHandleCertificateErrorParams struct {
	// The ID of the event.
	EventId int `json:"eventId"`
	// The action to take on the certificate error. enum values: continue, cancel
	Action string `json:"action"`
}

type SecurityInsecureContentStatus

type SecurityInsecureContentStatus struct {
	RanMixedContent                bool   `json:"ranMixedContent"`                // Always false.
	DisplayedMixedContent          bool   `json:"displayedMixedContent"`          // Always false.
	ContainedMixedForm             bool   `json:"containedMixedForm"`             // Always false.
	RanContentWithCertErrors       bool   `json:"ranContentWithCertErrors"`       // Always false.
	DisplayedContentWithCertErrors bool   `json:"displayedContentWithCertErrors"` // Always false.
	RanInsecureContentStyle        string `json:"ranInsecureContentStyle"`        // Always set to unknown. enum values: unknown, neutral, insecure, secure, info, insecure-broken
	DisplayedInsecureContentStyle  string `json:"displayedInsecureContentStyle"`  // Always set to unknown. enum values: unknown, neutral, insecure, secure, info, insecure-broken
}

Information about insecure content on the page.

type SecuritySafetyTipInfo

type SecuritySafetyTipInfo struct {
	SafetyTipStatus string `json:"safetyTipStatus"`   // Describes whether the page triggers any safety tips or reputation warnings. Default is unknown. enum values: badReputation, lookalike
	SafeUrl         string `json:"safeUrl,omitempty"` // The URL the safety tip suggested ("Did you mean?"). Only filled in for lookalike matches.
}

No Description.

type SecuritySecurityStateChangedEvent

type SecuritySecurityStateChangedEvent struct {
	Method string `json:"method"`
	Params struct {
		SecurityState         string                              `json:"securityState"`         // Security state. enum values: unknown, neutral, insecure, secure, info, insecure-broken
		SchemeIsCryptographic bool                                `json:"schemeIsCryptographic"` // True if the page was loaded over cryptographic transport such as HTTPS.
		Explanations          []*SecuritySecurityStateExplanation `json:"explanations"`          // Previously a list of explanations for the security state. Now always empty.
		InsecureContentStatus *SecurityInsecureContentStatus      `json:"insecureContentStatus"` // Information about insecure content on the page.
		Summary               string                              `json:"summary,omitempty"`     // Overrides user-visible description of the state. Always omitted.
	} `json:"Params,omitempty"`
}

The security state of the page changed. No longer being sent.

type SecuritySecurityStateExplanation

type SecuritySecurityStateExplanation struct {
	SecurityState    string   `json:"securityState"`             // Security state representing the severity of the factor being explained. enum values: unknown, neutral, insecure, secure, info, insecure-broken
	Title            string   `json:"title"`                     // Title describing the type of factor.
	Summary          string   `json:"summary"`                   // Short phrase describing the type of factor.
	Description      string   `json:"description"`               // Full text explanation of the factor.
	MixedContentType string   `json:"mixedContentType"`          // The type of mixed content described by the explanation. enum values: blockable, optionally-blockable, none
	Certificate      []string `json:"certificate"`               // Page certificate.
	Recommendations  []string `json:"recommendations,omitempty"` // Recommendations to fix any issues.
}

An explanation of an factor contributing to the security state.

type SecuritySetIgnoreCertificateErrorsParams

type SecuritySetIgnoreCertificateErrorsParams struct {
	// If true, all certificate errors will be ignored.
	Ignore bool `json:"ignore"`
}

type SecuritySetOverrideCertificateErrorsParams

type SecuritySetOverrideCertificateErrorsParams struct {
	// If true, certificate errors will be overridden.
	Override bool `json:"override"`
}

type SecurityVisibleSecurityState

type SecurityVisibleSecurityState struct {
	SecurityState            string                            `json:"securityState"`                      // The security level of the page. enum values: unknown, neutral, insecure, secure, info, insecure-broken
	CertificateSecurityState *SecurityCertificateSecurityState `json:"certificateSecurityState,omitempty"` // Security state details about the page certificate.
	SafetyTipInfo            *SecuritySafetyTipInfo            `json:"safetyTipInfo,omitempty"`            // The type of Safety Tip triggered on the page. Note that this field will be set even if the Safety Tip UI was not actually shown.
	SecurityStateIssueIds    []string                          `json:"securityStateIssueIds"`              // Array of security state issues ids.
}

Security state information about the page.

type SecurityVisibleSecurityStateChangedEvent

type SecurityVisibleSecurityStateChangedEvent struct {
	Method string `json:"method"`
	Params struct {
		VisibleSecurityState *SecurityVisibleSecurityState `json:"visibleSecurityState"` // Security state information about the page.
	} `json:"Params,omitempty"`
}

The security state of the page changed.

type ServiceWorker

type ServiceWorker struct {
	// contains filtered or unexported fields
}

func NewServiceWorker

func NewServiceWorker(target gcdmessage.ChromeTargeter) *ServiceWorker

func (*ServiceWorker) DeliverPushMessage

func (c *ServiceWorker) DeliverPushMessage(ctx context.Context, origin string, registrationId string, data string) (*gcdmessage.ChromeResponse, error)

DeliverPushMessage - origin - registrationId - data -

func (*ServiceWorker) DeliverPushMessageWithParams

DeliverPushMessageWithParams -

func (*ServiceWorker) Disable

func (*ServiceWorker) DispatchPeriodicSyncEvent

func (c *ServiceWorker) DispatchPeriodicSyncEvent(ctx context.Context, origin string, registrationId string, tag string) (*gcdmessage.ChromeResponse, error)

DispatchPeriodicSyncEvent - origin - registrationId - tag -

func (*ServiceWorker) DispatchPeriodicSyncEventWithParams

func (c *ServiceWorker) DispatchPeriodicSyncEventWithParams(ctx context.Context, v *ServiceWorkerDispatchPeriodicSyncEventParams) (*gcdmessage.ChromeResponse, error)

DispatchPeriodicSyncEventWithParams -

func (*ServiceWorker) DispatchSyncEvent

func (c *ServiceWorker) DispatchSyncEvent(ctx context.Context, origin string, registrationId string, tag string, lastChance bool) (*gcdmessage.ChromeResponse, error)

DispatchSyncEvent - origin - registrationId - tag - lastChance -

func (*ServiceWorker) DispatchSyncEventWithParams

DispatchSyncEventWithParams -

func (*ServiceWorker) Enable

func (*ServiceWorker) InspectWorker

func (c *ServiceWorker) InspectWorker(ctx context.Context, versionId string) (*gcdmessage.ChromeResponse, error)

InspectWorker - versionId -

func (*ServiceWorker) InspectWorkerWithParams

InspectWorkerWithParams -

func (*ServiceWorker) SetForceUpdateOnPageLoad

func (c *ServiceWorker) SetForceUpdateOnPageLoad(ctx context.Context, forceUpdateOnPageLoad bool) (*gcdmessage.ChromeResponse, error)

SetForceUpdateOnPageLoad - forceUpdateOnPageLoad -

func (*ServiceWorker) SetForceUpdateOnPageLoadWithParams

func (c *ServiceWorker) SetForceUpdateOnPageLoadWithParams(ctx context.Context, v *ServiceWorkerSetForceUpdateOnPageLoadParams) (*gcdmessage.ChromeResponse, error)

SetForceUpdateOnPageLoadWithParams -

func (*ServiceWorker) SkipWaiting

func (c *ServiceWorker) SkipWaiting(ctx context.Context, scopeURL string) (*gcdmessage.ChromeResponse, error)

SkipWaiting - scopeURL -

func (*ServiceWorker) SkipWaitingWithParams

SkipWaitingWithParams -

func (*ServiceWorker) StartWorker

func (c *ServiceWorker) StartWorker(ctx context.Context, scopeURL string) (*gcdmessage.ChromeResponse, error)

StartWorker - scopeURL -

func (*ServiceWorker) StartWorkerWithParams

StartWorkerWithParams -

func (*ServiceWorker) StopAllWorkers

func (c *ServiceWorker) StopAllWorkers(ctx context.Context) (*gcdmessage.ChromeResponse, error)

func (*ServiceWorker) StopWorker

func (c *ServiceWorker) StopWorker(ctx context.Context, versionId string) (*gcdmessage.ChromeResponse, error)

StopWorker - versionId -

func (*ServiceWorker) StopWorkerWithParams

StopWorkerWithParams -

func (*ServiceWorker) Unregister

func (c *ServiceWorker) Unregister(ctx context.Context, scopeURL string) (*gcdmessage.ChromeResponse, error)

Unregister - scopeURL -

func (*ServiceWorker) UnregisterWithParams

UnregisterWithParams -

func (*ServiceWorker) UpdateRegistration

func (c *ServiceWorker) UpdateRegistration(ctx context.Context, scopeURL string) (*gcdmessage.ChromeResponse, error)

UpdateRegistration - scopeURL -

func (*ServiceWorker) UpdateRegistrationWithParams

UpdateRegistrationWithParams -

type ServiceWorkerDeliverPushMessageParams

type ServiceWorkerDeliverPushMessageParams struct {
	//
	Origin string `json:"origin"`
	//
	RegistrationId string `json:"registrationId"`
	//
	Data string `json:"data"`
}

type ServiceWorkerDispatchPeriodicSyncEventParams

type ServiceWorkerDispatchPeriodicSyncEventParams struct {
	//
	Origin string `json:"origin"`
	//
	RegistrationId string `json:"registrationId"`
	//
	Tag string `json:"tag"`
}

type ServiceWorkerDispatchSyncEventParams

type ServiceWorkerDispatchSyncEventParams struct {
	//
	Origin string `json:"origin"`
	//
	RegistrationId string `json:"registrationId"`
	//
	Tag string `json:"tag"`
	//
	LastChance bool `json:"lastChance"`
}

type ServiceWorkerInspectWorkerParams

type ServiceWorkerInspectWorkerParams struct {
	//
	VersionId string `json:"versionId"`
}

type ServiceWorkerServiceWorkerErrorMessage

type ServiceWorkerServiceWorkerErrorMessage struct {
	ErrorMessage   string `json:"errorMessage"`   //
	RegistrationId string `json:"registrationId"` //
	VersionId      string `json:"versionId"`      //
	SourceURL      string `json:"sourceURL"`      //
	LineNumber     int    `json:"lineNumber"`     //
	ColumnNumber   int    `json:"columnNumber"`   //
}

ServiceWorker error message.

type ServiceWorkerServiceWorkerRegistration

type ServiceWorkerServiceWorkerRegistration struct {
	RegistrationId string `json:"registrationId"` //
	ScopeURL       string `json:"scopeURL"`       //
	IsDeleted      bool   `json:"isDeleted"`      //
}

ServiceWorker registration.

type ServiceWorkerServiceWorkerVersion

type ServiceWorkerServiceWorkerVersion struct {
	VersionId          string   `json:"versionId"`                    //
	RegistrationId     string   `json:"registrationId"`               //
	ScriptURL          string   `json:"scriptURL"`                    //
	RunningStatus      string   `json:"runningStatus"`                //  enum values: stopped, starting, running, stopping
	Status             string   `json:"status"`                       //  enum values: new, installing, installed, activating, activated, redundant
	ScriptLastModified float64  `json:"scriptLastModified,omitempty"` // The Last-Modified header value of the main script.
	ScriptResponseTime float64  `json:"scriptResponseTime,omitempty"` // The time at which the response headers of the main script were received from the server. For cached script it is the last time the cache entry was validated.
	ControlledClients  []string `json:"controlledClients,omitempty"`  //
	TargetId           string   `json:"targetId,omitempty"`           //
}

ServiceWorker version.

type ServiceWorkerSetForceUpdateOnPageLoadParams

type ServiceWorkerSetForceUpdateOnPageLoadParams struct {
	//
	ForceUpdateOnPageLoad bool `json:"forceUpdateOnPageLoad"`
}

type ServiceWorkerSkipWaitingParams

type ServiceWorkerSkipWaitingParams struct {
	//
	ScopeURL string `json:"scopeURL"`
}

type ServiceWorkerStartWorkerParams

type ServiceWorkerStartWorkerParams struct {
	//
	ScopeURL string `json:"scopeURL"`
}

type ServiceWorkerStopWorkerParams

type ServiceWorkerStopWorkerParams struct {
	//
	VersionId string `json:"versionId"`
}

type ServiceWorkerUnregisterParams

type ServiceWorkerUnregisterParams struct {
	//
	ScopeURL string `json:"scopeURL"`
}

type ServiceWorkerUpdateRegistrationParams

type ServiceWorkerUpdateRegistrationParams struct {
	//
	ScopeURL string `json:"scopeURL"`
}

type ServiceWorkerWorkerErrorReportedEvent

type ServiceWorkerWorkerErrorReportedEvent struct {
	Method string `json:"method"`
	Params struct {
		ErrorMessage *ServiceWorkerServiceWorkerErrorMessage `json:"errorMessage"` //
	} `json:"Params,omitempty"`
}

type ServiceWorkerWorkerRegistrationUpdatedEvent

type ServiceWorkerWorkerRegistrationUpdatedEvent struct {
	Method string `json:"method"`
	Params struct {
		Registrations []*ServiceWorkerServiceWorkerRegistration `json:"registrations"` //
	} `json:"Params,omitempty"`
}

type ServiceWorkerWorkerVersionUpdatedEvent

type ServiceWorkerWorkerVersionUpdatedEvent struct {
	Method string `json:"method"`
	Params struct {
		Versions []*ServiceWorkerServiceWorkerVersion `json:"versions"` //
	} `json:"Params,omitempty"`
}

type Storage

type Storage struct {
	// contains filtered or unexported fields
}

func NewStorage

func NewStorage(target gcdmessage.ChromeTargeter) *Storage

func (*Storage) ClearCookies

func (c *Storage) ClearCookies(ctx context.Context, browserContextId string) (*gcdmessage.ChromeResponse, error)

ClearCookies - Clears cookies. browserContextId - Browser context to use when called on the browser endpoint.

func (*Storage) ClearCookiesWithParams

func (c *Storage) ClearCookiesWithParams(ctx context.Context, v *StorageClearCookiesParams) (*gcdmessage.ChromeResponse, error)

ClearCookiesWithParams - Clears cookies.

func (*Storage) ClearDataForOrigin

func (c *Storage) ClearDataForOrigin(ctx context.Context, origin string, storageTypes string) (*gcdmessage.ChromeResponse, error)

ClearDataForOrigin - Clears storage for origin. origin - Security origin. storageTypes - Comma separated list of StorageType to clear.

func (*Storage) ClearDataForOriginWithParams

func (c *Storage) ClearDataForOriginWithParams(ctx context.Context, v *StorageClearDataForOriginParams) (*gcdmessage.ChromeResponse, error)

ClearDataForOriginWithParams - Clears storage for origin.

func (*Storage) ClearDataForStorageKey added in v2.2.6

func (c *Storage) ClearDataForStorageKey(ctx context.Context, storageKey string, storageTypes string) (*gcdmessage.ChromeResponse, error)

ClearDataForStorageKey - Clears storage for storage key. storageKey - Storage key. storageTypes - Comma separated list of StorageType to clear.

func (*Storage) ClearDataForStorageKeyWithParams added in v2.2.6

func (c *Storage) ClearDataForStorageKeyWithParams(ctx context.Context, v *StorageClearDataForStorageKeyParams) (*gcdmessage.ChromeResponse, error)

ClearDataForStorageKeyWithParams - Clears storage for storage key.

func (*Storage) ClearSharedStorageEntries added in v2.3.0

func (c *Storage) ClearSharedStorageEntries(ctx context.Context, ownerOrigin string) (*gcdmessage.ChromeResponse, error)

ClearSharedStorageEntries - Clears all entries for a given origin's shared storage. ownerOrigin -

func (*Storage) ClearSharedStorageEntriesWithParams added in v2.3.0

func (c *Storage) ClearSharedStorageEntriesWithParams(ctx context.Context, v *StorageClearSharedStorageEntriesParams) (*gcdmessage.ChromeResponse, error)

ClearSharedStorageEntriesWithParams - Clears all entries for a given origin's shared storage.

func (*Storage) ClearTrustTokens added in v2.1.1

func (c *Storage) ClearTrustTokens(ctx context.Context, issuerOrigin string) (bool, error)

ClearTrustTokens - Removes all Trust Tokens issued by the provided issuerOrigin. Leaves other stored data, including the issuer's Redemption Records, intact. issuerOrigin - Returns - didDeleteTokens - True if any tokens were deleted, false otherwise.

func (*Storage) ClearTrustTokensWithParams added in v2.1.1

func (c *Storage) ClearTrustTokensWithParams(ctx context.Context, v *StorageClearTrustTokensParams) (bool, error)

ClearTrustTokensWithParams - Removes all Trust Tokens issued by the provided issuerOrigin. Leaves other stored data, including the issuer's Redemption Records, intact. Returns - didDeleteTokens - True if any tokens were deleted, false otherwise.

func (*Storage) DeleteSharedStorageEntry added in v2.3.0

func (c *Storage) DeleteSharedStorageEntry(ctx context.Context, ownerOrigin string, key string) (*gcdmessage.ChromeResponse, error)

DeleteSharedStorageEntry - Deletes entry for `key` (if it exists) for a given origin's shared storage. ownerOrigin - key -

func (*Storage) DeleteSharedStorageEntryWithParams added in v2.3.0

func (c *Storage) DeleteSharedStorageEntryWithParams(ctx context.Context, v *StorageDeleteSharedStorageEntryParams) (*gcdmessage.ChromeResponse, error)

DeleteSharedStorageEntryWithParams - Deletes entry for `key` (if it exists) for a given origin's shared storage.

func (*Storage) DeleteStorageBucket added in v2.3.1

func (c *Storage) DeleteStorageBucket(ctx context.Context, bucket *StorageStorageBucket) (*gcdmessage.ChromeResponse, error)

DeleteStorageBucket - Deletes the Storage Bucket with the given storage key and bucket name. bucket -

func (*Storage) DeleteStorageBucketWithParams added in v2.3.1

func (c *Storage) DeleteStorageBucketWithParams(ctx context.Context, v *StorageDeleteStorageBucketParams) (*gcdmessage.ChromeResponse, error)

DeleteStorageBucketWithParams - Deletes the Storage Bucket with the given storage key and bucket name.

func (*Storage) GetCookies

func (c *Storage) GetCookies(ctx context.Context, browserContextId string) ([]*NetworkCookie, error)

GetCookies - Returns all browser cookies. browserContextId - Browser context to use when called on the browser endpoint. Returns - cookies - Array of cookie objects.

func (*Storage) GetCookiesWithParams

func (c *Storage) GetCookiesWithParams(ctx context.Context, v *StorageGetCookiesParams) ([]*NetworkCookie, error)

GetCookiesWithParams - Returns all browser cookies. Returns - cookies - Array of cookie objects.

func (*Storage) GetInterestGroupDetails added in v2.2.5

func (c *Storage) GetInterestGroupDetails(ctx context.Context, ownerOrigin string, name string) (*StorageInterestGroupDetails, error)

GetInterestGroupDetails - Gets details for a named interest group. ownerOrigin - name - Returns - details -

func (*Storage) GetInterestGroupDetailsWithParams added in v2.2.5

func (c *Storage) GetInterestGroupDetailsWithParams(ctx context.Context, v *StorageGetInterestGroupDetailsParams) (*StorageInterestGroupDetails, error)

GetInterestGroupDetailsWithParams - Gets details for a named interest group. Returns - details -

func (*Storage) GetSharedStorageEntries added in v2.3.0

func (c *Storage) GetSharedStorageEntries(ctx context.Context, ownerOrigin string) ([]*StorageSharedStorageEntry, error)

GetSharedStorageEntries - Gets the entries in an given origin's shared storage. ownerOrigin - Returns - entries -

func (*Storage) GetSharedStorageEntriesWithParams added in v2.3.0

func (c *Storage) GetSharedStorageEntriesWithParams(ctx context.Context, v *StorageGetSharedStorageEntriesParams) ([]*StorageSharedStorageEntry, error)

GetSharedStorageEntriesWithParams - Gets the entries in an given origin's shared storage. Returns - entries -

func (*Storage) GetSharedStorageMetadata added in v2.3.0

func (c *Storage) GetSharedStorageMetadata(ctx context.Context, ownerOrigin string) (*StorageSharedStorageMetadata, error)

GetSharedStorageMetadata - Gets metadata for an origin's shared storage. ownerOrigin - Returns - metadata -

func (*Storage) GetSharedStorageMetadataWithParams added in v2.3.0

func (c *Storage) GetSharedStorageMetadataWithParams(ctx context.Context, v *StorageGetSharedStorageMetadataParams) (*StorageSharedStorageMetadata, error)

GetSharedStorageMetadataWithParams - Gets metadata for an origin's shared storage. Returns - metadata -

func (*Storage) GetStorageKeyForFrame added in v2.2.6

func (c *Storage) GetStorageKeyForFrame(ctx context.Context, frameId string) (string, error)

GetStorageKeyForFrame - Returns a storage key given a frame id. frameId - Returns - storageKey -

func (*Storage) GetStorageKeyForFrameWithParams added in v2.2.6

func (c *Storage) GetStorageKeyForFrameWithParams(ctx context.Context, v *StorageGetStorageKeyForFrameParams) (string, error)

GetStorageKeyForFrameWithParams - Returns a storage key given a frame id. Returns - storageKey -

func (*Storage) GetTrustTokens added in v2.0.7

func (c *Storage) GetTrustTokens(ctx context.Context) ([]*StorageTrustTokens, error)

GetTrustTokens - Returns the number of stored Trust Tokens per issuer for the current browsing context. Returns - tokens -

func (*Storage) GetUsageAndQuota

func (c *Storage) GetUsageAndQuota(ctx context.Context, origin string) (float64, float64, bool, []*StorageUsageForType, error)

GetUsageAndQuota - Returns usage and quota in bytes. origin - Security origin. Returns - usage - Storage usage (bytes). quota - Storage quota (bytes). overrideActive - Whether or not the origin has an active storage quota override usageBreakdown - Storage usage per type (bytes).

func (*Storage) GetUsageAndQuotaWithParams

func (c *Storage) GetUsageAndQuotaWithParams(ctx context.Context, v *StorageGetUsageAndQuotaParams) (float64, float64, bool, []*StorageUsageForType, error)

GetUsageAndQuotaWithParams - Returns usage and quota in bytes. Returns - usage - Storage usage (bytes). quota - Storage quota (bytes). overrideActive - Whether or not the origin has an active storage quota override usageBreakdown - Storage usage per type (bytes).

func (*Storage) OverrideQuotaForOrigin added in v2.0.7

func (c *Storage) OverrideQuotaForOrigin(ctx context.Context, origin string, quotaSize float64) (*gcdmessage.ChromeResponse, error)

OverrideQuotaForOrigin - Override quota for the specified origin origin - Security origin. quotaSize - The quota size (in bytes) to override the original quota with. If this is called multiple times, the overridden quota will be equal to the quotaSize provided in the final call. If this is called without specifying a quotaSize, the quota will be reset to the default value for the specified origin. If this is called multiple times with different origins, the override will be maintained for each origin until it is disabled (called without a quotaSize).

func (*Storage) OverrideQuotaForOriginWithParams added in v2.0.7

func (c *Storage) OverrideQuotaForOriginWithParams(ctx context.Context, v *StorageOverrideQuotaForOriginParams) (*gcdmessage.ChromeResponse, error)

OverrideQuotaForOriginWithParams - Override quota for the specified origin

func (*Storage) ResetSharedStorageBudget added in v2.3.0

func (c *Storage) ResetSharedStorageBudget(ctx context.Context, ownerOrigin string) (*gcdmessage.ChromeResponse, error)

ResetSharedStorageBudget - Resets the budget for `ownerOrigin` by clearing all budget withdrawals. ownerOrigin -

func (*Storage) ResetSharedStorageBudgetWithParams added in v2.3.0

func (c *Storage) ResetSharedStorageBudgetWithParams(ctx context.Context, v *StorageResetSharedStorageBudgetParams) (*gcdmessage.ChromeResponse, error)

ResetSharedStorageBudgetWithParams - Resets the budget for `ownerOrigin` by clearing all budget withdrawals.

func (*Storage) RunBounceTrackingMitigations added in v2.3.1

func (c *Storage) RunBounceTrackingMitigations(ctx context.Context) ([]string, error)

RunBounceTrackingMitigations - Deletes state for sites identified as potential bounce trackers, immediately. Returns - deletedSites -

func (*Storage) SetCookies

func (c *Storage) SetCookies(ctx context.Context, cookies []*NetworkCookieParam, browserContextId string) (*gcdmessage.ChromeResponse, error)

SetCookies - Sets given cookies. cookies - Cookies to be set. browserContextId - Browser context to use when called on the browser endpoint.

func (*Storage) SetCookiesWithParams

func (c *Storage) SetCookiesWithParams(ctx context.Context, v *StorageSetCookiesParams) (*gcdmessage.ChromeResponse, error)

SetCookiesWithParams - Sets given cookies.

func (*Storage) SetInterestGroupTracking added in v2.2.5

func (c *Storage) SetInterestGroupTracking(ctx context.Context, enable bool) (*gcdmessage.ChromeResponse, error)

SetInterestGroupTracking - Enables/Disables issuing of interestGroupAccessed events. enable -

func (*Storage) SetInterestGroupTrackingWithParams added in v2.2.5

func (c *Storage) SetInterestGroupTrackingWithParams(ctx context.Context, v *StorageSetInterestGroupTrackingParams) (*gcdmessage.ChromeResponse, error)

SetInterestGroupTrackingWithParams - Enables/Disables issuing of interestGroupAccessed events.

func (*Storage) SetSharedStorageEntry added in v2.3.0

func (c *Storage) SetSharedStorageEntry(ctx context.Context, ownerOrigin string, key string, value string, ignoreIfPresent bool) (*gcdmessage.ChromeResponse, error)

SetSharedStorageEntry - Sets entry with `key` and `value` for a given origin's shared storage. ownerOrigin - key - value - ignoreIfPresent - If `ignoreIfPresent` is included and true, then only sets the entry if `key` doesn't already exist.

func (*Storage) SetSharedStorageEntryWithParams added in v2.3.0

func (c *Storage) SetSharedStorageEntryWithParams(ctx context.Context, v *StorageSetSharedStorageEntryParams) (*gcdmessage.ChromeResponse, error)

SetSharedStorageEntryWithParams - Sets entry with `key` and `value` for a given origin's shared storage.

func (*Storage) SetSharedStorageTracking added in v2.3.0

func (c *Storage) SetSharedStorageTracking(ctx context.Context, enable bool) (*gcdmessage.ChromeResponse, error)

SetSharedStorageTracking - Enables/disables issuing of sharedStorageAccessed events. enable -

func (*Storage) SetSharedStorageTrackingWithParams added in v2.3.0

func (c *Storage) SetSharedStorageTrackingWithParams(ctx context.Context, v *StorageSetSharedStorageTrackingParams) (*gcdmessage.ChromeResponse, error)

SetSharedStorageTrackingWithParams - Enables/disables issuing of sharedStorageAccessed events.

func (*Storage) SetStorageBucketTracking added in v2.3.1

func (c *Storage) SetStorageBucketTracking(ctx context.Context, storageKey string, enable bool) (*gcdmessage.ChromeResponse, error)

SetStorageBucketTracking - Set tracking for a storage key's buckets. storageKey - enable -

func (*Storage) SetStorageBucketTrackingWithParams added in v2.3.1

func (c *Storage) SetStorageBucketTrackingWithParams(ctx context.Context, v *StorageSetStorageBucketTrackingParams) (*gcdmessage.ChromeResponse, error)

SetStorageBucketTrackingWithParams - Set tracking for a storage key's buckets.

func (*Storage) TrackCacheStorageForOrigin

func (c *Storage) TrackCacheStorageForOrigin(ctx context.Context, origin string) (*gcdmessage.ChromeResponse, error)

TrackCacheStorageForOrigin - Registers origin to be notified when an update occurs to its cache storage list. origin - Security origin.

func (*Storage) TrackCacheStorageForOriginWithParams

func (c *Storage) TrackCacheStorageForOriginWithParams(ctx context.Context, v *StorageTrackCacheStorageForOriginParams) (*gcdmessage.ChromeResponse, error)

TrackCacheStorageForOriginWithParams - Registers origin to be notified when an update occurs to its cache storage list.

func (*Storage) TrackCacheStorageForStorageKey added in v2.3.0

func (c *Storage) TrackCacheStorageForStorageKey(ctx context.Context, storageKey string) (*gcdmessage.ChromeResponse, error)

TrackCacheStorageForStorageKey - Registers storage key to be notified when an update occurs to its cache storage list. storageKey - Storage key.

func (*Storage) TrackCacheStorageForStorageKeyWithParams added in v2.3.0

func (c *Storage) TrackCacheStorageForStorageKeyWithParams(ctx context.Context, v *StorageTrackCacheStorageForStorageKeyParams) (*gcdmessage.ChromeResponse, error)

TrackCacheStorageForStorageKeyWithParams - Registers storage key to be notified when an update occurs to its cache storage list.

func (*Storage) TrackIndexedDBForOrigin

func (c *Storage) TrackIndexedDBForOrigin(ctx context.Context, origin string) (*gcdmessage.ChromeResponse, error)

TrackIndexedDBForOrigin - Registers origin to be notified when an update occurs to its IndexedDB. origin - Security origin.

func (*Storage) TrackIndexedDBForOriginWithParams

func (c *Storage) TrackIndexedDBForOriginWithParams(ctx context.Context, v *StorageTrackIndexedDBForOriginParams) (*gcdmessage.ChromeResponse, error)

TrackIndexedDBForOriginWithParams - Registers origin to be notified when an update occurs to its IndexedDB.

func (*Storage) TrackIndexedDBForStorageKey added in v2.2.6

func (c *Storage) TrackIndexedDBForStorageKey(ctx context.Context, storageKey string) (*gcdmessage.ChromeResponse, error)

TrackIndexedDBForStorageKey - Registers storage key to be notified when an update occurs to its IndexedDB. storageKey - Storage key.

func (*Storage) TrackIndexedDBForStorageKeyWithParams added in v2.2.6

func (c *Storage) TrackIndexedDBForStorageKeyWithParams(ctx context.Context, v *StorageTrackIndexedDBForStorageKeyParams) (*gcdmessage.ChromeResponse, error)

TrackIndexedDBForStorageKeyWithParams - Registers storage key to be notified when an update occurs to its IndexedDB.

func (*Storage) UntrackCacheStorageForOrigin

func (c *Storage) UntrackCacheStorageForOrigin(ctx context.Context, origin string) (*gcdmessage.ChromeResponse, error)

UntrackCacheStorageForOrigin - Unregisters origin from receiving notifications for cache storage. origin - Security origin.

func (*Storage) UntrackCacheStorageForOriginWithParams

func (c *Storage) UntrackCacheStorageForOriginWithParams(ctx context.Context, v *StorageUntrackCacheStorageForOriginParams) (*gcdmessage.ChromeResponse, error)

UntrackCacheStorageForOriginWithParams - Unregisters origin from receiving notifications for cache storage.

func (*Storage) UntrackCacheStorageForStorageKey added in v2.3.0

func (c *Storage) UntrackCacheStorageForStorageKey(ctx context.Context, storageKey string) (*gcdmessage.ChromeResponse, error)

UntrackCacheStorageForStorageKey - Unregisters storage key from receiving notifications for cache storage. storageKey - Storage key.

func (*Storage) UntrackCacheStorageForStorageKeyWithParams added in v2.3.0

func (c *Storage) UntrackCacheStorageForStorageKeyWithParams(ctx context.Context, v *StorageUntrackCacheStorageForStorageKeyParams) (*gcdmessage.ChromeResponse, error)

UntrackCacheStorageForStorageKeyWithParams - Unregisters storage key from receiving notifications for cache storage.

func (*Storage) UntrackIndexedDBForOrigin

func (c *Storage) UntrackIndexedDBForOrigin(ctx context.Context, origin string) (*gcdmessage.ChromeResponse, error)

UntrackIndexedDBForOrigin - Unregisters origin from receiving notifications for IndexedDB. origin - Security origin.

func (*Storage) UntrackIndexedDBForOriginWithParams

func (c *Storage) UntrackIndexedDBForOriginWithParams(ctx context.Context, v *StorageUntrackIndexedDBForOriginParams) (*gcdmessage.ChromeResponse, error)

UntrackIndexedDBForOriginWithParams - Unregisters origin from receiving notifications for IndexedDB.

func (*Storage) UntrackIndexedDBForStorageKey added in v2.2.6

func (c *Storage) UntrackIndexedDBForStorageKey(ctx context.Context, storageKey string) (*gcdmessage.ChromeResponse, error)

UntrackIndexedDBForStorageKey - Unregisters storage key from receiving notifications for IndexedDB. storageKey - Storage key.

func (*Storage) UntrackIndexedDBForStorageKeyWithParams added in v2.2.6

func (c *Storage) UntrackIndexedDBForStorageKeyWithParams(ctx context.Context, v *StorageUntrackIndexedDBForStorageKeyParams) (*gcdmessage.ChromeResponse, error)

UntrackIndexedDBForStorageKeyWithParams - Unregisters storage key from receiving notifications for IndexedDB.

type StorageCacheStorageContentUpdatedEvent

type StorageCacheStorageContentUpdatedEvent struct {
	Method string `json:"method"`
	Params struct {
		Origin     string `json:"origin"`     // Origin to update.
		StorageKey string `json:"storageKey"` // Storage key to update.
		CacheName  string `json:"cacheName"`  // Name of cache in origin.
	} `json:"Params,omitempty"`
}

A cache's contents have been modified.

type StorageCacheStorageListUpdatedEvent

type StorageCacheStorageListUpdatedEvent struct {
	Method string `json:"method"`
	Params struct {
		Origin     string `json:"origin"`     // Origin to update.
		StorageKey string `json:"storageKey"` // Storage key to update.
	} `json:"Params,omitempty"`
}

A cache has been added/deleted.

type StorageClearCookiesParams

type StorageClearCookiesParams struct {
	// Browser context to use when called on the browser endpoint.
	BrowserContextId string `json:"browserContextId,omitempty"`
}

type StorageClearDataForOriginParams

type StorageClearDataForOriginParams struct {
	// Security origin.
	Origin string `json:"origin"`
	// Comma separated list of StorageType to clear.
	StorageTypes string `json:"storageTypes"`
}

type StorageClearDataForStorageKeyParams added in v2.2.6

type StorageClearDataForStorageKeyParams struct {
	// Storage key.
	StorageKey string `json:"storageKey"`
	// Comma separated list of StorageType to clear.
	StorageTypes string `json:"storageTypes"`
}

type StorageClearSharedStorageEntriesParams added in v2.3.0

type StorageClearSharedStorageEntriesParams struct {
	//
	OwnerOrigin string `json:"ownerOrigin"`
}

type StorageClearTrustTokensParams added in v2.1.1

type StorageClearTrustTokensParams struct {
	//
	IssuerOrigin string `json:"issuerOrigin"`
}

type StorageDeleteSharedStorageEntryParams added in v2.3.0

type StorageDeleteSharedStorageEntryParams struct {
	//
	OwnerOrigin string `json:"ownerOrigin"`
	//
	Key string `json:"key"`
}

type StorageDeleteStorageBucketParams added in v2.3.1

type StorageDeleteStorageBucketParams struct {
	//
	Bucket *StorageStorageBucket `json:"bucket"`
}

type StorageGetCookiesParams

type StorageGetCookiesParams struct {
	// Browser context to use when called on the browser endpoint.
	BrowserContextId string `json:"browserContextId,omitempty"`
}

type StorageGetInterestGroupDetailsParams added in v2.2.5

type StorageGetInterestGroupDetailsParams struct {
	//
	OwnerOrigin string `json:"ownerOrigin"`
	//
	Name string `json:"name"`
}

type StorageGetSharedStorageEntriesParams added in v2.3.0

type StorageGetSharedStorageEntriesParams struct {
	//
	OwnerOrigin string `json:"ownerOrigin"`
}

type StorageGetSharedStorageMetadataParams added in v2.3.0

type StorageGetSharedStorageMetadataParams struct {
	//
	OwnerOrigin string `json:"ownerOrigin"`
}

type StorageGetStorageKeyForFrameParams added in v2.2.6

type StorageGetStorageKeyForFrameParams struct {
	//
	FrameId string `json:"frameId"`
}

type StorageGetUsageAndQuotaParams

type StorageGetUsageAndQuotaParams struct {
	// Security origin.
	Origin string `json:"origin"`
}

type StorageIndexedDBContentUpdatedEvent

type StorageIndexedDBContentUpdatedEvent struct {
	Method string `json:"method"`
	Params struct {
		Origin          string `json:"origin"`          // Origin to update.
		StorageKey      string `json:"storageKey"`      // Storage key to update.
		BucketId        string `json:"bucketId"`        // Storage bucket to update.
		DatabaseName    string `json:"databaseName"`    // Database to update.
		ObjectStoreName string `json:"objectStoreName"` // ObjectStore to update.
	} `json:"Params,omitempty"`
}

The origin's IndexedDB object store has been modified.

type StorageIndexedDBListUpdatedEvent

type StorageIndexedDBListUpdatedEvent struct {
	Method string `json:"method"`
	Params struct {
		Origin     string `json:"origin"`     // Origin to update.
		StorageKey string `json:"storageKey"` // Storage key to update.
		BucketId   string `json:"bucketId"`   // Storage bucket to update.
	} `json:"Params,omitempty"`
}

The origin's IndexedDB database list has been modified.

type StorageInterestGroupAccessedEvent added in v2.2.5

type StorageInterestGroupAccessedEvent struct {
	Method string `json:"method"`
	Params struct {
		AccessTime  float64 `json:"accessTime"`  //
		Type        string  `json:"type"`        //  enum values: join, leave, update, loaded, bid, win
		OwnerOrigin string  `json:"ownerOrigin"` //
		Name        string  `json:"name"`        //
	} `json:"Params,omitempty"`
}

One of the interest groups was accessed by the associated page.

type StorageInterestGroupAd added in v2.2.5

type StorageInterestGroupAd struct {
	RenderUrl string `json:"renderUrl"`          //
	Metadata  string `json:"metadata,omitempty"` //
}

Ad advertising element inside an interest group.

type StorageInterestGroupDetails added in v2.2.5

type StorageInterestGroupDetails struct {
	OwnerOrigin               string                    `json:"ownerOrigin"`                        //
	Name                      string                    `json:"name"`                               //
	ExpirationTime            float64                   `json:"expirationTime"`                     //
	JoiningOrigin             string                    `json:"joiningOrigin"`                      //
	BiddingUrl                string                    `json:"biddingUrl,omitempty"`               //
	BiddingWasmHelperUrl      string                    `json:"biddingWasmHelperUrl,omitempty"`     //
	UpdateUrl                 string                    `json:"updateUrl,omitempty"`                //
	TrustedBiddingSignalsUrl  string                    `json:"trustedBiddingSignalsUrl,omitempty"` //
	TrustedBiddingSignalsKeys []string                  `json:"trustedBiddingSignalsKeys"`          //
	UserBiddingSignals        string                    `json:"userBiddingSignals,omitempty"`       //
	Ads                       []*StorageInterestGroupAd `json:"ads"`                                //
	AdComponents              []*StorageInterestGroupAd `json:"adComponents"`                       //
}

The full details of an interest group.

type StorageOverrideQuotaForOriginParams added in v2.0.7

type StorageOverrideQuotaForOriginParams struct {
	// Security origin.
	Origin string `json:"origin"`
	// The quota size (in bytes) to override the original quota with. If this is called multiple times, the overridden quota will be equal to the quotaSize provided in the final call. If this is called without specifying a quotaSize, the quota will be reset to the default value for the specified origin. If this is called multiple times with different origins, the override will be maintained for each origin until it is disabled (called without a quotaSize).
	QuotaSize float64 `json:"quotaSize,omitempty"`
}

type StorageResetSharedStorageBudgetParams added in v2.3.0

type StorageResetSharedStorageBudgetParams struct {
	//
	OwnerOrigin string `json:"ownerOrigin"`
}

type StorageSetCookiesParams

type StorageSetCookiesParams struct {
	// Cookies to be set.
	Cookies []*NetworkCookieParam `json:"cookies"`
	// Browser context to use when called on the browser endpoint.
	BrowserContextId string `json:"browserContextId,omitempty"`
}

type StorageSetInterestGroupTrackingParams added in v2.2.5

type StorageSetInterestGroupTrackingParams struct {
	//
	Enable bool `json:"enable"`
}

type StorageSetSharedStorageEntryParams added in v2.3.0

type StorageSetSharedStorageEntryParams struct {
	//
	OwnerOrigin string `json:"ownerOrigin"`
	//
	Key string `json:"key"`
	//
	Value string `json:"value"`
	// If `ignoreIfPresent` is included and true, then only sets the entry if `key` doesn't already exist.
	IgnoreIfPresent bool `json:"ignoreIfPresent,omitempty"`
}

type StorageSetSharedStorageTrackingParams added in v2.3.0

type StorageSetSharedStorageTrackingParams struct {
	//
	Enable bool `json:"enable"`
}

type StorageSetStorageBucketTrackingParams added in v2.3.1

type StorageSetStorageBucketTrackingParams struct {
	//
	StorageKey string `json:"storageKey"`
	//
	Enable bool `json:"enable"`
}

type StorageSharedStorageAccessParams added in v2.3.0

type StorageSharedStorageAccessParams struct {
	ScriptSourceUrl  string                                 `json:"scriptSourceUrl,omitempty"`  // Spec of the module script URL. Present only for SharedStorageAccessType.documentAddModule.
	OperationName    string                                 `json:"operationName,omitempty"`    // Name of the registered operation to be run. Present only for SharedStorageAccessType.documentRun and SharedStorageAccessType.documentSelectURL.
	SerializedData   string                                 `json:"serializedData,omitempty"`   // The operation's serialized data in bytes (converted to a string). Present only for SharedStorageAccessType.documentRun and SharedStorageAccessType.documentSelectURL.
	UrlsWithMetadata []*StorageSharedStorageUrlWithMetadata `json:"urlsWithMetadata,omitempty"` // Array of candidate URLs' specs, along with any associated metadata. Present only for SharedStorageAccessType.documentSelectURL.
	Key              string                                 `json:"key,omitempty"`              // Key for a specific entry in an origin's shared storage. Present only for SharedStorageAccessType.documentSet, SharedStorageAccessType.documentAppend, SharedStorageAccessType.documentDelete, SharedStorageAccessType.workletSet, SharedStorageAccessType.workletAppend, SharedStorageAccessType.workletDelete, and SharedStorageAccessType.workletGet.
	Value            string                                 `json:"value,omitempty"`            // Value for a specific entry in an origin's shared storage. Present only for SharedStorageAccessType.documentSet, SharedStorageAccessType.documentAppend, SharedStorageAccessType.workletSet, and SharedStorageAccessType.workletAppend.
	IgnoreIfPresent  bool                                   `json:"ignoreIfPresent,omitempty"`  // Whether or not to set an entry for a key if that key is already present. Present only for SharedStorageAccessType.documentSet and SharedStorageAccessType.workletSet.
}

Bundles the parameters for shared storage access events whose presence/absence can vary according to SharedStorageAccessType.

type StorageSharedStorageAccessedEvent added in v2.3.0

type StorageSharedStorageAccessedEvent struct {
	Method string `json:"method"`
	Params struct {
		AccessTime  float64                           `json:"accessTime"`  // Time of the access.
		Type        string                            `json:"type"`        // Enum value indicating the Shared Storage API method invoked. enum values: documentAddModule, documentSelectURL, documentRun, documentSet, documentAppend, documentDelete, documentClear, workletSet, workletAppend, workletDelete, workletClear, workletGet, workletKeys, workletEntries, workletLength, workletRemainingBudget
		MainFrameId string                            `json:"mainFrameId"` // DevTools Frame Token for the primary frame tree's root.
		OwnerOrigin string                            `json:"ownerOrigin"` // Serialized origin for the context that invoked the Shared Storage API.
		Params      *StorageSharedStorageAccessParams `json:"params"`      // The sub-parameters warapped by `params` are all optional and their presence/absence depends on `type`.
	} `json:"Params,omitempty"`
}

Shared storage was accessed by the associated page. The following parameters are included in all events.

type StorageSharedStorageEntry added in v2.3.0

type StorageSharedStorageEntry struct {
	Key   string `json:"key"`   //
	Value string `json:"value"` //
}

Struct for a single key-value pair in an origin's shared storage.

type StorageSharedStorageMetadata added in v2.3.0

type StorageSharedStorageMetadata struct {
	CreationTime    float64 `json:"creationTime"`    //
	Length          int     `json:"length"`          //
	RemainingBudget float64 `json:"remainingBudget"` //
}

Details for an origin's shared storage.

type StorageSharedStorageReportingMetadata added in v2.3.0

type StorageSharedStorageReportingMetadata struct {
	EventType    string `json:"eventType"`    //
	ReportingUrl string `json:"reportingUrl"` //
}

Pair of reporting metadata details for a candidate URL for `selectURL()`.

type StorageSharedStorageUrlWithMetadata added in v2.3.0

type StorageSharedStorageUrlWithMetadata struct {
	Url               string                                   `json:"url"`               // Spec of candidate URL.
	ReportingMetadata []*StorageSharedStorageReportingMetadata `json:"reportingMetadata"` // Any associated reporting metadata.
}

Bundles a candidate URL with its reporting metadata.

type StorageStorageBucket added in v2.3.1

type StorageStorageBucket struct {
	StorageKey string `json:"storageKey"`     //
	Name       string `json:"name,omitempty"` // If not specified, it is the default bucket of the storageKey.
}

No Description.

type StorageStorageBucketCreatedOrUpdatedEvent added in v2.3.1

type StorageStorageBucketCreatedOrUpdatedEvent struct {
	Method string `json:"method"`
	Params struct {
		BucketInfo *StorageStorageBucketInfo `json:"bucketInfo"` //
	} `json:"Params,omitempty"`
}

type StorageStorageBucketDeletedEvent added in v2.3.1

type StorageStorageBucketDeletedEvent struct {
	Method string `json:"method"`
	Params struct {
		BucketId string `json:"bucketId"` //
	} `json:"Params,omitempty"`
}

type StorageStorageBucketInfo added in v2.3.1

type StorageStorageBucketInfo struct {
	Bucket     *StorageStorageBucket `json:"bucket"`     //
	Id         string                `json:"id"`         //
	Expiration float64               `json:"expiration"` //
	Quota      float64               `json:"quota"`      // Storage quota (bytes).
	Persistent bool                  `json:"persistent"` //
	Durability string                `json:"durability"` //  enum values: relaxed, strict
}

No Description.

type StorageTrackCacheStorageForOriginParams

type StorageTrackCacheStorageForOriginParams struct {
	// Security origin.
	Origin string `json:"origin"`
}

type StorageTrackCacheStorageForStorageKeyParams added in v2.3.0

type StorageTrackCacheStorageForStorageKeyParams struct {
	// Storage key.
	StorageKey string `json:"storageKey"`
}

type StorageTrackIndexedDBForOriginParams

type StorageTrackIndexedDBForOriginParams struct {
	// Security origin.
	Origin string `json:"origin"`
}

type StorageTrackIndexedDBForStorageKeyParams added in v2.2.6

type StorageTrackIndexedDBForStorageKeyParams struct {
	// Storage key.
	StorageKey string `json:"storageKey"`
}

type StorageTrustTokens added in v2.0.7

type StorageTrustTokens struct {
	IssuerOrigin string  `json:"issuerOrigin"` //
	Count        float64 `json:"count"`        //
}

Pair of issuer origin and number of available (signed, but not used) Trust Tokens from that issuer.

type StorageUntrackCacheStorageForOriginParams

type StorageUntrackCacheStorageForOriginParams struct {
	// Security origin.
	Origin string `json:"origin"`
}

type StorageUntrackCacheStorageForStorageKeyParams added in v2.3.0

type StorageUntrackCacheStorageForStorageKeyParams struct {
	// Storage key.
	StorageKey string `json:"storageKey"`
}

type StorageUntrackIndexedDBForOriginParams

type StorageUntrackIndexedDBForOriginParams struct {
	// Security origin.
	Origin string `json:"origin"`
}

type StorageUntrackIndexedDBForStorageKeyParams added in v2.2.6

type StorageUntrackIndexedDBForStorageKeyParams struct {
	// Storage key.
	StorageKey string `json:"storageKey"`
}

type StorageUsageForType

type StorageUsageForType struct {
	StorageType string  `json:"storageType"` // Name of storage type. enum values: appcache, cookies, file_systems, indexeddb, local_storage, shader_cache, websql, service_workers, cache_storage, interest_groups, shared_storage, storage_buckets, all, other
	Usage       float64 `json:"usage"`       // Storage usage (bytes).
}

Usage for a storage type.

type SystemInfo

type SystemInfo struct {
	// contains filtered or unexported fields
}

func NewSystemInfo

func NewSystemInfo(target gcdmessage.ChromeTargeter) *SystemInfo

func (*SystemInfo) GetFeatureState added in v2.3.0

func (c *SystemInfo) GetFeatureState(ctx context.Context, featureState string) (bool, error)

GetFeatureState - Returns information about the feature state. featureState - Returns - featureEnabled -

func (*SystemInfo) GetFeatureStateWithParams added in v2.3.0

func (c *SystemInfo) GetFeatureStateWithParams(ctx context.Context, v *SystemInfoGetFeatureStateParams) (bool, error)

GetFeatureStateWithParams - Returns information about the feature state. Returns - featureEnabled -

func (*SystemInfo) GetInfo

GetInfo - Returns information about the system. Returns - gpu - Information about the GPUs on the system. modelName - A platform-dependent description of the model of the machine. On Mac OS, this is, for example, 'MacBookPro'. Will be the empty string if not supported. modelVersion - A platform-dependent description of the version of the machine. On Mac OS, this is, for example, '10.1'. Will be the empty string if not supported. commandLine - The command line string used to launch the browser. Will be the empty string if not supported.

func (*SystemInfo) GetProcessInfo

func (c *SystemInfo) GetProcessInfo(ctx context.Context) ([]*SystemInfoProcessInfo, error)

GetProcessInfo - Returns information about all running processes. Returns - processInfo - An array of process info blocks.

type SystemInfoGPUDevice

type SystemInfoGPUDevice struct {
	VendorId      float64 `json:"vendorId"`           // PCI ID of the GPU vendor, if available; 0 otherwise.
	DeviceId      float64 `json:"deviceId"`           // PCI ID of the GPU device, if available; 0 otherwise.
	SubSysId      float64 `json:"subSysId,omitempty"` // Sub sys ID of the GPU, only available on Windows.
	Revision      float64 `json:"revision,omitempty"` // Revision of the GPU, only available on Windows.
	VendorString  string  `json:"vendorString"`       // String description of the GPU vendor, if the PCI ID is not available.
	DeviceString  string  `json:"deviceString"`       // String description of the GPU device, if the PCI ID is not available.
	DriverVendor  string  `json:"driverVendor"`       // String description of the GPU driver vendor.
	DriverVersion string  `json:"driverVersion"`      // String description of the GPU driver version.
}

Describes a single graphics processor (GPU).

type SystemInfoGPUInfo

type SystemInfoGPUInfo struct {
	Devices              []*SystemInfoGPUDevice                        `json:"devices"`                 // The graphics devices on the system. Element 0 is the primary GPU.
	AuxAttributes        map[string]interface{}                        `json:"auxAttributes,omitempty"` // An optional dictionary of additional GPU related attributes.
	FeatureStatus        map[string]interface{}                        `json:"featureStatus,omitempty"` // An optional dictionary of graphics features and their status.
	DriverBugWorkarounds []string                                      `json:"driverBugWorkarounds"`    // An optional array of GPU driver bug workarounds.
	VideoDecoding        []*SystemInfoVideoDecodeAcceleratorCapability `json:"videoDecoding"`           // Supported accelerated video decoding capabilities.
	VideoEncoding        []*SystemInfoVideoEncodeAcceleratorCapability `json:"videoEncoding"`           // Supported accelerated video encoding capabilities.
	ImageDecoding        []*SystemInfoImageDecodeAcceleratorCapability `json:"imageDecoding"`           // Supported accelerated image decoding capabilities.
}

Provides information about the GPU(s) on the system.

type SystemInfoGetFeatureStateParams added in v2.3.0

type SystemInfoGetFeatureStateParams struct {
	//
	FeatureState string `json:"featureState"`
}

type SystemInfoImageDecodeAcceleratorCapability

type SystemInfoImageDecodeAcceleratorCapability struct {
	ImageType     string          `json:"imageType"`     // Image coded, e.g. Jpeg. enum values: jpeg, webp, unknown
	MaxDimensions *SystemInfoSize `json:"maxDimensions"` // Maximum supported dimensions of the image in pixels.
	MinDimensions *SystemInfoSize `json:"minDimensions"` // Minimum supported dimensions of the image in pixels.
	Subsamplings  []string        `json:"subsamplings"`  // Optional array of supported subsampling formats, e.g. 4:2:0, if known. enum values: yuv420, yuv422, yuv444
}

Describes a supported image decoding profile with its associated minimum and maximum resolutions and subsampling.

type SystemInfoProcessInfo

type SystemInfoProcessInfo struct {
	Type    string  `json:"type"`    // Specifies process type.
	Id      int     `json:"id"`      // Specifies process id.
	CpuTime float64 `json:"cpuTime"` // Specifies cumulative CPU usage in seconds across all threads of the process since the process start.
}

Represents process info.

type SystemInfoSize

type SystemInfoSize struct {
	Width  int `json:"width"`  // Width in pixels.
	Height int `json:"height"` // Height in pixels.
}

Describes the width and height dimensions of an entity.

type SystemInfoVideoDecodeAcceleratorCapability

type SystemInfoVideoDecodeAcceleratorCapability struct {
	Profile       string          `json:"profile"`       // Video codec profile that is supported, e.g. VP9 Profile 2.
	MaxResolution *SystemInfoSize `json:"maxResolution"` // Maximum video dimensions in pixels supported for this |profile|.
	MinResolution *SystemInfoSize `json:"minResolution"` // Minimum video dimensions in pixels supported for this |profile|.
}

Describes a supported video decoding profile with its associated minimum and maximum resolutions.

type SystemInfoVideoEncodeAcceleratorCapability

type SystemInfoVideoEncodeAcceleratorCapability struct {
	Profile                 string          `json:"profile"`                 // Video codec profile that is supported, e.g H264 Main.
	MaxResolution           *SystemInfoSize `json:"maxResolution"`           // Maximum video dimensions in pixels supported for this |profile|.
	MaxFramerateNumerator   int             `json:"maxFramerateNumerator"`   // Maximum encoding framerate in frames per second supported for this |profile|, as fraction's numerator and denominator, e.g. 24/1 fps, 24000/1001 fps, etc.
	MaxFramerateDenominator int             `json:"maxFramerateDenominator"` //
}

Describes a supported video encoding profile with its associated maximum resolution and maximum framerate.

type Target

type Target struct {
	// contains filtered or unexported fields
}

func NewTarget

func NewTarget(target gcdmessage.ChromeTargeter) *Target

func (*Target) ActivateTarget

func (c *Target) ActivateTarget(ctx context.Context, targetId string) (*gcdmessage.ChromeResponse, error)

ActivateTarget - Activates (focuses) the target. targetId -

func (*Target) ActivateTargetWithParams

func (c *Target) ActivateTargetWithParams(ctx context.Context, v *TargetActivateTargetParams) (*gcdmessage.ChromeResponse, error)

ActivateTargetWithParams - Activates (focuses) the target.

func (*Target) AttachToBrowserTarget

func (c *Target) AttachToBrowserTarget(ctx context.Context) (string, error)

AttachToBrowserTarget - Attaches to the browser target, only uses flat sessionId mode. Returns - sessionId - Id assigned to the session.

func (*Target) AttachToTarget

func (c *Target) AttachToTarget(ctx context.Context, targetId string, flatten bool) (string, error)

AttachToTarget - Attaches to the target with given id. targetId - flatten - Enables "flat" access to the session via specifying sessionId attribute in the commands. We plan to make this the default, deprecate non-flattened mode, and eventually retire it. See crbug.com/991325. Returns - sessionId - Id assigned to the session.

func (*Target) AttachToTargetWithParams

func (c *Target) AttachToTargetWithParams(ctx context.Context, v *TargetAttachToTargetParams) (string, error)

AttachToTargetWithParams - Attaches to the target with given id. Returns - sessionId - Id assigned to the session.

func (*Target) AutoAttachRelated added in v2.2.4

func (c *Target) AutoAttachRelated(ctx context.Context, targetId string, waitForDebuggerOnStart bool, filter []*TargetFilterEntry) (*gcdmessage.ChromeResponse, error)

AutoAttachRelated - Adds the specified target to the list of targets that will be monitored for any related target creation (such as child frames, child workers and new versions of service worker) and reported through `attachedToTarget`. The specified target is also auto-attached. This cancels the effect of any previous `setAutoAttach` and is also cancelled by subsequent `setAutoAttach`. Only available at the Browser target. targetId - waitForDebuggerOnStart - Whether to pause new targets when attaching to them. Use `Runtime.runIfWaitingForDebugger` to run paused targets. filter - Only targets matching filter will be attached.

func (*Target) AutoAttachRelatedWithParams added in v2.2.4

func (c *Target) AutoAttachRelatedWithParams(ctx context.Context, v *TargetAutoAttachRelatedParams) (*gcdmessage.ChromeResponse, error)

AutoAttachRelatedWithParams - Adds the specified target to the list of targets that will be monitored for any related target creation (such as child frames, child workers and new versions of service worker) and reported through `attachedToTarget`. The specified target is also auto-attached. This cancels the effect of any previous `setAutoAttach` and is also cancelled by subsequent `setAutoAttach`. Only available at the Browser target.

func (*Target) CloseTarget

func (c *Target) CloseTarget(ctx context.Context, targetId string) (bool, error)

CloseTarget - Closes the target. If the target is a page that gets closed too. targetId - Returns - success - Always set to true. If an error occurs, the response indicates protocol error.

func (*Target) CloseTargetWithParams

func (c *Target) CloseTargetWithParams(ctx context.Context, v *TargetCloseTargetParams) (bool, error)

CloseTargetWithParams - Closes the target. If the target is a page that gets closed too. Returns - success - Always set to true. If an error occurs, the response indicates protocol error.

func (*Target) CreateBrowserContext

func (c *Target) CreateBrowserContext(ctx context.Context, disposeOnDetach bool, proxyServer string, proxyBypassList string, originsWithUniversalNetworkAccess []string) (string, error)

CreateBrowserContext - Creates a new empty BrowserContext. Similar to an incognito profile but you can have more than one. disposeOnDetach - If specified, disposes this context when debugging session disconnects. proxyServer - Proxy server, similar to the one passed to --proxy-server proxyBypassList - Proxy bypass list, similar to the one passed to --proxy-bypass-list originsWithUniversalNetworkAccess - An optional list of origins to grant unlimited cross-origin access to. Parts of the URL other than those constituting origin are ignored. Returns - browserContextId - The id of the context created.

func (*Target) CreateBrowserContextWithParams

func (c *Target) CreateBrowserContextWithParams(ctx context.Context, v *TargetCreateBrowserContextParams) (string, error)

CreateBrowserContextWithParams - Creates a new empty BrowserContext. Similar to an incognito profile but you can have more than one. Returns - browserContextId - The id of the context created.

func (*Target) CreateTarget

func (c *Target) CreateTarget(ctx context.Context, url string, width int, height int, browserContextId string, enableBeginFrameControl bool, newWindow bool, background bool, forTab bool) (string, error)

CreateTarget - Creates a new page. url - The initial URL the page will be navigated to. An empty string indicates about:blank. width - Frame width in DIP (headless chrome only). height - Frame height in DIP (headless chrome only). browserContextId - The browser context to create the page in. enableBeginFrameControl - Whether BeginFrames for this target will be controlled via DevTools (headless chrome only, not supported on MacOS yet, false by default). newWindow - Whether to create a new Window or Tab (chrome-only, false by default). background - Whether to create the target in background or foreground (chrome-only, false by default). forTab - Whether to create the target of type "tab". Returns - targetId - The id of the page opened.

func (*Target) CreateTargetWithParams

func (c *Target) CreateTargetWithParams(ctx context.Context, v *TargetCreateTargetParams) (string, error)

CreateTargetWithParams - Creates a new page. Returns - targetId - The id of the page opened.

func (*Target) DetachFromTarget

func (c *Target) DetachFromTarget(ctx context.Context, sessionId string, targetId string) (*gcdmessage.ChromeResponse, error)

DetachFromTarget - Detaches session with given id. sessionId - Session to detach. targetId - Deprecated.

func (*Target) DetachFromTargetWithParams

func (c *Target) DetachFromTargetWithParams(ctx context.Context, v *TargetDetachFromTargetParams) (*gcdmessage.ChromeResponse, error)

DetachFromTargetWithParams - Detaches session with given id.

func (*Target) DisposeBrowserContext

func (c *Target) DisposeBrowserContext(ctx context.Context, browserContextId string) (*gcdmessage.ChromeResponse, error)

DisposeBrowserContext - Deletes a BrowserContext. All the belonging pages will be closed without calling their beforeunload hooks. browserContextId -

func (*Target) DisposeBrowserContextWithParams

func (c *Target) DisposeBrowserContextWithParams(ctx context.Context, v *TargetDisposeBrowserContextParams) (*gcdmessage.ChromeResponse, error)

DisposeBrowserContextWithParams - Deletes a BrowserContext. All the belonging pages will be closed without calling their beforeunload hooks.

func (*Target) ExposeDevToolsProtocol

func (c *Target) ExposeDevToolsProtocol(ctx context.Context, targetId string, bindingName string) (*gcdmessage.ChromeResponse, error)

ExposeDevToolsProtocol - Inject object to the target's main frame that provides a communication channel with browser target. Injected object will be available as `window[bindingName]`. The object has the follwing API: - `binding.send(json)` - a method to send messages over the remote debugging protocol - `binding.onmessage = json => handleMessage(json)` - a callback that will be called for the protocol notifications and command responses. targetId - bindingName - Binding name, 'cdp' if not specified.

func (*Target) ExposeDevToolsProtocolWithParams

func (c *Target) ExposeDevToolsProtocolWithParams(ctx context.Context, v *TargetExposeDevToolsProtocolParams) (*gcdmessage.ChromeResponse, error)

ExposeDevToolsProtocolWithParams - Inject object to the target's main frame that provides a communication channel with browser target. Injected object will be available as `window[bindingName]`. The object has the follwing API: - `binding.send(json)` - a method to send messages over the remote debugging protocol - `binding.onmessage = json => handleMessage(json)` - a callback that will be called for the protocol notifications and command responses.

func (*Target) GetBrowserContexts

func (c *Target) GetBrowserContexts(ctx context.Context) ([]string, error)

GetBrowserContexts - Returns all browser contexts created with `Target.createBrowserContext` method. Returns - browserContextIds - An array of browser context ids.

func (*Target) GetTargetInfo

func (c *Target) GetTargetInfo(ctx context.Context, targetId string) (*TargetTargetInfo, error)

GetTargetInfo - Returns information about a target. targetId - Returns - targetInfo -

func (*Target) GetTargetInfoWithParams

func (c *Target) GetTargetInfoWithParams(ctx context.Context, v *TargetGetTargetInfoParams) (*TargetTargetInfo, error)

GetTargetInfoWithParams - Returns information about a target. Returns - targetInfo -

func (*Target) GetTargets

func (c *Target) GetTargets(ctx context.Context, filter []*TargetFilterEntry) ([]*TargetTargetInfo, error)

GetTargets - Retrieves a list of available targets. filter - Only targets matching filter will be reported. If filter is not specified and target discovery is currently enabled, a filter used for target discovery is used for consistency. Returns - targetInfos - The list of targets.

func (*Target) GetTargetsWithParams added in v2.2.6

func (c *Target) GetTargetsWithParams(ctx context.Context, v *TargetGetTargetsParams) ([]*TargetTargetInfo, error)

GetTargetsWithParams - Retrieves a list of available targets. Returns - targetInfos - The list of targets.

func (*Target) SendMessageToTarget

func (c *Target) SendMessageToTarget(ctx context.Context, message string, sessionId string, targetId string) (*gcdmessage.ChromeResponse, error)

SendMessageToTarget - Sends protocol message over session with given id. Consider using flat mode instead; see commands attachToTarget, setAutoAttach, and crbug.com/991325. message - sessionId - Identifier of the session. targetId - Deprecated.

func (*Target) SendMessageToTargetWithParams

func (c *Target) SendMessageToTargetWithParams(ctx context.Context, v *TargetSendMessageToTargetParams) (*gcdmessage.ChromeResponse, error)

SendMessageToTargetWithParams - Sends protocol message over session with given id. Consider using flat mode instead; see commands attachToTarget, setAutoAttach, and crbug.com/991325.

func (*Target) SetAutoAttach

func (c *Target) SetAutoAttach(ctx context.Context, autoAttach bool, waitForDebuggerOnStart bool, flatten bool, filter []*TargetFilterEntry) (*gcdmessage.ChromeResponse, error)

SetAutoAttach - Controls whether to automatically attach to new targets which are considered to be related to this one. When turned on, attaches to all existing related targets as well. When turned off, automatically detaches from all currently attached targets. This also clears all targets added by `autoAttachRelated` from the list of targets to watch for creation of related targets. autoAttach - Whether to auto-attach to related targets. waitForDebuggerOnStart - Whether to pause new targets when attaching to them. Use `Runtime.runIfWaitingForDebugger` to run paused targets. flatten - Enables "flat" access to the session via specifying sessionId attribute in the commands. We plan to make this the default, deprecate non-flattened mode, and eventually retire it. See crbug.com/991325. filter - Only targets matching filter will be attached.

func (*Target) SetAutoAttachWithParams

func (c *Target) SetAutoAttachWithParams(ctx context.Context, v *TargetSetAutoAttachParams) (*gcdmessage.ChromeResponse, error)

SetAutoAttachWithParams - Controls whether to automatically attach to new targets which are considered to be related to this one. When turned on, attaches to all existing related targets as well. When turned off, automatically detaches from all currently attached targets. This also clears all targets added by `autoAttachRelated` from the list of targets to watch for creation of related targets.

func (*Target) SetDiscoverTargets

func (c *Target) SetDiscoverTargets(ctx context.Context, discover bool, filter []*TargetFilterEntry) (*gcdmessage.ChromeResponse, error)

SetDiscoverTargets - Controls whether to discover available targets and notify via `targetCreated/targetInfoChanged/targetDestroyed` events. discover - Whether to discover available targets. filter - Only targets matching filter will be attached. If `discover` is false, `filter` must be omitted or empty.

func (*Target) SetDiscoverTargetsWithParams

func (c *Target) SetDiscoverTargetsWithParams(ctx context.Context, v *TargetSetDiscoverTargetsParams) (*gcdmessage.ChromeResponse, error)

SetDiscoverTargetsWithParams - Controls whether to discover available targets and notify via `targetCreated/targetInfoChanged/targetDestroyed` events.

func (*Target) SetRemoteLocations

func (c *Target) SetRemoteLocations(ctx context.Context, locations []*TargetRemoteLocation) (*gcdmessage.ChromeResponse, error)

SetRemoteLocations - Enables target discovery for the specified locations, when `setDiscoverTargets` was set to `true`. locations - List of remote locations.

func (*Target) SetRemoteLocationsWithParams

func (c *Target) SetRemoteLocationsWithParams(ctx context.Context, v *TargetSetRemoteLocationsParams) (*gcdmessage.ChromeResponse, error)

SetRemoteLocationsWithParams - Enables target discovery for the specified locations, when `setDiscoverTargets` was set to `true`.

type TargetActivateTargetParams

type TargetActivateTargetParams struct {
	//
	TargetId string `json:"targetId"`
}

type TargetAttachToTargetParams

type TargetAttachToTargetParams struct {
	//
	TargetId string `json:"targetId"`
	// Enables "flat" access to the session via specifying sessionId attribute in the commands. We plan to make this the default, deprecate non-flattened mode, and eventually retire it. See crbug.com/991325.
	Flatten bool `json:"flatten,omitempty"`
}

type TargetAttachedToTargetEvent

type TargetAttachedToTargetEvent struct {
	Method string `json:"method"`
	Params struct {
		SessionId          string            `json:"sessionId"`          // Identifier assigned to the session used to send/receive messages.
		TargetInfo         *TargetTargetInfo `json:"targetInfo"`         //
		WaitingForDebugger bool              `json:"waitingForDebugger"` //
	} `json:"Params,omitempty"`
}

Issued when attached to target because of auto-attach or `attachToTarget` command.

type TargetAutoAttachRelatedParams added in v2.2.4

type TargetAutoAttachRelatedParams struct {
	//
	TargetId string `json:"targetId"`
	// Whether to pause new targets when attaching to them. Use `Runtime.runIfWaitingForDebugger` to run paused targets.
	WaitForDebuggerOnStart bool `json:"waitForDebuggerOnStart"`
	// Only targets matching filter will be attached.
	Filter []*TargetFilterEntry `json:"filter,omitempty"`
}

type TargetCloseTargetParams

type TargetCloseTargetParams struct {
	//
	TargetId string `json:"targetId"`
}

type TargetCreateBrowserContextParams

type TargetCreateBrowserContextParams struct {
	// If specified, disposes this context when debugging session disconnects.
	DisposeOnDetach bool `json:"disposeOnDetach,omitempty"`
	// Proxy server, similar to the one passed to --proxy-server
	ProxyServer string `json:"proxyServer,omitempty"`
	// Proxy bypass list, similar to the one passed to --proxy-bypass-list
	ProxyBypassList string `json:"proxyBypassList,omitempty"`
	// An optional list of origins to grant unlimited cross-origin access to. Parts of the URL other than those constituting origin are ignored.
	OriginsWithUniversalNetworkAccess []string `json:"originsWithUniversalNetworkAccess,omitempty"`
}

type TargetCreateTargetParams

type TargetCreateTargetParams struct {
	// The initial URL the page will be navigated to. An empty string indicates about:blank.
	Url string `json:"url"`
	// Frame width in DIP (headless chrome only).
	Width int `json:"width,omitempty"`
	// Frame height in DIP (headless chrome only).
	Height int `json:"height,omitempty"`
	// The browser context to create the page in.
	BrowserContextId string `json:"browserContextId,omitempty"`
	// Whether BeginFrames for this target will be controlled via DevTools (headless chrome only, not supported on MacOS yet, false by default).
	EnableBeginFrameControl bool `json:"enableBeginFrameControl,omitempty"`
	// Whether to create a new Window or Tab (chrome-only, false by default).
	NewWindow bool `json:"newWindow,omitempty"`
	// Whether to create the target in background or foreground (chrome-only, false by default).
	Background bool `json:"background,omitempty"`
	// Whether to create the target of type "tab".
	ForTab bool `json:"forTab,omitempty"`
}

type TargetDetachFromTargetParams

type TargetDetachFromTargetParams struct {
	// Session to detach.
	SessionId string `json:"sessionId,omitempty"`
	// Deprecated.
	TargetId string `json:"targetId,omitempty"`
}

type TargetDetachedFromTargetEvent

type TargetDetachedFromTargetEvent struct {
	Method string `json:"method"`
	Params struct {
		SessionId string `json:"sessionId"`          // Detached session identifier.
		TargetId  string `json:"targetId,omitempty"` // Deprecated.
	} `json:"Params,omitempty"`
}

Issued when detached from target for any reason (including `detachFromTarget` command). Can be issued multiple times per target if multiple sessions have been attached to it.

type TargetDisposeBrowserContextParams

type TargetDisposeBrowserContextParams struct {
	//
	BrowserContextId string `json:"browserContextId"`
}

type TargetExposeDevToolsProtocolParams

type TargetExposeDevToolsProtocolParams struct {
	//
	TargetId string `json:"targetId"`
	// Binding name, 'cdp' if not specified.
	BindingName string `json:"bindingName,omitempty"`
}

type TargetFilterEntry added in v2.2.6

type TargetFilterEntry struct {
	Exclude bool   `json:"exclude,omitempty"` // If set, causes exclusion of mathcing targets from the list.
	Type    string `json:"type,omitempty"`    // If not present, matches any type.
}

A filter used by target query/discovery/auto-attach operations.

type TargetGetTargetInfoParams

type TargetGetTargetInfoParams struct {
	//
	TargetId string `json:"targetId,omitempty"`
}

type TargetGetTargetsParams added in v2.2.6

type TargetGetTargetsParams struct {
	// Only targets matching filter will be reported. If filter is not specified and target discovery is currently enabled, a filter used for target discovery is used for consistency.
	Filter []*TargetFilterEntry `json:"filter,omitempty"`
}

type TargetReceivedMessageFromTargetEvent

type TargetReceivedMessageFromTargetEvent struct {
	Method string `json:"method"`
	Params struct {
		SessionId string `json:"sessionId"`          // Identifier of a session which sends a message.
		Message   string `json:"message"`            //
		TargetId  string `json:"targetId,omitempty"` // Deprecated.
	} `json:"Params,omitempty"`
}

Notifies about a new protocol message received from the session (as reported in `attachedToTarget` event).

type TargetRemoteLocation

type TargetRemoteLocation struct {
	Host string `json:"host"` //
	Port int    `json:"port"` //
}

No Description.

type TargetSendMessageToTargetParams

type TargetSendMessageToTargetParams struct {
	//
	Message string `json:"message"`
	// Identifier of the session.
	SessionId string `json:"sessionId,omitempty"`
	// Deprecated.
	TargetId string `json:"targetId,omitempty"`
}

type TargetSetAutoAttachParams

type TargetSetAutoAttachParams struct {
	// Whether to auto-attach to related targets.
	AutoAttach bool `json:"autoAttach"`
	// Whether to pause new targets when attaching to them. Use `Runtime.runIfWaitingForDebugger` to run paused targets.
	WaitForDebuggerOnStart bool `json:"waitForDebuggerOnStart"`
	// Enables "flat" access to the session via specifying sessionId attribute in the commands. We plan to make this the default, deprecate non-flattened mode, and eventually retire it. See crbug.com/991325.
	Flatten bool `json:"flatten,omitempty"`
	// Only targets matching filter will be attached.
	Filter []*TargetFilterEntry `json:"filter,omitempty"`
}

type TargetSetDiscoverTargetsParams

type TargetSetDiscoverTargetsParams struct {
	// Whether to discover available targets.
	Discover bool `json:"discover"`
	// Only targets matching filter will be attached. If `discover` is false, `filter` must be omitted or empty.
	Filter []*TargetFilterEntry `json:"filter,omitempty"`
}

type TargetSetRemoteLocationsParams

type TargetSetRemoteLocationsParams struct {
	// List of remote locations.
	Locations []*TargetRemoteLocation `json:"locations"`
}

type TargetTargetCrashedEvent

type TargetTargetCrashedEvent struct {
	Method string `json:"method"`
	Params struct {
		TargetId  string `json:"targetId"`  //
		Status    string `json:"status"`    // Termination status type.
		ErrorCode int    `json:"errorCode"` // Termination error code.
	} `json:"Params,omitempty"`
}

Issued when a target has crashed.

type TargetTargetCreatedEvent

type TargetTargetCreatedEvent struct {
	Method string `json:"method"`
	Params struct {
		TargetInfo *TargetTargetInfo `json:"targetInfo"` //
	} `json:"Params,omitempty"`
}

Issued when a possible inspection target is created.

type TargetTargetDestroyedEvent

type TargetTargetDestroyedEvent struct {
	Method string `json:"method"`
	Params struct {
		TargetId string `json:"targetId"` //
	} `json:"Params,omitempty"`
}

Issued when a target is destroyed.

type TargetTargetInfo

type TargetTargetInfo struct {
	TargetId         string `json:"targetId"`                   //
	Type             string `json:"type"`                       //
	Title            string `json:"title"`                      //
	Url              string `json:"url"`                        //
	Attached         bool   `json:"attached"`                   // Whether the target has an attached client.
	OpenerId         string `json:"openerId,omitempty"`         // Opener target Id
	CanAccessOpener  bool   `json:"canAccessOpener"`            // Whether the target has access to the originating window.
	OpenerFrameId    string `json:"openerFrameId,omitempty"`    // Frame id of originating window (is only set if target has an opener).
	BrowserContextId string `json:"browserContextId,omitempty"` //
	Subtype          string `json:"subtype,omitempty"`          // Provides additional details for specific target types. For example, for the type of "page", this may be set to "portal" or "prerender".
}

No Description.

type TargetTargetInfoChangedEvent

type TargetTargetInfoChangedEvent struct {
	Method string `json:"method"`
	Params struct {
		TargetInfo *TargetTargetInfo `json:"targetInfo"` //
	} `json:"Params,omitempty"`
}

Issued when some information about a target has changed. This only happens between `targetCreated` and `targetDestroyed`.

type Tethering

type Tethering struct {
	// contains filtered or unexported fields
}

func NewTethering

func NewTethering(target gcdmessage.ChromeTargeter) *Tethering

func (*Tethering) Bind

func (c *Tethering) Bind(ctx context.Context, port int) (*gcdmessage.ChromeResponse, error)

Bind - Request browser port binding. port - Port number to bind.

func (*Tethering) BindWithParams

BindWithParams - Request browser port binding.

func (*Tethering) Unbind

func (c *Tethering) Unbind(ctx context.Context, port int) (*gcdmessage.ChromeResponse, error)

Unbind - Request browser port unbinding. port - Port number to unbind.

func (*Tethering) UnbindWithParams

UnbindWithParams - Request browser port unbinding.

type TetheringAcceptedEvent

type TetheringAcceptedEvent struct {
	Method string `json:"method"`
	Params struct {
		Port         int    `json:"port"`         // Port number that was successfully bound.
		ConnectionId string `json:"connectionId"` // Connection id to be used.
	} `json:"Params,omitempty"`
}

Informs that port was successfully bound and got a specified connection id.

type TetheringBindParams

type TetheringBindParams struct {
	// Port number to bind.
	Port int `json:"port"`
}

type TetheringUnbindParams

type TetheringUnbindParams struct {
	// Port number to unbind.
	Port int `json:"port"`
}

type Tracing

type Tracing struct {
	// contains filtered or unexported fields
}

func NewTracing

func NewTracing(target gcdmessage.ChromeTargeter) *Tracing

func (*Tracing) End

Stop trace events collection.

func (*Tracing) GetCategories

func (c *Tracing) GetCategories(ctx context.Context) ([]string, error)

GetCategories - Gets supported tracing categories. Returns - categories - A list of supported tracing categories.

func (*Tracing) RecordClockSyncMarker

func (c *Tracing) RecordClockSyncMarker(ctx context.Context, syncId string) (*gcdmessage.ChromeResponse, error)

RecordClockSyncMarker - Record a clock sync marker in the trace. syncId - The ID of this clock sync marker

func (*Tracing) RecordClockSyncMarkerWithParams

func (c *Tracing) RecordClockSyncMarkerWithParams(ctx context.Context, v *TracingRecordClockSyncMarkerParams) (*gcdmessage.ChromeResponse, error)

RecordClockSyncMarkerWithParams - Record a clock sync marker in the trace.

func (*Tracing) RequestMemoryDump

func (c *Tracing) RequestMemoryDump(ctx context.Context, deterministic bool, levelOfDetail string) (string, bool, error)

RequestMemoryDump - Request a global memory dump. deterministic - Enables more deterministic results by forcing garbage collection levelOfDetail - Specifies level of details in memory dump. Defaults to "detailed". enum values: background, light, detailed Returns - dumpGuid - GUID of the resulting global memory dump. success - True iff the global memory dump succeeded.

func (*Tracing) RequestMemoryDumpWithParams

func (c *Tracing) RequestMemoryDumpWithParams(ctx context.Context, v *TracingRequestMemoryDumpParams) (string, bool, error)

RequestMemoryDumpWithParams - Request a global memory dump. Returns - dumpGuid - GUID of the resulting global memory dump. success - True iff the global memory dump succeeded.

func (*Tracing) Start

func (c *Tracing) Start(ctx context.Context, categories string, options string, bufferUsageReportingInterval float64, transferMode string, streamFormat string, streamCompression string, traceConfig *TracingTraceConfig, perfettoConfig string, tracingBackend string) (*gcdmessage.ChromeResponse, error)

Start - Start trace events collection. categories - Category/tag filter options - Tracing options bufferUsageReportingInterval - If set, the agent will issue bufferUsage events at this interval, specified in milliseconds transferMode - Whether to report trace events as series of dataCollected events or to save trace to a stream (defaults to `ReportEvents`). streamFormat - Trace data format to use. This only applies when using `ReturnAsStream` transfer mode (defaults to `json`). enum values: json, proto streamCompression - Compression format to use. This only applies when using `ReturnAsStream` transfer mode (defaults to `none`) enum values: none, gzip traceConfig - perfettoConfig - Base64-encoded serialized perfetto.protos.TraceConfig protobuf message When specified, the parameters `categories`, `options`, `traceConfig` are ignored. (Encoded as a base64 string when passed over JSON) tracingBackend - Backend type (defaults to `auto`) enum values: auto, chrome, system

func (*Tracing) StartWithParams

func (c *Tracing) StartWithParams(ctx context.Context, v *TracingStartParams) (*gcdmessage.ChromeResponse, error)

StartWithParams - Start trace events collection.

type TracingBufferUsageEvent

type TracingBufferUsageEvent struct {
	Method string `json:"method"`
	Params struct {
		PercentFull float64 `json:"percentFull,omitempty"` // A number in range [0..1] that indicates the used size of event buffer as a fraction of its total size.
		EventCount  float64 `json:"eventCount,omitempty"`  // An approximate number of events in the trace log.
		Value       float64 `json:"value,omitempty"`       // A number in range [0..1] that indicates the used size of event buffer as a fraction of its total size.
	} `json:"Params,omitempty"`
}

type TracingRecordClockSyncMarkerParams

type TracingRecordClockSyncMarkerParams struct {
	// The ID of this clock sync marker
	SyncId string `json:"syncId"`
}

type TracingRequestMemoryDumpParams

type TracingRequestMemoryDumpParams struct {
	// Enables more deterministic results by forcing garbage collection
	Deterministic bool `json:"deterministic,omitempty"`
	// Specifies level of details in memory dump. Defaults to "detailed". enum values: background, light, detailed
	LevelOfDetail string `json:"levelOfDetail,omitempty"`
}

type TracingStartParams

type TracingStartParams struct {
	// Category/tag filter
	Categories string `json:"categories,omitempty"`
	// Tracing options
	Options string `json:"options,omitempty"`
	// If set, the agent will issue bufferUsage events at this interval, specified in milliseconds
	BufferUsageReportingInterval float64 `json:"bufferUsageReportingInterval,omitempty"`
	// Whether to report trace events as series of dataCollected events or to save trace to a stream (defaults to `ReportEvents`).
	TransferMode string `json:"transferMode,omitempty"`
	// Trace data format to use. This only applies when using `ReturnAsStream` transfer mode (defaults to `json`). enum values: json, proto
	StreamFormat string `json:"streamFormat,omitempty"`
	// Compression format to use. This only applies when using `ReturnAsStream` transfer mode (defaults to `none`) enum values: none, gzip
	StreamCompression string `json:"streamCompression,omitempty"`
	//
	TraceConfig *TracingTraceConfig `json:"traceConfig,omitempty"`
	// Base64-encoded serialized perfetto.protos.TraceConfig protobuf message When specified, the parameters `categories`, `options`, `traceConfig` are ignored. (Encoded as a base64 string when passed over JSON)
	PerfettoConfig string `json:"perfettoConfig,omitempty"`
	// Backend type (defaults to `auto`) enum values: auto, chrome, system
	TracingBackend string `json:"tracingBackend,omitempty"`
}

type TracingTraceConfig

type TracingTraceConfig struct {
	RecordMode           string                 `json:"recordMode,omitempty"`           // Controls how the trace buffer stores data.
	TraceBufferSizeInKb  float64                `json:"traceBufferSizeInKb,omitempty"`  // Size of the trace buffer in kilobytes. If not specified or zero is passed, a default value of 200 MB would be used.
	EnableSampling       bool                   `json:"enableSampling,omitempty"`       // Turns on JavaScript stack sampling.
	EnableSystrace       bool                   `json:"enableSystrace,omitempty"`       // Turns on system tracing.
	EnableArgumentFilter bool                   `json:"enableArgumentFilter,omitempty"` // Turns on argument filter.
	IncludedCategories   []string               `json:"includedCategories,omitempty"`   // Included category filters.
	ExcludedCategories   []string               `json:"excludedCategories,omitempty"`   // Excluded category filters.
	SyntheticDelays      []string               `json:"syntheticDelays,omitempty"`      // Configuration to synthesize the delays in tracing.
	MemoryDumpConfig     map[string]interface{} `json:"memoryDumpConfig,omitempty"`     // Configuration for memory dump triggers. Used only when "memory-infra" category is enabled.
}

No Description.

type TracingTracingCompleteEvent

type TracingTracingCompleteEvent struct {
	Method string `json:"method"`
	Params struct {
		DataLossOccurred  bool   `json:"dataLossOccurred"`            // Indicates whether some trace data is known to have been lost, e.g. because the trace ring buffer wrapped around.
		Stream            string `json:"stream,omitempty"`            // A handle of the stream that holds resulting trace data.
		TraceFormat       string `json:"traceFormat,omitempty"`       // Trace data format of returned stream. enum values: json, proto
		StreamCompression string `json:"streamCompression,omitempty"` // Compression format of returned stream. enum values: none, gzip
	} `json:"Params,omitempty"`
}

Signals that tracing is stopped and there is no trace buffers pending flush, all data were delivered via dataCollected events.

type WebAudio

type WebAudio struct {
	// contains filtered or unexported fields
}

func NewWebAudio

func NewWebAudio(target gcdmessage.ChromeTargeter) *WebAudio

func (*WebAudio) Disable

func (c *WebAudio) Disable(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Disables the WebAudio domain.

func (*WebAudio) Enable

Enables the WebAudio domain and starts sending context lifetime events.

func (*WebAudio) GetRealtimeData

func (c *WebAudio) GetRealtimeData(ctx context.Context, contextId string) (*WebAudioContextRealtimeData, error)

GetRealtimeData - Fetch the realtime data from the registered contexts. contextId - Returns - realtimeData -

func (*WebAudio) GetRealtimeDataWithParams

func (c *WebAudio) GetRealtimeDataWithParams(ctx context.Context, v *WebAudioGetRealtimeDataParams) (*WebAudioContextRealtimeData, error)

GetRealtimeDataWithParams - Fetch the realtime data from the registered contexts. Returns - realtimeData -

type WebAudioAudioListener

type WebAudioAudioListener struct {
	ListenerId string `json:"listenerId"` //
	ContextId  string `json:"contextId"`  //
}

Protocol object for AudioListener

type WebAudioAudioListenerCreatedEvent

type WebAudioAudioListenerCreatedEvent struct {
	Method string `json:"method"`
	Params struct {
		Listener *WebAudioAudioListener `json:"listener"` //
	} `json:"Params,omitempty"`
}

Notifies that the construction of an AudioListener has finished.

type WebAudioAudioListenerWillBeDestroyedEvent

type WebAudioAudioListenerWillBeDestroyedEvent struct {
	Method string `json:"method"`
	Params struct {
		ContextId  string `json:"contextId"`  //
		ListenerId string `json:"listenerId"` //
	} `json:"Params,omitempty"`
}

Notifies that a new AudioListener has been created.

type WebAudioAudioNode

type WebAudioAudioNode struct {
	NodeId                string  `json:"nodeId"`                //
	ContextId             string  `json:"contextId"`             //
	NodeType              string  `json:"nodeType"`              //
	NumberOfInputs        float64 `json:"numberOfInputs"`        //
	NumberOfOutputs       float64 `json:"numberOfOutputs"`       //
	ChannelCount          float64 `json:"channelCount"`          //
	ChannelCountMode      string  `json:"channelCountMode"`      //  enum values: clamped-max, explicit, max
	ChannelInterpretation string  `json:"channelInterpretation"` //  enum values: discrete, speakers
}

Protocol object for AudioNode

type WebAudioAudioNodeCreatedEvent

type WebAudioAudioNodeCreatedEvent struct {
	Method string `json:"method"`
	Params struct {
		Node *WebAudioAudioNode `json:"node"` //
	} `json:"Params,omitempty"`
}

Notifies that a new AudioNode has been created.

type WebAudioAudioNodeWillBeDestroyedEvent

type WebAudioAudioNodeWillBeDestroyedEvent struct {
	Method string `json:"method"`
	Params struct {
		ContextId string `json:"contextId"` //
		NodeId    string `json:"nodeId"`    //
	} `json:"Params,omitempty"`
}

Notifies that an existing AudioNode has been destroyed.

type WebAudioAudioParam

type WebAudioAudioParam struct {
	ParamId      string  `json:"paramId"`      //
	NodeId       string  `json:"nodeId"`       //
	ContextId    string  `json:"contextId"`    //
	ParamType    string  `json:"paramType"`    //
	Rate         string  `json:"rate"`         //  enum values: a-rate, k-rate
	DefaultValue float64 `json:"defaultValue"` //
	MinValue     float64 `json:"minValue"`     //
	MaxValue     float64 `json:"maxValue"`     //
}

Protocol object for AudioParam

type WebAudioAudioParamCreatedEvent

type WebAudioAudioParamCreatedEvent struct {
	Method string `json:"method"`
	Params struct {
		Param *WebAudioAudioParam `json:"param"` //
	} `json:"Params,omitempty"`
}

Notifies that a new AudioParam has been created.

type WebAudioAudioParamWillBeDestroyedEvent

type WebAudioAudioParamWillBeDestroyedEvent struct {
	Method string `json:"method"`
	Params struct {
		ContextId string `json:"contextId"` //
		NodeId    string `json:"nodeId"`    //
		ParamId   string `json:"paramId"`   //
	} `json:"Params,omitempty"`
}

Notifies that an existing AudioParam has been destroyed.

type WebAudioBaseAudioContext

type WebAudioBaseAudioContext struct {
	ContextId             string                       `json:"contextId"`              //
	ContextType           string                       `json:"contextType"`            //  enum values: realtime, offline
	ContextState          string                       `json:"contextState"`           //  enum values: suspended, running, closed
	RealtimeData          *WebAudioContextRealtimeData `json:"realtimeData,omitempty"` //
	CallbackBufferSize    float64                      `json:"callbackBufferSize"`     // Platform-dependent callback buffer size.
	MaxOutputChannelCount float64                      `json:"maxOutputChannelCount"`  // Number of output channels supported by audio hardware in use.
	SampleRate            float64                      `json:"sampleRate"`             // Context sample rate.
}

Protocol object for BaseAudioContext

type WebAudioContextChangedEvent

type WebAudioContextChangedEvent struct {
	Method string `json:"method"`
	Params struct {
		Context *WebAudioBaseAudioContext `json:"context"` //
	} `json:"Params,omitempty"`
}

Notifies that existing BaseAudioContext has changed some properties (id stays the same)..

type WebAudioContextCreatedEvent

type WebAudioContextCreatedEvent struct {
	Method string `json:"method"`
	Params struct {
		Context *WebAudioBaseAudioContext `json:"context"` //
	} `json:"Params,omitempty"`
}

Notifies that a new BaseAudioContext has been created.

type WebAudioContextRealtimeData

type WebAudioContextRealtimeData struct {
	CurrentTime              float64 `json:"currentTime"`              // The current context time in second in BaseAudioContext.
	RenderCapacity           float64 `json:"renderCapacity"`           // The time spent on rendering graph divided by render quantum duration, and multiplied by 100. 100 means the audio renderer reached the full capacity and glitch may occur.
	CallbackIntervalMean     float64 `json:"callbackIntervalMean"`     // A running mean of callback interval.
	CallbackIntervalVariance float64 `json:"callbackIntervalVariance"` // A running variance of callback interval.
}

Fields in AudioContext that change in real-time.

type WebAudioContextWillBeDestroyedEvent

type WebAudioContextWillBeDestroyedEvent struct {
	Method string `json:"method"`
	Params struct {
		ContextId string `json:"contextId"` //
	} `json:"Params,omitempty"`
}

Notifies that an existing BaseAudioContext will be destroyed.

type WebAudioGetRealtimeDataParams

type WebAudioGetRealtimeDataParams struct {
	//
	ContextId string `json:"contextId"`
}

type WebAudioNodeParamConnectedEvent

type WebAudioNodeParamConnectedEvent struct {
	Method string `json:"method"`
	Params struct {
		ContextId         string  `json:"contextId"`                   //
		SourceId          string  `json:"sourceId"`                    //
		DestinationId     string  `json:"destinationId"`               //
		SourceOutputIndex float64 `json:"sourceOutputIndex,omitempty"` //
	} `json:"Params,omitempty"`
}

Notifies that an AudioNode is connected to an AudioParam.

type WebAudioNodeParamDisconnectedEvent

type WebAudioNodeParamDisconnectedEvent struct {
	Method string `json:"method"`
	Params struct {
		ContextId         string  `json:"contextId"`                   //
		SourceId          string  `json:"sourceId"`                    //
		DestinationId     string  `json:"destinationId"`               //
		SourceOutputIndex float64 `json:"sourceOutputIndex,omitempty"` //
	} `json:"Params,omitempty"`
}

Notifies that an AudioNode is disconnected to an AudioParam.

type WebAudioNodesConnectedEvent

type WebAudioNodesConnectedEvent struct {
	Method string `json:"method"`
	Params struct {
		ContextId             string  `json:"contextId"`                       //
		SourceId              string  `json:"sourceId"`                        //
		DestinationId         string  `json:"destinationId"`                   //
		SourceOutputIndex     float64 `json:"sourceOutputIndex,omitempty"`     //
		DestinationInputIndex float64 `json:"destinationInputIndex,omitempty"` //
	} `json:"Params,omitempty"`
}

Notifies that two AudioNodes are connected.

type WebAudioNodesDisconnectedEvent

type WebAudioNodesDisconnectedEvent struct {
	Method string `json:"method"`
	Params struct {
		ContextId             string  `json:"contextId"`                       //
		SourceId              string  `json:"sourceId"`                        //
		DestinationId         string  `json:"destinationId"`                   //
		SourceOutputIndex     float64 `json:"sourceOutputIndex,omitempty"`     //
		DestinationInputIndex float64 `json:"destinationInputIndex,omitempty"` //
	} `json:"Params,omitempty"`
}

Notifies that AudioNodes are disconnected. The destination can be null, and it means all the outgoing connections from the source are disconnected.

type WebAuthn

type WebAuthn struct {
	// contains filtered or unexported fields
}

func NewWebAuthn

func NewWebAuthn(target gcdmessage.ChromeTargeter) *WebAuthn

func (*WebAuthn) AddCredential

func (c *WebAuthn) AddCredential(ctx context.Context, authenticatorId string, credential *WebAuthnCredential) (*gcdmessage.ChromeResponse, error)

AddCredential - Adds the credential to the specified authenticator. authenticatorId - credential -

func (*WebAuthn) AddCredentialWithParams

func (c *WebAuthn) AddCredentialWithParams(ctx context.Context, v *WebAuthnAddCredentialParams) (*gcdmessage.ChromeResponse, error)

AddCredentialWithParams - Adds the credential to the specified authenticator.

func (*WebAuthn) AddVirtualAuthenticator

func (c *WebAuthn) AddVirtualAuthenticator(ctx context.Context, options *WebAuthnVirtualAuthenticatorOptions) (string, error)

AddVirtualAuthenticator - Creates and adds a virtual authenticator. options - Returns - authenticatorId -

func (*WebAuthn) AddVirtualAuthenticatorWithParams

func (c *WebAuthn) AddVirtualAuthenticatorWithParams(ctx context.Context, v *WebAuthnAddVirtualAuthenticatorParams) (string, error)

AddVirtualAuthenticatorWithParams - Creates and adds a virtual authenticator. Returns - authenticatorId -

func (*WebAuthn) ClearCredentials

func (c *WebAuthn) ClearCredentials(ctx context.Context, authenticatorId string) (*gcdmessage.ChromeResponse, error)

ClearCredentials - Clears all the credentials from the specified device. authenticatorId -

func (*WebAuthn) ClearCredentialsWithParams

func (c *WebAuthn) ClearCredentialsWithParams(ctx context.Context, v *WebAuthnClearCredentialsParams) (*gcdmessage.ChromeResponse, error)

ClearCredentialsWithParams - Clears all the credentials from the specified device.

func (*WebAuthn) Disable

func (c *WebAuthn) Disable(ctx context.Context) (*gcdmessage.ChromeResponse, error)

Disable the WebAuthn domain.

func (*WebAuthn) Enable

func (c *WebAuthn) Enable(ctx context.Context, enableUI bool) (*gcdmessage.ChromeResponse, error)

Enable - Enable the WebAuthn domain and start intercepting credential storage and retrieval with a virtual authenticator. enableUI - Whether to enable the WebAuthn user interface. Enabling the UI is recommended for debugging and demo purposes, as it is closer to the real experience. Disabling the UI is recommended for automated testing. Supported at the embedder's discretion if UI is available. Defaults to false.

func (*WebAuthn) EnableWithParams added in v2.2.6

func (c *WebAuthn) EnableWithParams(ctx context.Context, v *WebAuthnEnableParams) (*gcdmessage.ChromeResponse, error)

EnableWithParams - Enable the WebAuthn domain and start intercepting credential storage and retrieval with a virtual authenticator.

func (*WebAuthn) GetCredential

func (c *WebAuthn) GetCredential(ctx context.Context, authenticatorId string, credentialId string) (*WebAuthnCredential, error)

GetCredential - Returns a single credential stored in the given virtual authenticator that matches the credential ID. authenticatorId - credentialId - Returns - credential -

func (*WebAuthn) GetCredentialWithParams

func (c *WebAuthn) GetCredentialWithParams(ctx context.Context, v *WebAuthnGetCredentialParams) (*WebAuthnCredential, error)

GetCredentialWithParams - Returns a single credential stored in the given virtual authenticator that matches the credential ID. Returns - credential -

func (*WebAuthn) GetCredentials

func (c *WebAuthn) GetCredentials(ctx context.Context, authenticatorId string) ([]*WebAuthnCredential, error)

GetCredentials - Returns all the credentials stored in the given virtual authenticator. authenticatorId - Returns - credentials -

func (*WebAuthn) GetCredentialsWithParams

func (c *WebAuthn) GetCredentialsWithParams(ctx context.Context, v *WebAuthnGetCredentialsParams) ([]*WebAuthnCredential, error)

GetCredentialsWithParams - Returns all the credentials stored in the given virtual authenticator. Returns - credentials -

func (*WebAuthn) RemoveCredential

func (c *WebAuthn) RemoveCredential(ctx context.Context, authenticatorId string, credentialId string) (*gcdmessage.ChromeResponse, error)

RemoveCredential - Removes a credential from the authenticator. authenticatorId - credentialId -

func (*WebAuthn) RemoveCredentialWithParams

func (c *WebAuthn) RemoveCredentialWithParams(ctx context.Context, v *WebAuthnRemoveCredentialParams) (*gcdmessage.ChromeResponse, error)

RemoveCredentialWithParams - Removes a credential from the authenticator.

func (*WebAuthn) RemoveVirtualAuthenticator

func (c *WebAuthn) RemoveVirtualAuthenticator(ctx context.Context, authenticatorId string) (*gcdmessage.ChromeResponse, error)

RemoveVirtualAuthenticator - Removes the given authenticator. authenticatorId -

func (*WebAuthn) RemoveVirtualAuthenticatorWithParams

func (c *WebAuthn) RemoveVirtualAuthenticatorWithParams(ctx context.Context, v *WebAuthnRemoveVirtualAuthenticatorParams) (*gcdmessage.ChromeResponse, error)

RemoveVirtualAuthenticatorWithParams - Removes the given authenticator.

func (*WebAuthn) SetAutomaticPresenceSimulation

func (c *WebAuthn) SetAutomaticPresenceSimulation(ctx context.Context, authenticatorId string, enabled bool) (*gcdmessage.ChromeResponse, error)

SetAutomaticPresenceSimulation - Sets whether tests of user presence will succeed immediately (if true) or fail to resolve (if false) for an authenticator. The default is true. authenticatorId - enabled -

func (*WebAuthn) SetAutomaticPresenceSimulationWithParams

func (c *WebAuthn) SetAutomaticPresenceSimulationWithParams(ctx context.Context, v *WebAuthnSetAutomaticPresenceSimulationParams) (*gcdmessage.ChromeResponse, error)

SetAutomaticPresenceSimulationWithParams - Sets whether tests of user presence will succeed immediately (if true) or fail to resolve (if false) for an authenticator. The default is true.

func (*WebAuthn) SetResponseOverrideBits added in v2.3.0

func (c *WebAuthn) SetResponseOverrideBits(ctx context.Context, authenticatorId string, isBogusSignature bool, isBadUV bool, isBadUP bool) (*gcdmessage.ChromeResponse, error)

SetResponseOverrideBits - Resets parameters isBogusSignature, isBadUV, isBadUP to false if they are not present. authenticatorId - isBogusSignature - If isBogusSignature is set, overrides the signature in the authenticator response to be zero. Defaults to false. isBadUV - If isBadUV is set, overrides the UV bit in the flags in the authenticator response to be zero. Defaults to false. isBadUP - If isBadUP is set, overrides the UP bit in the flags in the authenticator response to be zero. Defaults to false.

func (*WebAuthn) SetResponseOverrideBitsWithParams added in v2.3.0

func (c *WebAuthn) SetResponseOverrideBitsWithParams(ctx context.Context, v *WebAuthnSetResponseOverrideBitsParams) (*gcdmessage.ChromeResponse, error)

SetResponseOverrideBitsWithParams - Resets parameters isBogusSignature, isBadUV, isBadUP to false if they are not present.

func (*WebAuthn) SetUserVerified

func (c *WebAuthn) SetUserVerified(ctx context.Context, authenticatorId string, isUserVerified bool) (*gcdmessage.ChromeResponse, error)

SetUserVerified - Sets whether User Verification succeeds or fails for an authenticator. The default is true. authenticatorId - isUserVerified -

func (*WebAuthn) SetUserVerifiedWithParams

func (c *WebAuthn) SetUserVerifiedWithParams(ctx context.Context, v *WebAuthnSetUserVerifiedParams) (*gcdmessage.ChromeResponse, error)

SetUserVerifiedWithParams - Sets whether User Verification succeeds or fails for an authenticator. The default is true.

type WebAuthnAddCredentialParams

type WebAuthnAddCredentialParams struct {
	//
	AuthenticatorId string `json:"authenticatorId"`
	//
	Credential *WebAuthnCredential `json:"credential"`
}

type WebAuthnAddVirtualAuthenticatorParams

type WebAuthnAddVirtualAuthenticatorParams struct {
	//
	Options *WebAuthnVirtualAuthenticatorOptions `json:"options"`
}

type WebAuthnClearCredentialsParams

type WebAuthnClearCredentialsParams struct {
	//
	AuthenticatorId string `json:"authenticatorId"`
}

type WebAuthnCredential

type WebAuthnCredential struct {
	CredentialId         string `json:"credentialId"`         //
	IsResidentCredential bool   `json:"isResidentCredential"` //
	RpId                 string `json:"rpId,omitempty"`       // Relying Party ID the credential is scoped to. Must be set when adding a credential.
	PrivateKey           string `json:"privateKey"`           // The ECDSA P-256 private key in PKCS#8 format. (Encoded as a base64 string when passed over JSON)
	UserHandle           string `json:"userHandle,omitempty"` // An opaque byte sequence with a maximum size of 64 bytes mapping the credential to a specific user. (Encoded as a base64 string when passed over JSON)
	SignCount            int    `json:"signCount"`            // Signature counter. This is incremented by one for each successful assertion. See https://w3c.github.io/webauthn/#signature-counter
	LargeBlob            string `json:"largeBlob,omitempty"`  // The large blob associated with the credential. See https://w3c.github.io/webauthn/#sctn-large-blob-extension (Encoded as a base64 string when passed over JSON)
}

No Description.

type WebAuthnCredentialAddedEvent added in v2.3.0

type WebAuthnCredentialAddedEvent struct {
	Method string `json:"method"`
	Params struct {
		AuthenticatorId string              `json:"authenticatorId"` //
		Credential      *WebAuthnCredential `json:"credential"`      //
	} `json:"Params,omitempty"`
}

Triggered when a credential is added to an authenticator.

type WebAuthnCredentialAssertedEvent added in v2.3.0

type WebAuthnCredentialAssertedEvent struct {
	Method string `json:"method"`
	Params struct {
		AuthenticatorId string              `json:"authenticatorId"` //
		Credential      *WebAuthnCredential `json:"credential"`      //
	} `json:"Params,omitempty"`
}

Triggered when a credential is used in a webauthn assertion.

type WebAuthnEnableParams added in v2.2.6

type WebAuthnEnableParams struct {
	// Whether to enable the WebAuthn user interface. Enabling the UI is recommended for debugging and demo purposes, as it is closer to the real experience. Disabling the UI is recommended for automated testing. Supported at the embedder's discretion if UI is available. Defaults to false.
	EnableUI bool `json:"enableUI,omitempty"`
}

type WebAuthnGetCredentialParams

type WebAuthnGetCredentialParams struct {
	//
	AuthenticatorId string `json:"authenticatorId"`
	//
	CredentialId string `json:"credentialId"`
}

type WebAuthnGetCredentialsParams

type WebAuthnGetCredentialsParams struct {
	//
	AuthenticatorId string `json:"authenticatorId"`
}

type WebAuthnRemoveCredentialParams

type WebAuthnRemoveCredentialParams struct {
	//
	AuthenticatorId string `json:"authenticatorId"`
	//
	CredentialId string `json:"credentialId"`
}

type WebAuthnRemoveVirtualAuthenticatorParams

type WebAuthnRemoveVirtualAuthenticatorParams struct {
	//
	AuthenticatorId string `json:"authenticatorId"`
}

type WebAuthnSetAutomaticPresenceSimulationParams

type WebAuthnSetAutomaticPresenceSimulationParams struct {
	//
	AuthenticatorId string `json:"authenticatorId"`
	//
	Enabled bool `json:"enabled"`
}

type WebAuthnSetResponseOverrideBitsParams added in v2.3.0

type WebAuthnSetResponseOverrideBitsParams struct {
	//
	AuthenticatorId string `json:"authenticatorId"`
	// If isBogusSignature is set, overrides the signature in the authenticator response to be zero. Defaults to false.
	IsBogusSignature bool `json:"isBogusSignature,omitempty"`
	// If isBadUV is set, overrides the UV bit in the flags in the authenticator response to be zero. Defaults to false.
	IsBadUV bool `json:"isBadUV,omitempty"`
	// If isBadUP is set, overrides the UP bit in the flags in the authenticator response to be zero. Defaults to false.
	IsBadUP bool `json:"isBadUP,omitempty"`
}

type WebAuthnSetUserVerifiedParams

type WebAuthnSetUserVerifiedParams struct {
	//
	AuthenticatorId string `json:"authenticatorId"`
	//
	IsUserVerified bool `json:"isUserVerified"`
}

type WebAuthnVirtualAuthenticatorOptions

type WebAuthnVirtualAuthenticatorOptions struct {
	Protocol                    string `json:"protocol"`                              //  enum values: u2f, ctap2
	Ctap2Version                string `json:"ctap2Version,omitempty"`                // Defaults to ctap2_0. Ignored if |protocol| == u2f. enum values: ctap2_0, ctap2_1
	Transport                   string `json:"transport"`                             //  enum values: usb, nfc, ble, cable, internal
	HasResidentKey              bool   `json:"hasResidentKey,omitempty"`              // Defaults to false.
	HasUserVerification         bool   `json:"hasUserVerification,omitempty"`         // Defaults to false.
	HasLargeBlob                bool   `json:"hasLargeBlob,omitempty"`                // If set to true, the authenticator will support the largeBlob extension. https://w3c.github.io/webauthn#largeBlob Defaults to false.
	HasCredBlob                 bool   `json:"hasCredBlob,omitempty"`                 // If set to true, the authenticator will support the credBlob extension. https://fidoalliance.org/specs/fido-v2.1-rd-20201208/fido-client-to-authenticator-protocol-v2.1-rd-20201208.html#sctn-credBlob-extension Defaults to false.
	HasMinPinLength             bool   `json:"hasMinPinLength,omitempty"`             // If set to true, the authenticator will support the minPinLength extension. https://fidoalliance.org/specs/fido-v2.1-ps-20210615/fido-client-to-authenticator-protocol-v2.1-ps-20210615.html#sctn-minpinlength-extension Defaults to false.
	HasPrf                      bool   `json:"hasPrf,omitempty"`                      // If set to true, the authenticator will support the prf extension. https://w3c.github.io/webauthn/#prf-extension Defaults to false.
	AutomaticPresenceSimulation bool   `json:"automaticPresenceSimulation,omitempty"` // If set to true, tests of user presence will succeed immediately. Otherwise, they will not be resolved. Defaults to true.
	IsUserVerified              bool   `json:"isUserVerified,omitempty"`              // Sets whether User Verification succeeds or fails for an authenticator. Defaults to false.
}

No Description.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL