mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 21:04:37 +03:00
Upgrade to go 1.19 and update dependencies (#3069)
* Update to go 1.19 * Update dependencies * Update cross-compile script * Add missing targets to cross-compile-all * Update cache action to remove warning
This commit is contained in:
158
vendor/github.com/chromedp/cdproto/accessibility/accessibility.go
generated
vendored
158
vendor/github.com/chromedp/cdproto/accessibility/accessibility.go
generated
vendored
@@ -102,7 +102,8 @@ type GetPartialAXTreeReturns struct {
|
||||
// Do executes Accessibility.getPartialAXTree against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// nodes - The Accessibility.AXNode for this DOM node, if it exists, plus its ancestors, siblings and children, if requested.
|
||||
//
|
||||
// nodes - The Accessibility.AXNode for this DOM node, if it exists, plus its ancestors, siblings and children, if requested.
|
||||
func (p *GetPartialAXTreeParams) Do(ctx context.Context) (nodes []*Node, err error) {
|
||||
// execute
|
||||
var res GetPartialAXTreeReturns
|
||||
@@ -117,7 +118,8 @@ func (p *GetPartialAXTreeParams) Do(ctx context.Context) (nodes []*Node, err err
|
||||
// GetFullAXTreeParams fetches the entire accessibility tree for the root
|
||||
// Document.
|
||||
type GetFullAXTreeParams struct {
|
||||
MaxDepth int64 `json:"max_depth,omitempty"` // The maximum depth at which descendants of the root node should be retrieved. If omitted, the full tree is returned.
|
||||
Depth int64 `json:"depth,omitempty"` // The maximum depth at which descendants of the root node should be retrieved. If omitted, the full tree is returned.
|
||||
FrameID cdp.FrameID `json:"frameId,omitempty"` // The frame for whose document the AX tree should be retrieved. If omitted, the root frame is used.
|
||||
}
|
||||
|
||||
// GetFullAXTree fetches the entire accessibility tree for the root Document.
|
||||
@@ -129,10 +131,17 @@ func GetFullAXTree() *GetFullAXTreeParams {
|
||||
return &GetFullAXTreeParams{}
|
||||
}
|
||||
|
||||
// WithMaxDepth the maximum depth at which descendants of the root node
|
||||
// should be retrieved. If omitted, the full tree is returned.
|
||||
func (p GetFullAXTreeParams) WithMaxDepth(maxDepth int64) *GetFullAXTreeParams {
|
||||
p.MaxDepth = maxDepth
|
||||
// WithDepth the maximum depth at which descendants of the root node should
|
||||
// be retrieved. If omitted, the full tree is returned.
|
||||
func (p GetFullAXTreeParams) WithDepth(depth int64) *GetFullAXTreeParams {
|
||||
p.Depth = depth
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithFrameID the frame for whose document the AX tree should be retrieved.
|
||||
// If omitted, the root frame is used.
|
||||
func (p GetFullAXTreeParams) WithFrameID(frameID cdp.FrameID) *GetFullAXTreeParams {
|
||||
p.FrameID = frameID
|
||||
return &p
|
||||
}
|
||||
|
||||
@@ -144,7 +153,8 @@ type GetFullAXTreeReturns struct {
|
||||
// Do executes Accessibility.getFullAXTree against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// nodes
|
||||
//
|
||||
// nodes
|
||||
func (p *GetFullAXTreeParams) Do(ctx context.Context) (nodes []*Node, err error) {
|
||||
// execute
|
||||
var res GetFullAXTreeReturns
|
||||
@@ -156,10 +166,112 @@ func (p *GetFullAXTreeParams) Do(ctx context.Context) (nodes []*Node, err error)
|
||||
return res.Nodes, nil
|
||||
}
|
||||
|
||||
// GetRootAXNodeParams fetches the root node. Requires enable() to have been
|
||||
// called previously.
|
||||
type GetRootAXNodeParams struct {
|
||||
FrameID cdp.FrameID `json:"frameId,omitempty"` // The frame in whose document the node resides. If omitted, the root frame is used.
|
||||
}
|
||||
|
||||
// GetRootAXNode fetches the root node. Requires enable() to have been called
|
||||
// previously.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#method-getRootAXNode
|
||||
//
|
||||
// parameters:
|
||||
func GetRootAXNode() *GetRootAXNodeParams {
|
||||
return &GetRootAXNodeParams{}
|
||||
}
|
||||
|
||||
// WithFrameID the frame in whose document the node resides. If omitted, the
|
||||
// root frame is used.
|
||||
func (p GetRootAXNodeParams) WithFrameID(frameID cdp.FrameID) *GetRootAXNodeParams {
|
||||
p.FrameID = frameID
|
||||
return &p
|
||||
}
|
||||
|
||||
// GetRootAXNodeReturns return values.
|
||||
type GetRootAXNodeReturns struct {
|
||||
Node *Node `json:"node,omitempty"`
|
||||
}
|
||||
|
||||
// Do executes Accessibility.getRootAXNode against the provided context.
|
||||
//
|
||||
// returns:
|
||||
//
|
||||
// node
|
||||
func (p *GetRootAXNodeParams) Do(ctx context.Context) (node *Node, err error) {
|
||||
// execute
|
||||
var res GetRootAXNodeReturns
|
||||
err = cdp.Execute(ctx, CommandGetRootAXNode, p, &res)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return res.Node, nil
|
||||
}
|
||||
|
||||
// GetAXNodeAndAncestorsParams fetches a node and all ancestors up to and
|
||||
// including the root. Requires enable() to have been called previously.
|
||||
type GetAXNodeAndAncestorsParams struct {
|
||||
NodeID cdp.NodeID `json:"nodeId,omitempty"` // Identifier of the node to get.
|
||||
BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty"` // Identifier of the backend node to get.
|
||||
ObjectID runtime.RemoteObjectID `json:"objectId,omitempty"` // JavaScript object id of the node wrapper to get.
|
||||
}
|
||||
|
||||
// GetAXNodeAndAncestors fetches a node and all ancestors up to and including
|
||||
// the root. Requires enable() to have been called previously.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#method-getAXNodeAndAncestors
|
||||
//
|
||||
// parameters:
|
||||
func GetAXNodeAndAncestors() *GetAXNodeAndAncestorsParams {
|
||||
return &GetAXNodeAndAncestorsParams{}
|
||||
}
|
||||
|
||||
// WithNodeID identifier of the node to get.
|
||||
func (p GetAXNodeAndAncestorsParams) WithNodeID(nodeID cdp.NodeID) *GetAXNodeAndAncestorsParams {
|
||||
p.NodeID = nodeID
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithBackendNodeID identifier of the backend node to get.
|
||||
func (p GetAXNodeAndAncestorsParams) WithBackendNodeID(backendNodeID cdp.BackendNodeID) *GetAXNodeAndAncestorsParams {
|
||||
p.BackendNodeID = backendNodeID
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithObjectID JavaScript object id of the node wrapper to get.
|
||||
func (p GetAXNodeAndAncestorsParams) WithObjectID(objectID runtime.RemoteObjectID) *GetAXNodeAndAncestorsParams {
|
||||
p.ObjectID = objectID
|
||||
return &p
|
||||
}
|
||||
|
||||
// GetAXNodeAndAncestorsReturns return values.
|
||||
type GetAXNodeAndAncestorsReturns struct {
|
||||
Nodes []*Node `json:"nodes,omitempty"`
|
||||
}
|
||||
|
||||
// Do executes Accessibility.getAXNodeAndAncestors against the provided context.
|
||||
//
|
||||
// returns:
|
||||
//
|
||||
// nodes
|
||||
func (p *GetAXNodeAndAncestorsParams) Do(ctx context.Context) (nodes []*Node, err error) {
|
||||
// execute
|
||||
var res GetAXNodeAndAncestorsReturns
|
||||
err = cdp.Execute(ctx, CommandGetAXNodeAndAncestors, p, &res)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return res.Nodes, nil
|
||||
}
|
||||
|
||||
// GetChildAXNodesParams fetches a particular accessibility node by AXNodeId.
|
||||
// Requires enable() to have been called previously.
|
||||
type GetChildAXNodesParams struct {
|
||||
ID NodeID `json:"id"`
|
||||
ID NodeID `json:"id"`
|
||||
FrameID cdp.FrameID `json:"frameId,omitempty"` // The frame in whose document the node resides. If omitted, the root frame is used.
|
||||
}
|
||||
|
||||
// GetChildAXNodes fetches a particular accessibility node by AXNodeId.
|
||||
@@ -168,13 +280,21 @@ type GetChildAXNodesParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#method-getChildAXNodes
|
||||
//
|
||||
// parameters:
|
||||
// id
|
||||
//
|
||||
// id
|
||||
func GetChildAXNodes(id NodeID) *GetChildAXNodesParams {
|
||||
return &GetChildAXNodesParams{
|
||||
ID: id,
|
||||
}
|
||||
}
|
||||
|
||||
// WithFrameID the frame in whose document the node resides. If omitted, the
|
||||
// root frame is used.
|
||||
func (p GetChildAXNodesParams) WithFrameID(frameID cdp.FrameID) *GetChildAXNodesParams {
|
||||
p.FrameID = frameID
|
||||
return &p
|
||||
}
|
||||
|
||||
// GetChildAXNodesReturns return values.
|
||||
type GetChildAXNodesReturns struct {
|
||||
Nodes []*Node `json:"nodes,omitempty"`
|
||||
@@ -183,7 +303,8 @@ type GetChildAXNodesReturns struct {
|
||||
// Do executes Accessibility.getChildAXNodes against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// nodes
|
||||
//
|
||||
// nodes
|
||||
func (p *GetChildAXNodesParams) Do(ctx context.Context) (nodes []*Node, err error) {
|
||||
// execute
|
||||
var res GetChildAXNodesReturns
|
||||
@@ -264,7 +385,8 @@ type QueryAXTreeReturns struct {
|
||||
// Do executes Accessibility.queryAXTree against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// nodes - A list of Accessibility.AXNode matching the specified attributes, including nodes that are ignored for accessibility.
|
||||
//
|
||||
// nodes - A list of Accessibility.AXNode matching the specified attributes, including nodes that are ignored for accessibility.
|
||||
func (p *QueryAXTreeParams) Do(ctx context.Context) (nodes []*Node, err error) {
|
||||
// execute
|
||||
var res QueryAXTreeReturns
|
||||
@@ -278,10 +400,12 @@ func (p *QueryAXTreeParams) Do(ctx context.Context) (nodes []*Node, err error) {
|
||||
|
||||
// Command names.
|
||||
const (
|
||||
CommandDisable = "Accessibility.disable"
|
||||
CommandEnable = "Accessibility.enable"
|
||||
CommandGetPartialAXTree = "Accessibility.getPartialAXTree"
|
||||
CommandGetFullAXTree = "Accessibility.getFullAXTree"
|
||||
CommandGetChildAXNodes = "Accessibility.getChildAXNodes"
|
||||
CommandQueryAXTree = "Accessibility.queryAXTree"
|
||||
CommandDisable = "Accessibility.disable"
|
||||
CommandEnable = "Accessibility.enable"
|
||||
CommandGetPartialAXTree = "Accessibility.getPartialAXTree"
|
||||
CommandGetFullAXTree = "Accessibility.getFullAXTree"
|
||||
CommandGetRootAXNode = "Accessibility.getRootAXNode"
|
||||
CommandGetAXNodeAndAncestors = "Accessibility.getAXNodeAndAncestors"
|
||||
CommandGetChildAXNodes = "Accessibility.getChildAXNodes"
|
||||
CommandQueryAXTree = "Accessibility.queryAXTree"
|
||||
)
|
||||
|
||||
700
vendor/github.com/chromedp/cdproto/accessibility/easyjson.go
generated
vendored
700
vendor/github.com/chromedp/cdproto/accessibility/easyjson.go
generated
vendored
File diff suppressed because it is too large
Load Diff
20
vendor/github.com/chromedp/cdproto/accessibility/events.go
generated
vendored
Normal file
20
vendor/github.com/chromedp/cdproto/accessibility/events.go
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
package accessibility
|
||||
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
// EventLoadComplete the loadComplete event mirrors the load complete event
|
||||
// sent by the browser to assistive technology when the web page has finished
|
||||
// loading.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#event-loadComplete
|
||||
type EventLoadComplete struct {
|
||||
Root *Node `json:"root"` // New document root node.
|
||||
}
|
||||
|
||||
// EventNodesUpdated the nodesUpdated event is sent every time a previously
|
||||
// requested node has changed the in tree.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Accessibility#event-nodesUpdated
|
||||
type EventNodesUpdated struct {
|
||||
Nodes []*Node `json:"nodes"` // Updated node data.
|
||||
}
|
||||
30
vendor/github.com/chromedp/cdproto/accessibility/types.go
generated
vendored
30
vendor/github.com/chromedp/cdproto/accessibility/types.go
generated
vendored
@@ -3,7 +3,7 @@ package accessibility
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/chromedp/cdproto/cdp"
|
||||
"github.com/mailru/easyjson"
|
||||
@@ -64,7 +64,8 @@ func (t ValueType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ValueType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ValueType(in.String()) {
|
||||
v := in.String()
|
||||
switch ValueType(v) {
|
||||
case ValueTypeBoolean:
|
||||
*t = ValueTypeBoolean
|
||||
case ValueTypeTristate:
|
||||
@@ -101,7 +102,7 @@ func (t *ValueType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = ValueTypeValueUndefined
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ValueType value"))
|
||||
in.AddError(fmt.Errorf("unknown ValueType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,7 +143,8 @@ func (t ValueSourceType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ValueSourceType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ValueSourceType(in.String()) {
|
||||
v := in.String()
|
||||
switch ValueSourceType(v) {
|
||||
case ValueSourceTypeAttribute:
|
||||
*t = ValueSourceTypeAttribute
|
||||
case ValueSourceTypeImplicit:
|
||||
@@ -157,7 +159,7 @@ func (t *ValueSourceType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = ValueSourceTypeRelatedElement
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ValueSourceType value"))
|
||||
in.AddError(fmt.Errorf("unknown ValueSourceType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -179,6 +181,7 @@ func (t ValueNativeSourceType) String() string {
|
||||
|
||||
// ValueNativeSourceType values.
|
||||
const (
|
||||
ValueNativeSourceTypeDescription ValueNativeSourceType = "description"
|
||||
ValueNativeSourceTypeFigcaption ValueNativeSourceType = "figcaption"
|
||||
ValueNativeSourceTypeLabel ValueNativeSourceType = "label"
|
||||
ValueNativeSourceTypeLabelfor ValueNativeSourceType = "labelfor"
|
||||
@@ -202,7 +205,10 @@ func (t ValueNativeSourceType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ValueNativeSourceType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ValueNativeSourceType(in.String()) {
|
||||
v := in.String()
|
||||
switch ValueNativeSourceType(v) {
|
||||
case ValueNativeSourceTypeDescription:
|
||||
*t = ValueNativeSourceTypeDescription
|
||||
case ValueNativeSourceTypeFigcaption:
|
||||
*t = ValueNativeSourceTypeFigcaption
|
||||
case ValueNativeSourceTypeLabel:
|
||||
@@ -223,7 +229,7 @@ func (t *ValueNativeSourceType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = ValueNativeSourceTypeOther
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ValueNativeSourceType value"))
|
||||
in.AddError(fmt.Errorf("unknown ValueNativeSourceType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -344,7 +350,8 @@ func (t PropertyName) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *PropertyName) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch PropertyName(in.String()) {
|
||||
v := in.String()
|
||||
switch PropertyName(v) {
|
||||
case PropertyNameBusy:
|
||||
*t = PropertyNameBusy
|
||||
case PropertyNameDisabled:
|
||||
@@ -425,7 +432,7 @@ func (t *PropertyName) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = PropertyNameOwns
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown PropertyName value"))
|
||||
in.AddError(fmt.Errorf("unknown PropertyName value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -442,10 +449,13 @@ type Node struct {
|
||||
Ignored bool `json:"ignored"` // Whether this node is ignored for accessibility
|
||||
IgnoredReasons []*Property `json:"ignoredReasons,omitempty"` // Collection of reasons why this node is hidden.
|
||||
Role *Value `json:"role,omitempty"` // This Node's role, whether explicit or implicit.
|
||||
ChromeRole *Value `json:"chromeRole,omitempty"` // This Node's Chrome raw role.
|
||||
Name *Value `json:"name,omitempty"` // The accessible name for this Node.
|
||||
Description *Value `json:"description,omitempty"` // The accessible description for this Node.
|
||||
Value *Value `json:"value,omitempty"` // The value for this Node.
|
||||
Properties []*Property `json:"properties,omitempty"` // All other properties
|
||||
ChildIds []NodeID `json:"childIds,omitempty"` // IDs for each of this node's child nodes.
|
||||
ParentID NodeID `json:"parentId,omitempty"` // ID for this node's parent.
|
||||
ChildIDs []NodeID `json:"childIds,omitempty"` // IDs for each of this node's child nodes.
|
||||
BackendDOMNodeID cdp.BackendNodeID `json:"backendDOMNodeId,omitempty"` // The backend ID for the associated DOM node, if any.
|
||||
FrameID cdp.FrameID `json:"frameId,omitempty"` // The frame ID for the frame associated with this nodes document.
|
||||
}
|
||||
|
||||
38
vendor/github.com/chromedp/cdproto/animation/animation.go
generated
vendored
38
vendor/github.com/chromedp/cdproto/animation/animation.go
generated
vendored
@@ -53,7 +53,8 @@ type GetCurrentTimeParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#method-getCurrentTime
|
||||
//
|
||||
// parameters:
|
||||
// id - Id of animation.
|
||||
//
|
||||
// id - Id of animation.
|
||||
func GetCurrentTime(id string) *GetCurrentTimeParams {
|
||||
return &GetCurrentTimeParams{
|
||||
ID: id,
|
||||
@@ -68,7 +69,8 @@ type GetCurrentTimeReturns struct {
|
||||
// Do executes Animation.getCurrentTime against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// currentTime - Current time of the page.
|
||||
//
|
||||
// currentTime - Current time of the page.
|
||||
func (p *GetCurrentTimeParams) Do(ctx context.Context) (currentTime float64, err error) {
|
||||
// execute
|
||||
var res GetCurrentTimeReturns
|
||||
@@ -98,7 +100,8 @@ type GetPlaybackRateReturns struct {
|
||||
// Do executes Animation.getPlaybackRate against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// playbackRate - Playback rate for animations on page.
|
||||
//
|
||||
// playbackRate - Playback rate for animations on page.
|
||||
func (p *GetPlaybackRateParams) Do(ctx context.Context) (playbackRate float64, err error) {
|
||||
// execute
|
||||
var res GetPlaybackRateReturns
|
||||
@@ -122,7 +125,8 @@ type ReleaseAnimationsParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#method-releaseAnimations
|
||||
//
|
||||
// parameters:
|
||||
// animations - List of animation ids to seek.
|
||||
//
|
||||
// animations - List of animation ids to seek.
|
||||
func ReleaseAnimations(animations []string) *ReleaseAnimationsParams {
|
||||
return &ReleaseAnimationsParams{
|
||||
Animations: animations,
|
||||
@@ -144,7 +148,8 @@ type ResolveAnimationParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#method-resolveAnimation
|
||||
//
|
||||
// parameters:
|
||||
// animationID - Animation id.
|
||||
//
|
||||
// animationID - Animation id.
|
||||
func ResolveAnimation(animationID string) *ResolveAnimationParams {
|
||||
return &ResolveAnimationParams{
|
||||
AnimationID: animationID,
|
||||
@@ -159,7 +164,8 @@ type ResolveAnimationReturns struct {
|
||||
// Do executes Animation.resolveAnimation against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// remoteObject - Corresponding remote object.
|
||||
//
|
||||
// remoteObject - Corresponding remote object.
|
||||
func (p *ResolveAnimationParams) Do(ctx context.Context) (remoteObject *runtime.RemoteObject, err error) {
|
||||
// execute
|
||||
var res ResolveAnimationReturns
|
||||
@@ -184,8 +190,9 @@ type SeekAnimationsParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#method-seekAnimations
|
||||
//
|
||||
// parameters:
|
||||
// animations - List of animation ids to seek.
|
||||
// currentTime - Set the current time of each animation.
|
||||
//
|
||||
// animations - List of animation ids to seek.
|
||||
// currentTime - Set the current time of each animation.
|
||||
func SeekAnimations(animations []string, currentTime float64) *SeekAnimationsParams {
|
||||
return &SeekAnimationsParams{
|
||||
Animations: animations,
|
||||
@@ -209,8 +216,9 @@ type SetPausedParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#method-setPaused
|
||||
//
|
||||
// parameters:
|
||||
// animations - Animations to set the pause state of.
|
||||
// paused - Paused state to set to.
|
||||
//
|
||||
// animations - Animations to set the pause state of.
|
||||
// paused - Paused state to set to.
|
||||
func SetPaused(animations []string, paused bool) *SetPausedParams {
|
||||
return &SetPausedParams{
|
||||
Animations: animations,
|
||||
@@ -233,7 +241,8 @@ type SetPlaybackRateParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#method-setPlaybackRate
|
||||
//
|
||||
// parameters:
|
||||
// playbackRate - Playback rate for animations on page
|
||||
//
|
||||
// playbackRate - Playback rate for animations on page
|
||||
func SetPlaybackRate(playbackRate float64) *SetPlaybackRateParams {
|
||||
return &SetPlaybackRateParams{
|
||||
PlaybackRate: playbackRate,
|
||||
@@ -257,9 +266,10 @@ type SetTimingParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Animation#method-setTiming
|
||||
//
|
||||
// parameters:
|
||||
// animationID - Animation id.
|
||||
// duration - Duration of the animation.
|
||||
// delay - Delay of the animation.
|
||||
//
|
||||
// animationID - Animation id.
|
||||
// duration - Duration of the animation.
|
||||
// delay - Delay of the animation.
|
||||
func SetTiming(animationID string, duration float64, delay float64) *SetTimingParams {
|
||||
return &SetTimingParams{
|
||||
AnimationID: animationID,
|
||||
|
||||
7
vendor/github.com/chromedp/cdproto/animation/types.go
generated
vendored
7
vendor/github.com/chromedp/cdproto/animation/types.go
generated
vendored
@@ -3,7 +3,7 @@ package animation
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/chromedp/cdproto/cdp"
|
||||
"github.com/mailru/easyjson"
|
||||
@@ -88,7 +88,8 @@ func (t Type) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *Type) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch Type(in.String()) {
|
||||
v := in.String()
|
||||
switch Type(v) {
|
||||
case TypeCSSTransition:
|
||||
*t = TypeCSSTransition
|
||||
case TypeCSSAnimation:
|
||||
@@ -97,7 +98,7 @@ func (t *Type) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = TypeWebAnimation
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown Type value"))
|
||||
in.AddError(fmt.Errorf("unknown Type value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
147
vendor/github.com/chromedp/cdproto/applicationcache/applicationcache.go
generated
vendored
147
vendor/github.com/chromedp/cdproto/applicationcache/applicationcache.go
generated
vendored
@@ -1,147 +0,0 @@
|
||||
// Package applicationcache provides the Chrome DevTools Protocol
|
||||
// commands, types, and events for the ApplicationCache domain.
|
||||
//
|
||||
// Generated by the cdproto-gen command.
|
||||
package applicationcache
|
||||
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/chromedp/cdproto/cdp"
|
||||
)
|
||||
|
||||
// EnableParams enables application cache domain notifications.
|
||||
type EnableParams struct{}
|
||||
|
||||
// Enable enables application cache domain notifications.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/ApplicationCache#method-enable
|
||||
func Enable() *EnableParams {
|
||||
return &EnableParams{}
|
||||
}
|
||||
|
||||
// Do executes ApplicationCache.enable against the provided context.
|
||||
func (p *EnableParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandEnable, nil, nil)
|
||||
}
|
||||
|
||||
// GetApplicationCacheForFrameParams returns relevant application cache data
|
||||
// for the document in given frame.
|
||||
type GetApplicationCacheForFrameParams struct {
|
||||
FrameID cdp.FrameID `json:"frameId"` // Identifier of the frame containing document whose application cache is retrieved.
|
||||
}
|
||||
|
||||
// GetApplicationCacheForFrame returns relevant application cache data for
|
||||
// the document in given frame.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/ApplicationCache#method-getApplicationCacheForFrame
|
||||
//
|
||||
// parameters:
|
||||
// frameID - Identifier of the frame containing document whose application cache is retrieved.
|
||||
func GetApplicationCacheForFrame(frameID cdp.FrameID) *GetApplicationCacheForFrameParams {
|
||||
return &GetApplicationCacheForFrameParams{
|
||||
FrameID: frameID,
|
||||
}
|
||||
}
|
||||
|
||||
// GetApplicationCacheForFrameReturns return values.
|
||||
type GetApplicationCacheForFrameReturns struct {
|
||||
ApplicationCache *ApplicationCache `json:"applicationCache,omitempty"` // Relevant application cache data for the document in given frame.
|
||||
}
|
||||
|
||||
// Do executes ApplicationCache.getApplicationCacheForFrame against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// applicationCache - Relevant application cache data for the document in given frame.
|
||||
func (p *GetApplicationCacheForFrameParams) Do(ctx context.Context) (applicationCache *ApplicationCache, err error) {
|
||||
// execute
|
||||
var res GetApplicationCacheForFrameReturns
|
||||
err = cdp.Execute(ctx, CommandGetApplicationCacheForFrame, p, &res)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return res.ApplicationCache, nil
|
||||
}
|
||||
|
||||
// GetFramesWithManifestsParams returns array of frame identifiers with
|
||||
// manifest urls for each frame containing a document associated with some
|
||||
// application cache.
|
||||
type GetFramesWithManifestsParams struct{}
|
||||
|
||||
// GetFramesWithManifests returns array of frame identifiers with manifest
|
||||
// urls for each frame containing a document associated with some application
|
||||
// cache.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/ApplicationCache#method-getFramesWithManifests
|
||||
func GetFramesWithManifests() *GetFramesWithManifestsParams {
|
||||
return &GetFramesWithManifestsParams{}
|
||||
}
|
||||
|
||||
// GetFramesWithManifestsReturns return values.
|
||||
type GetFramesWithManifestsReturns struct {
|
||||
FrameIds []*FrameWithManifest `json:"frameIds,omitempty"` // Array of frame identifiers with manifest urls for each frame containing a document associated with some application cache.
|
||||
}
|
||||
|
||||
// Do executes ApplicationCache.getFramesWithManifests against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// frameIds - Array of frame identifiers with manifest urls for each frame containing a document associated with some application cache.
|
||||
func (p *GetFramesWithManifestsParams) Do(ctx context.Context) (frameIds []*FrameWithManifest, err error) {
|
||||
// execute
|
||||
var res GetFramesWithManifestsReturns
|
||||
err = cdp.Execute(ctx, CommandGetFramesWithManifests, nil, &res)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return res.FrameIds, nil
|
||||
}
|
||||
|
||||
// GetManifestForFrameParams returns manifest URL for document in the given
|
||||
// frame.
|
||||
type GetManifestForFrameParams struct {
|
||||
FrameID cdp.FrameID `json:"frameId"` // Identifier of the frame containing document whose manifest is retrieved.
|
||||
}
|
||||
|
||||
// GetManifestForFrame returns manifest URL for document in the given frame.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/ApplicationCache#method-getManifestForFrame
|
||||
//
|
||||
// parameters:
|
||||
// frameID - Identifier of the frame containing document whose manifest is retrieved.
|
||||
func GetManifestForFrame(frameID cdp.FrameID) *GetManifestForFrameParams {
|
||||
return &GetManifestForFrameParams{
|
||||
FrameID: frameID,
|
||||
}
|
||||
}
|
||||
|
||||
// GetManifestForFrameReturns return values.
|
||||
type GetManifestForFrameReturns struct {
|
||||
ManifestURL string `json:"manifestURL,omitempty"` // Manifest URL for document in the given frame.
|
||||
}
|
||||
|
||||
// Do executes ApplicationCache.getManifestForFrame against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// manifestURL - Manifest URL for document in the given frame.
|
||||
func (p *GetManifestForFrameParams) Do(ctx context.Context) (manifestURL string, err error) {
|
||||
// execute
|
||||
var res GetManifestForFrameReturns
|
||||
err = cdp.Execute(ctx, CommandGetManifestForFrame, p, &res)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return res.ManifestURL, nil
|
||||
}
|
||||
|
||||
// Command names.
|
||||
const (
|
||||
CommandEnable = "ApplicationCache.enable"
|
||||
CommandGetApplicationCacheForFrame = "ApplicationCache.getApplicationCacheForFrame"
|
||||
CommandGetFramesWithManifests = "ApplicationCache.getFramesWithManifests"
|
||||
CommandGetManifestForFrame = "ApplicationCache.getManifestForFrame"
|
||||
)
|
||||
964
vendor/github.com/chromedp/cdproto/applicationcache/easyjson.go
generated
vendored
964
vendor/github.com/chromedp/cdproto/applicationcache/easyjson.go
generated
vendored
@@ -1,964 +0,0 @@
|
||||
// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
|
||||
|
||||
package applicationcache
|
||||
|
||||
import (
|
||||
json "encoding/json"
|
||||
easyjson "github.com/mailru/easyjson"
|
||||
jlexer "github.com/mailru/easyjson/jlexer"
|
||||
jwriter "github.com/mailru/easyjson/jwriter"
|
||||
)
|
||||
|
||||
// suppress unused package warning
|
||||
var (
|
||||
_ *json.RawMessage
|
||||
_ *jlexer.Lexer
|
||||
_ *jwriter.Writer
|
||||
_ easyjson.Marshaler
|
||||
)
|
||||
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache(in *jlexer.Lexer, out *Resource) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case "url":
|
||||
out.URL = string(in.String())
|
||||
case "size":
|
||||
out.Size = int64(in.Int64())
|
||||
case "type":
|
||||
out.Type = string(in.String())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache(out *jwriter.Writer, in Resource) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
const prefix string = ",\"url\":"
|
||||
out.RawString(prefix[1:])
|
||||
out.String(string(in.URL))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"size\":"
|
||||
out.RawString(prefix)
|
||||
out.Int64(int64(in.Size))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"type\":"
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.Type))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v Resource) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v Resource) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *Resource) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *Resource) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache1(in *jlexer.Lexer, out *GetManifestForFrameReturns) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case "manifestURL":
|
||||
out.ManifestURL = string(in.String())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache1(out *jwriter.Writer, in GetManifestForFrameReturns) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.ManifestURL != "" {
|
||||
const prefix string = ",\"manifestURL\":"
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
out.String(string(in.ManifestURL))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v GetManifestForFrameReturns) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache1(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v GetManifestForFrameReturns) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache1(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *GetManifestForFrameReturns) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache1(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *GetManifestForFrameReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache1(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache2(in *jlexer.Lexer, out *GetManifestForFrameParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case "frameId":
|
||||
(out.FrameID).UnmarshalEasyJSON(in)
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache2(out *jwriter.Writer, in GetManifestForFrameParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
const prefix string = ",\"frameId\":"
|
||||
out.RawString(prefix[1:])
|
||||
out.String(string(in.FrameID))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v GetManifestForFrameParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache2(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v GetManifestForFrameParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache2(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *GetManifestForFrameParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache2(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *GetManifestForFrameParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache2(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache3(in *jlexer.Lexer, out *GetFramesWithManifestsReturns) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case "frameIds":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
out.FrameIds = nil
|
||||
} else {
|
||||
in.Delim('[')
|
||||
if out.FrameIds == nil {
|
||||
if !in.IsDelim(']') {
|
||||
out.FrameIds = make([]*FrameWithManifest, 0, 8)
|
||||
} else {
|
||||
out.FrameIds = []*FrameWithManifest{}
|
||||
}
|
||||
} else {
|
||||
out.FrameIds = (out.FrameIds)[:0]
|
||||
}
|
||||
for !in.IsDelim(']') {
|
||||
var v1 *FrameWithManifest
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
v1 = nil
|
||||
} else {
|
||||
if v1 == nil {
|
||||
v1 = new(FrameWithManifest)
|
||||
}
|
||||
(*v1).UnmarshalEasyJSON(in)
|
||||
}
|
||||
out.FrameIds = append(out.FrameIds, v1)
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim(']')
|
||||
}
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache3(out *jwriter.Writer, in GetFramesWithManifestsReturns) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if len(in.FrameIds) != 0 {
|
||||
const prefix string = ",\"frameIds\":"
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
{
|
||||
out.RawByte('[')
|
||||
for v2, v3 := range in.FrameIds {
|
||||
if v2 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v3 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v3).MarshalEasyJSON(out)
|
||||
}
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v GetFramesWithManifestsReturns) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache3(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v GetFramesWithManifestsReturns) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache3(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *GetFramesWithManifestsReturns) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache3(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *GetFramesWithManifestsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache3(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache4(in *jlexer.Lexer, out *GetFramesWithManifestsParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache4(out *jwriter.Writer, in GetFramesWithManifestsParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v GetFramesWithManifestsParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache4(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v GetFramesWithManifestsParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache4(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *GetFramesWithManifestsParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache4(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *GetFramesWithManifestsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache4(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache5(in *jlexer.Lexer, out *GetApplicationCacheForFrameReturns) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case "applicationCache":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
out.ApplicationCache = nil
|
||||
} else {
|
||||
if out.ApplicationCache == nil {
|
||||
out.ApplicationCache = new(ApplicationCache)
|
||||
}
|
||||
(*out.ApplicationCache).UnmarshalEasyJSON(in)
|
||||
}
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache5(out *jwriter.Writer, in GetApplicationCacheForFrameReturns) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if in.ApplicationCache != nil {
|
||||
const prefix string = ",\"applicationCache\":"
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
(*in.ApplicationCache).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v GetApplicationCacheForFrameReturns) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache5(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v GetApplicationCacheForFrameReturns) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache5(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *GetApplicationCacheForFrameReturns) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache5(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *GetApplicationCacheForFrameReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache5(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache6(in *jlexer.Lexer, out *GetApplicationCacheForFrameParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case "frameId":
|
||||
(out.FrameID).UnmarshalEasyJSON(in)
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache6(out *jwriter.Writer, in GetApplicationCacheForFrameParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
const prefix string = ",\"frameId\":"
|
||||
out.RawString(prefix[1:])
|
||||
out.String(string(in.FrameID))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v GetApplicationCacheForFrameParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache6(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v GetApplicationCacheForFrameParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache6(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *GetApplicationCacheForFrameParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache6(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *GetApplicationCacheForFrameParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache6(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache7(in *jlexer.Lexer, out *FrameWithManifest) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case "frameId":
|
||||
(out.FrameID).UnmarshalEasyJSON(in)
|
||||
case "manifestURL":
|
||||
out.ManifestURL = string(in.String())
|
||||
case "status":
|
||||
out.Status = int64(in.Int64())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache7(out *jwriter.Writer, in FrameWithManifest) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
const prefix string = ",\"frameId\":"
|
||||
out.RawString(prefix[1:])
|
||||
out.String(string(in.FrameID))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"manifestURL\":"
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.ManifestURL))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"status\":"
|
||||
out.RawString(prefix)
|
||||
out.Int64(int64(in.Status))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v FrameWithManifest) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache7(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v FrameWithManifest) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache7(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *FrameWithManifest) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache7(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *FrameWithManifest) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache7(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache8(in *jlexer.Lexer, out *EventNetworkStateUpdated) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case "isNowOnline":
|
||||
out.IsNowOnline = bool(in.Bool())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache8(out *jwriter.Writer, in EventNetworkStateUpdated) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
const prefix string = ",\"isNowOnline\":"
|
||||
out.RawString(prefix[1:])
|
||||
out.Bool(bool(in.IsNowOnline))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v EventNetworkStateUpdated) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache8(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v EventNetworkStateUpdated) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache8(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *EventNetworkStateUpdated) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache8(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *EventNetworkStateUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache8(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache9(in *jlexer.Lexer, out *EventApplicationCacheStatusUpdated) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case "frameId":
|
||||
(out.FrameID).UnmarshalEasyJSON(in)
|
||||
case "manifestURL":
|
||||
out.ManifestURL = string(in.String())
|
||||
case "status":
|
||||
out.Status = int64(in.Int64())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache9(out *jwriter.Writer, in EventApplicationCacheStatusUpdated) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
const prefix string = ",\"frameId\":"
|
||||
out.RawString(prefix[1:])
|
||||
out.String(string(in.FrameID))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"manifestURL\":"
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.ManifestURL))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"status\":"
|
||||
out.RawString(prefix)
|
||||
out.Int64(int64(in.Status))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v EventApplicationCacheStatusUpdated) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache9(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v EventApplicationCacheStatusUpdated) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache9(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *EventApplicationCacheStatusUpdated) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache9(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *EventApplicationCacheStatusUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache9(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache10(in *jlexer.Lexer, out *EnableParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache10(out *jwriter.Writer, in EnableParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v EnableParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache10(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache10(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *EnableParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache10(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache10(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache11(in *jlexer.Lexer, out *ApplicationCache) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case "manifestURL":
|
||||
out.ManifestURL = string(in.String())
|
||||
case "size":
|
||||
out.Size = float64(in.Float64())
|
||||
case "creationTime":
|
||||
out.CreationTime = float64(in.Float64())
|
||||
case "updateTime":
|
||||
out.UpdateTime = float64(in.Float64())
|
||||
case "resources":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
out.Resources = nil
|
||||
} else {
|
||||
in.Delim('[')
|
||||
if out.Resources == nil {
|
||||
if !in.IsDelim(']') {
|
||||
out.Resources = make([]*Resource, 0, 8)
|
||||
} else {
|
||||
out.Resources = []*Resource{}
|
||||
}
|
||||
} else {
|
||||
out.Resources = (out.Resources)[:0]
|
||||
}
|
||||
for !in.IsDelim(']') {
|
||||
var v4 *Resource
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
v4 = nil
|
||||
} else {
|
||||
if v4 == nil {
|
||||
v4 = new(Resource)
|
||||
}
|
||||
(*v4).UnmarshalEasyJSON(in)
|
||||
}
|
||||
out.Resources = append(out.Resources, v4)
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim(']')
|
||||
}
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache11(out *jwriter.Writer, in ApplicationCache) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
const prefix string = ",\"manifestURL\":"
|
||||
out.RawString(prefix[1:])
|
||||
out.String(string(in.ManifestURL))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"size\":"
|
||||
out.RawString(prefix)
|
||||
out.Float64(float64(in.Size))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"creationTime\":"
|
||||
out.RawString(prefix)
|
||||
out.Float64(float64(in.CreationTime))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"updateTime\":"
|
||||
out.RawString(prefix)
|
||||
out.Float64(float64(in.UpdateTime))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"resources\":"
|
||||
out.RawString(prefix)
|
||||
if in.Resources == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v5, v6 := range in.Resources {
|
||||
if v5 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v6 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v6).MarshalEasyJSON(out)
|
||||
}
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v ApplicationCache) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache11(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v ApplicationCache) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoApplicationcache11(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *ApplicationCache) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache11(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *ApplicationCache) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoApplicationcache11(l, v)
|
||||
}
|
||||
23
vendor/github.com/chromedp/cdproto/applicationcache/events.go
generated
vendored
23
vendor/github.com/chromedp/cdproto/applicationcache/events.go
generated
vendored
@@ -1,23 +0,0 @@
|
||||
package applicationcache
|
||||
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"github.com/chromedp/cdproto/cdp"
|
||||
)
|
||||
|
||||
// EventApplicationCacheStatusUpdated [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/ApplicationCache#event-applicationCacheStatusUpdated
|
||||
type EventApplicationCacheStatusUpdated struct {
|
||||
FrameID cdp.FrameID `json:"frameId"` // Identifier of the frame containing document whose application cache updated status.
|
||||
ManifestURL string `json:"manifestURL"` // Manifest URL.
|
||||
Status int64 `json:"status"` // Updated application cache status.
|
||||
}
|
||||
|
||||
// EventNetworkStateUpdated [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/ApplicationCache#event-networkStateUpdated
|
||||
type EventNetworkStateUpdated struct {
|
||||
IsNowOnline bool `json:"isNowOnline"`
|
||||
}
|
||||
36
vendor/github.com/chromedp/cdproto/applicationcache/types.go
generated
vendored
36
vendor/github.com/chromedp/cdproto/applicationcache/types.go
generated
vendored
@@ -1,36 +0,0 @@
|
||||
package applicationcache
|
||||
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"github.com/chromedp/cdproto/cdp"
|
||||
)
|
||||
|
||||
// Resource detailed application cache resource information.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/ApplicationCache#type-ApplicationCacheResource
|
||||
type Resource struct {
|
||||
URL string `json:"url"` // Resource url.
|
||||
Size int64 `json:"size"` // Resource size.
|
||||
Type string `json:"type"` // Resource type.
|
||||
}
|
||||
|
||||
// ApplicationCache detailed application cache information.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/ApplicationCache#type-ApplicationCache
|
||||
type ApplicationCache struct {
|
||||
ManifestURL string `json:"manifestURL"` // Manifest URL.
|
||||
Size float64 `json:"size"` // Application cache size.
|
||||
CreationTime float64 `json:"creationTime"` // Application cache creation time.
|
||||
UpdateTime float64 `json:"updateTime"` // Application cache update time.
|
||||
Resources []*Resource `json:"resources"` // Application cache resources.
|
||||
}
|
||||
|
||||
// FrameWithManifest frame identifier - manifest URL pair.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/ApplicationCache#type-FrameWithManifest
|
||||
type FrameWithManifest struct {
|
||||
FrameID cdp.FrameID `json:"frameId"` // Frame identifier.
|
||||
ManifestURL string `json:"manifestURL"` // Manifest URL.
|
||||
Status int64 `json:"status"` // Application cache status.
|
||||
}
|
||||
12
vendor/github.com/chromedp/cdproto/audits/audits.go
generated
vendored
12
vendor/github.com/chromedp/cdproto/audits/audits.go
generated
vendored
@@ -32,8 +32,9 @@ type GetEncodedResponseParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Audits#method-getEncodedResponse
|
||||
//
|
||||
// parameters:
|
||||
// requestID - Identifier of the network request to get content for.
|
||||
// encoding - The encoding to use.
|
||||
//
|
||||
// requestID - Identifier of the network request to get content for.
|
||||
// encoding - The encoding to use.
|
||||
func GetEncodedResponse(requestID network.RequestID, encoding GetEncodedResponseEncoding) *GetEncodedResponseParams {
|
||||
return &GetEncodedResponseParams{
|
||||
RequestID: requestID,
|
||||
@@ -64,9 +65,10 @@ type GetEncodedResponseReturns struct {
|
||||
// Do executes Audits.getEncodedResponse against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// body - The encoded body as a base64 string. Omitted if sizeOnly is true.
|
||||
// originalSize - Size before re-encoding.
|
||||
// encodedSize - Size after re-encoding.
|
||||
//
|
||||
// body - The encoded body as a base64 string. Omitted if sizeOnly is true.
|
||||
// originalSize - Size before re-encoding.
|
||||
// encodedSize - Size after re-encoding.
|
||||
func (p *GetEncodedResponseParams) Do(ctx context.Context) (body []byte, originalSize int64, encodedSize int64, err error) {
|
||||
// execute
|
||||
var res GetEncodedResponseReturns
|
||||
|
||||
1093
vendor/github.com/chromedp/cdproto/audits/easyjson.go
generated
vendored
1093
vendor/github.com/chromedp/cdproto/audits/easyjson.go
generated
vendored
File diff suppressed because it is too large
Load Diff
795
vendor/github.com/chromedp/cdproto/audits/types.go
generated
vendored
795
vendor/github.com/chromedp/cdproto/audits/types.go
generated
vendored
File diff suppressed because it is too large
Load Diff
14
vendor/github.com/chromedp/cdproto/backgroundservice/backgroundservice.go
generated
vendored
14
vendor/github.com/chromedp/cdproto/backgroundservice/backgroundservice.go
generated
vendored
@@ -24,7 +24,8 @@ type StartObservingParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/BackgroundService#method-startObserving
|
||||
//
|
||||
// parameters:
|
||||
// service
|
||||
//
|
||||
// service
|
||||
func StartObserving(service ServiceName) *StartObservingParams {
|
||||
return &StartObservingParams{
|
||||
Service: service,
|
||||
@@ -46,7 +47,8 @@ type StopObservingParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/BackgroundService#method-stopObserving
|
||||
//
|
||||
// parameters:
|
||||
// service
|
||||
//
|
||||
// service
|
||||
func StopObserving(service ServiceName) *StopObservingParams {
|
||||
return &StopObservingParams{
|
||||
Service: service,
|
||||
@@ -69,8 +71,9 @@ type SetRecordingParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/BackgroundService#method-setRecording
|
||||
//
|
||||
// parameters:
|
||||
// shouldRecord
|
||||
// service
|
||||
//
|
||||
// shouldRecord
|
||||
// service
|
||||
func SetRecording(shouldRecord bool, service ServiceName) *SetRecordingParams {
|
||||
return &SetRecordingParams{
|
||||
ShouldRecord: shouldRecord,
|
||||
@@ -93,7 +96,8 @@ type ClearEventsParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/BackgroundService#method-clearEvents
|
||||
//
|
||||
// parameters:
|
||||
// service
|
||||
//
|
||||
// service
|
||||
func ClearEvents(service ServiceName) *ClearEventsParams {
|
||||
return &ClearEventsParams{
|
||||
Service: service,
|
||||
|
||||
7
vendor/github.com/chromedp/cdproto/backgroundservice/types.go
generated
vendored
7
vendor/github.com/chromedp/cdproto/backgroundservice/types.go
generated
vendored
@@ -3,7 +3,7 @@ package backgroundservice
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/chromedp/cdproto/cdp"
|
||||
"github.com/chromedp/cdproto/serviceworker"
|
||||
@@ -46,7 +46,8 @@ func (t ServiceName) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ServiceName) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ServiceName(in.String()) {
|
||||
v := in.String()
|
||||
switch ServiceName(v) {
|
||||
case ServiceNameBackgroundFetch:
|
||||
*t = ServiceNameBackgroundFetch
|
||||
case ServiceNameBackgroundSync:
|
||||
@@ -61,7 +62,7 @@ func (t *ServiceName) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = ServiceNamePeriodicBackgroundSync
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ServiceName value"))
|
||||
in.AddError(fmt.Errorf("unknown ServiceName value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
56
vendor/github.com/chromedp/cdproto/browser/browser.go
generated
vendored
56
vendor/github.com/chromedp/cdproto/browser/browser.go
generated
vendored
@@ -28,8 +28,9 @@ type SetPermissionParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-setPermission
|
||||
//
|
||||
// parameters:
|
||||
// permission - Descriptor of permission to override.
|
||||
// setting - Setting of the permission.
|
||||
//
|
||||
// permission - Descriptor of permission to override.
|
||||
// setting - Setting of the permission.
|
||||
func SetPermission(permission *PermissionDescriptor, setting PermissionSetting) *SetPermissionParams {
|
||||
return &SetPermissionParams{
|
||||
Permission: permission,
|
||||
@@ -69,7 +70,8 @@ type GrantPermissionsParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-grantPermissions
|
||||
//
|
||||
// parameters:
|
||||
// permissions
|
||||
//
|
||||
// permissions
|
||||
func GrantPermissions(permissions []PermissionType) *GrantPermissionsParams {
|
||||
return &GrantPermissionsParams{
|
||||
Permissions: permissions,
|
||||
@@ -133,7 +135,8 @@ type SetDownloadBehaviorParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-setDownloadBehavior
|
||||
//
|
||||
// parameters:
|
||||
// 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.
|
||||
//
|
||||
// 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.
|
||||
func SetDownloadBehavior(behavior SetDownloadBehaviorBehavior) *SetDownloadBehaviorParams {
|
||||
return &SetDownloadBehaviorParams{
|
||||
Behavior: behavior,
|
||||
@@ -176,7 +179,8 @@ type CancelDownloadParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-cancelDownload
|
||||
//
|
||||
// parameters:
|
||||
// guid - Global unique identifier of the download.
|
||||
//
|
||||
// guid - Global unique identifier of the download.
|
||||
func CancelDownload(guid string) *CancelDownloadParams {
|
||||
return &CancelDownloadParams{
|
||||
GUID: guid,
|
||||
@@ -262,11 +266,12 @@ type GetVersionReturns struct {
|
||||
// Do executes Browser.getVersion against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// protocolVersion - Protocol version.
|
||||
// product - Product name.
|
||||
// revision - Product revision.
|
||||
// userAgent - User-Agent.
|
||||
// jsVersion - V8 version.
|
||||
//
|
||||
// protocolVersion - Protocol version.
|
||||
// product - Product name.
|
||||
// revision - Product revision.
|
||||
// userAgent - User-Agent.
|
||||
// jsVersion - V8 version.
|
||||
func (p *GetVersionParams) Do(ctx context.Context) (protocolVersion string, product string, revision string, userAgent string, jsVersion string, err error) {
|
||||
// execute
|
||||
var res GetVersionReturns
|
||||
@@ -298,7 +303,8 @@ type GetBrowserCommandLineReturns struct {
|
||||
// Do executes Browser.getBrowserCommandLine against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// arguments - Commandline parameters
|
||||
//
|
||||
// arguments - Commandline parameters
|
||||
func (p *GetBrowserCommandLineParams) Do(ctx context.Context) (arguments []string, err error) {
|
||||
// execute
|
||||
var res GetBrowserCommandLineReturns
|
||||
@@ -347,7 +353,8 @@ type GetHistogramsReturns struct {
|
||||
// Do executes Browser.getHistograms against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// histograms - Histograms.
|
||||
//
|
||||
// histograms - Histograms.
|
||||
func (p *GetHistogramsParams) Do(ctx context.Context) (histograms []*Histogram, err error) {
|
||||
// execute
|
||||
var res GetHistogramsReturns
|
||||
@@ -370,7 +377,8 @@ type GetHistogramParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-getHistogram
|
||||
//
|
||||
// parameters:
|
||||
// name - Requested histogram name.
|
||||
//
|
||||
// name - Requested histogram name.
|
||||
func GetHistogram(name string) *GetHistogramParams {
|
||||
return &GetHistogramParams{
|
||||
Name: name,
|
||||
@@ -391,7 +399,8 @@ type GetHistogramReturns struct {
|
||||
// Do executes Browser.getHistogram against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// histogram - Histogram.
|
||||
//
|
||||
// histogram - Histogram.
|
||||
func (p *GetHistogramParams) Do(ctx context.Context) (histogram *Histogram, err error) {
|
||||
// execute
|
||||
var res GetHistogramReturns
|
||||
@@ -413,7 +422,8 @@ type GetWindowBoundsParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-getWindowBounds
|
||||
//
|
||||
// parameters:
|
||||
// windowID - Browser window id.
|
||||
//
|
||||
// windowID - Browser window id.
|
||||
func GetWindowBounds(windowID WindowID) *GetWindowBoundsParams {
|
||||
return &GetWindowBoundsParams{
|
||||
WindowID: windowID,
|
||||
@@ -428,7 +438,8 @@ type GetWindowBoundsReturns struct {
|
||||
// Do executes Browser.getWindowBounds against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// bounds - Bounds information of the window. When window state is 'minimized', the restored window position and size are returned.
|
||||
//
|
||||
// bounds - Bounds information of the window. When window state is 'minimized', the restored window position and size are returned.
|
||||
func (p *GetWindowBoundsParams) Do(ctx context.Context) (bounds *Bounds, err error) {
|
||||
// execute
|
||||
var res GetWindowBoundsReturns
|
||||
@@ -472,8 +483,9 @@ type GetWindowForTargetReturns struct {
|
||||
// Do executes Browser.getWindowForTarget against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// windowID - Browser window id.
|
||||
// bounds - Bounds information of the window. When window state is 'minimized', the restored window position and size are returned.
|
||||
//
|
||||
// windowID - Browser window id.
|
||||
// bounds - Bounds information of the window. When window state is 'minimized', the restored window position and size are returned.
|
||||
func (p *GetWindowForTargetParams) Do(ctx context.Context) (windowID WindowID, bounds *Bounds, err error) {
|
||||
// execute
|
||||
var res GetWindowForTargetReturns
|
||||
@@ -496,8 +508,9 @@ type SetWindowBoundsParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-setWindowBounds
|
||||
//
|
||||
// parameters:
|
||||
// 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.
|
||||
//
|
||||
// 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 SetWindowBounds(windowID WindowID, bounds *Bounds) *SetWindowBoundsParams {
|
||||
return &SetWindowBoundsParams{
|
||||
WindowID: windowID,
|
||||
@@ -553,7 +566,8 @@ type ExecuteBrowserCommandParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Browser#method-executeBrowserCommand
|
||||
//
|
||||
// parameters:
|
||||
// commandID
|
||||
//
|
||||
// commandID
|
||||
func ExecuteBrowserCommand(commandID CommandID) *ExecuteBrowserCommandParams {
|
||||
return &ExecuteBrowserCommandParams{
|
||||
CommandID: commandID,
|
||||
|
||||
32
vendor/github.com/chromedp/cdproto/browser/types.go
generated
vendored
32
vendor/github.com/chromedp/cdproto/browser/types.go
generated
vendored
@@ -3,7 +3,7 @@ package browser
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/mailru/easyjson"
|
||||
"github.com/mailru/easyjson/jlexer"
|
||||
@@ -50,7 +50,8 @@ func (t WindowState) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *WindowState) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch WindowState(in.String()) {
|
||||
v := in.String()
|
||||
switch WindowState(v) {
|
||||
case WindowStateNormal:
|
||||
*t = WindowStateNormal
|
||||
case WindowStateMinimized:
|
||||
@@ -61,7 +62,7 @@ func (t *WindowState) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = WindowStateFullscreen
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown WindowState value"))
|
||||
in.AddError(fmt.Errorf("unknown WindowState value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,7 +131,8 @@ func (t PermissionType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *PermissionType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch PermissionType(in.String()) {
|
||||
v := in.String()
|
||||
switch PermissionType(v) {
|
||||
case PermissionTypeAccessibilityEvents:
|
||||
*t = PermissionTypeAccessibilityEvents
|
||||
case PermissionTypeAudioCapture:
|
||||
@@ -179,7 +181,7 @@ func (t *PermissionType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = PermissionTypeWakeLockSystem
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown PermissionType value"))
|
||||
in.AddError(fmt.Errorf("unknown PermissionType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -217,7 +219,8 @@ func (t PermissionSetting) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *PermissionSetting) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch PermissionSetting(in.String()) {
|
||||
v := in.String()
|
||||
switch PermissionSetting(v) {
|
||||
case PermissionSettingGranted:
|
||||
*t = PermissionSettingGranted
|
||||
case PermissionSettingDenied:
|
||||
@@ -226,7 +229,7 @@ func (t *PermissionSetting) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = PermissionSettingPrompt
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown PermissionSetting value"))
|
||||
in.AddError(fmt.Errorf("unknown PermissionSetting value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -276,14 +279,15 @@ func (t CommandID) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *CommandID) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch CommandID(in.String()) {
|
||||
v := in.String()
|
||||
switch CommandID(v) {
|
||||
case CommandIDOpenTabSearch:
|
||||
*t = CommandIDOpenTabSearch
|
||||
case CommandIDCloseTabSearch:
|
||||
*t = CommandIDCloseTabSearch
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown CommandID value"))
|
||||
in.AddError(fmt.Errorf("unknown CommandID value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -340,7 +344,8 @@ func (t DownloadProgressState) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *DownloadProgressState) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch DownloadProgressState(in.String()) {
|
||||
v := in.String()
|
||||
switch DownloadProgressState(v) {
|
||||
case DownloadProgressStateInProgress:
|
||||
*t = DownloadProgressStateInProgress
|
||||
case DownloadProgressStateCompleted:
|
||||
@@ -349,7 +354,7 @@ func (t *DownloadProgressState) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = DownloadProgressStateCanceled
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown DownloadProgressState value"))
|
||||
in.AddError(fmt.Errorf("unknown DownloadProgressState value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -391,7 +396,8 @@ func (t SetDownloadBehaviorBehavior) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *SetDownloadBehaviorBehavior) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch SetDownloadBehaviorBehavior(in.String()) {
|
||||
v := in.String()
|
||||
switch SetDownloadBehaviorBehavior(v) {
|
||||
case SetDownloadBehaviorBehaviorDeny:
|
||||
*t = SetDownloadBehaviorBehaviorDeny
|
||||
case SetDownloadBehaviorBehaviorAllow:
|
||||
@@ -402,7 +408,7 @@ func (t *SetDownloadBehaviorBehavior) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = SetDownloadBehaviorBehaviorDefault
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown SetDownloadBehaviorBehavior value"))
|
||||
in.AddError(fmt.Errorf("unknown SetDownloadBehaviorBehavior value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
32
vendor/github.com/chromedp/cdproto/cachestorage/cachestorage.go
generated
vendored
32
vendor/github.com/chromedp/cdproto/cachestorage/cachestorage.go
generated
vendored
@@ -22,7 +22,8 @@ type DeleteCacheParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CacheStorage#method-deleteCache
|
||||
//
|
||||
// parameters:
|
||||
// cacheID - Id of cache for deletion.
|
||||
//
|
||||
// cacheID - Id of cache for deletion.
|
||||
func DeleteCache(cacheID CacheID) *DeleteCacheParams {
|
||||
return &DeleteCacheParams{
|
||||
CacheID: cacheID,
|
||||
@@ -45,8 +46,9 @@ type DeleteEntryParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CacheStorage#method-deleteEntry
|
||||
//
|
||||
// parameters:
|
||||
// cacheID - Id of cache where the entry will be deleted.
|
||||
// request - URL spec of the request.
|
||||
//
|
||||
// cacheID - Id of cache where the entry will be deleted.
|
||||
// request - URL spec of the request.
|
||||
func DeleteEntry(cacheID CacheID, request string) *DeleteEntryParams {
|
||||
return &DeleteEntryParams{
|
||||
CacheID: cacheID,
|
||||
@@ -69,7 +71,8 @@ type RequestCacheNamesParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CacheStorage#method-requestCacheNames
|
||||
//
|
||||
// parameters:
|
||||
// securityOrigin - Security origin.
|
||||
//
|
||||
// securityOrigin - Security origin.
|
||||
func RequestCacheNames(securityOrigin string) *RequestCacheNamesParams {
|
||||
return &RequestCacheNamesParams{
|
||||
SecurityOrigin: securityOrigin,
|
||||
@@ -84,7 +87,8 @@ type RequestCacheNamesReturns struct {
|
||||
// Do executes CacheStorage.requestCacheNames against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// caches - Caches for the security origin.
|
||||
//
|
||||
// caches - Caches for the security origin.
|
||||
func (p *RequestCacheNamesParams) Do(ctx context.Context) (caches []*Cache, err error) {
|
||||
// execute
|
||||
var res RequestCacheNamesReturns
|
||||
@@ -108,9 +112,10 @@ type RequestCachedResponseParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CacheStorage#method-requestCachedResponse
|
||||
//
|
||||
// parameters:
|
||||
// cacheID - Id of cache that contains the entry.
|
||||
// requestURL - URL spec of the request.
|
||||
// requestHeaders - headers of the request.
|
||||
//
|
||||
// cacheID - Id of cache that contains the entry.
|
||||
// requestURL - URL spec of the request.
|
||||
// requestHeaders - headers of the request.
|
||||
func RequestCachedResponse(cacheID CacheID, requestURL string, requestHeaders []*Header) *RequestCachedResponseParams {
|
||||
return &RequestCachedResponseParams{
|
||||
CacheID: cacheID,
|
||||
@@ -127,7 +132,8 @@ type RequestCachedResponseReturns struct {
|
||||
// Do executes CacheStorage.requestCachedResponse against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// response - Response read from the cache.
|
||||
//
|
||||
// response - Response read from the cache.
|
||||
func (p *RequestCachedResponseParams) Do(ctx context.Context) (response *CachedResponse, err error) {
|
||||
// execute
|
||||
var res RequestCachedResponseReturns
|
||||
@@ -152,7 +158,8 @@ type RequestEntriesParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CacheStorage#method-requestEntries
|
||||
//
|
||||
// parameters:
|
||||
// cacheID - ID of cache to get entries from.
|
||||
//
|
||||
// cacheID - ID of cache to get entries from.
|
||||
func RequestEntries(cacheID CacheID) *RequestEntriesParams {
|
||||
return &RequestEntriesParams{
|
||||
CacheID: cacheID,
|
||||
@@ -187,8 +194,9 @@ type RequestEntriesReturns struct {
|
||||
// Do executes CacheStorage.requestEntries against the provided context.
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// 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 (p *RequestEntriesParams) Do(ctx context.Context) (cacheDataEntries []*DataEntry, returnCount float64, err error) {
|
||||
// execute
|
||||
var res RequestEntriesReturns
|
||||
|
||||
7
vendor/github.com/chromedp/cdproto/cachestorage/types.go
generated
vendored
7
vendor/github.com/chromedp/cdproto/cachestorage/types.go
generated
vendored
@@ -3,7 +3,7 @@ package cachestorage
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/mailru/easyjson"
|
||||
"github.com/mailru/easyjson/jlexer"
|
||||
@@ -52,7 +52,8 @@ func (t CachedResponseType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *CachedResponseType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch CachedResponseType(in.String()) {
|
||||
v := in.String()
|
||||
switch CachedResponseType(v) {
|
||||
case CachedResponseTypeBasic:
|
||||
*t = CachedResponseTypeBasic
|
||||
case CachedResponseTypeCors:
|
||||
@@ -67,7 +68,7 @@ func (t *CachedResponseType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = CachedResponseTypeOpaqueRedirect
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown CachedResponseType value"))
|
||||
in.AddError(fmt.Errorf("unknown CachedResponseType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
43
vendor/github.com/chromedp/cdproto/cast/cast.go
generated
vendored
43
vendor/github.com/chromedp/cdproto/cast/cast.go
generated
vendored
@@ -76,7 +76,8 @@ type SetSinkToUseParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Cast#method-setSinkToUse
|
||||
//
|
||||
// parameters:
|
||||
// sinkName
|
||||
//
|
||||
// sinkName
|
||||
func SetSinkToUse(sinkName string) *SetSinkToUseParams {
|
||||
return &SetSinkToUseParams{
|
||||
SinkName: sinkName,
|
||||
@@ -88,6 +89,29 @@ func (p *SetSinkToUseParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandSetSinkToUse, p, nil)
|
||||
}
|
||||
|
||||
// StartDesktopMirroringParams starts mirroring the desktop to the sink.
|
||||
type StartDesktopMirroringParams struct {
|
||||
SinkName string `json:"sinkName"`
|
||||
}
|
||||
|
||||
// StartDesktopMirroring starts mirroring the desktop to the sink.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Cast#method-startDesktopMirroring
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// sinkName
|
||||
func StartDesktopMirroring(sinkName string) *StartDesktopMirroringParams {
|
||||
return &StartDesktopMirroringParams{
|
||||
SinkName: sinkName,
|
||||
}
|
||||
}
|
||||
|
||||
// Do executes Cast.startDesktopMirroring against the provided context.
|
||||
func (p *StartDesktopMirroringParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandStartDesktopMirroring, p, nil)
|
||||
}
|
||||
|
||||
// StartTabMirroringParams starts mirroring the tab to the sink.
|
||||
type StartTabMirroringParams struct {
|
||||
SinkName string `json:"sinkName"`
|
||||
@@ -98,7 +122,8 @@ type StartTabMirroringParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Cast#method-startTabMirroring
|
||||
//
|
||||
// parameters:
|
||||
// sinkName
|
||||
//
|
||||
// sinkName
|
||||
func StartTabMirroring(sinkName string) *StartTabMirroringParams {
|
||||
return &StartTabMirroringParams{
|
||||
SinkName: sinkName,
|
||||
@@ -120,7 +145,8 @@ type StopCastingParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Cast#method-stopCasting
|
||||
//
|
||||
// parameters:
|
||||
// sinkName
|
||||
//
|
||||
// sinkName
|
||||
func StopCasting(sinkName string) *StopCastingParams {
|
||||
return &StopCastingParams{
|
||||
SinkName: sinkName,
|
||||
@@ -134,9 +160,10 @@ func (p *StopCastingParams) Do(ctx context.Context) (err error) {
|
||||
|
||||
// Command names.
|
||||
const (
|
||||
CommandEnable = "Cast.enable"
|
||||
CommandDisable = "Cast.disable"
|
||||
CommandSetSinkToUse = "Cast.setSinkToUse"
|
||||
CommandStartTabMirroring = "Cast.startTabMirroring"
|
||||
CommandStopCasting = "Cast.stopCasting"
|
||||
CommandEnable = "Cast.enable"
|
||||
CommandDisable = "Cast.disable"
|
||||
CommandSetSinkToUse = "Cast.setSinkToUse"
|
||||
CommandStartDesktopMirroring = "Cast.startDesktopMirroring"
|
||||
CommandStartTabMirroring = "Cast.startTabMirroring"
|
||||
CommandStopCasting = "Cast.stopCasting"
|
||||
)
|
||||
|
||||
138
vendor/github.com/chromedp/cdproto/cast/easyjson.go
generated
vendored
138
vendor/github.com/chromedp/cdproto/cast/easyjson.go
generated
vendored
@@ -149,7 +149,73 @@ func (v *StartTabMirroringParams) UnmarshalJSON(data []byte) error {
|
||||
func (v *StartTabMirroringParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast1(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast2(in *jlexer.Lexer, out *Sink) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast2(in *jlexer.Lexer, out *StartDesktopMirroringParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case "sinkName":
|
||||
out.SinkName = string(in.String())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast2(out *jwriter.Writer, in StartDesktopMirroringParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
const prefix string = ",\"sinkName\":"
|
||||
out.RawString(prefix[1:])
|
||||
out.String(string(in.SinkName))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v StartDesktopMirroringParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast2(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v StartDesktopMirroringParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast2(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *StartDesktopMirroringParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast2(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *StartDesktopMirroringParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast2(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast3(in *jlexer.Lexer, out *Sink) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -184,7 +250,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast2(in *jlexer.Lexer, out *
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast2(out *jwriter.Writer, in Sink) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast3(out *jwriter.Writer, in Sink) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -209,27 +275,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast2(out *jwriter.Writer, in
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v Sink) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast2(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast3(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v Sink) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast2(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast3(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *Sink) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast2(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast3(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *Sink) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast2(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast3(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast3(in *jlexer.Lexer, out *SetSinkToUseParams) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast4(in *jlexer.Lexer, out *SetSinkToUseParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -260,7 +326,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast3(in *jlexer.Lexer, out *
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast3(out *jwriter.Writer, in SetSinkToUseParams) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast4(out *jwriter.Writer, in SetSinkToUseParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -275,27 +341,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast3(out *jwriter.Writer, in
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v SetSinkToUseParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast3(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast4(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v SetSinkToUseParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast3(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast4(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *SetSinkToUseParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast3(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast4(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *SetSinkToUseParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast3(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast4(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast4(in *jlexer.Lexer, out *EventSinksUpdated) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast5(in *jlexer.Lexer, out *EventSinksUpdated) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -355,7 +421,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast4(in *jlexer.Lexer, out *
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast4(out *jwriter.Writer, in EventSinksUpdated) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast5(out *jwriter.Writer, in EventSinksUpdated) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -385,27 +451,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast4(out *jwriter.Writer, in
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v EventSinksUpdated) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast4(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast5(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v EventSinksUpdated) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast4(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast5(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *EventSinksUpdated) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast4(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast5(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *EventSinksUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast4(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast5(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast5(in *jlexer.Lexer, out *EventIssueUpdated) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast6(in *jlexer.Lexer, out *EventIssueUpdated) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -436,7 +502,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast5(in *jlexer.Lexer, out *
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast5(out *jwriter.Writer, in EventIssueUpdated) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast6(out *jwriter.Writer, in EventIssueUpdated) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -451,27 +517,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast5(out *jwriter.Writer, in
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v EventIssueUpdated) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast5(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast6(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v EventIssueUpdated) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast5(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast6(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *EventIssueUpdated) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast5(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast6(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *EventIssueUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast5(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast6(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast6(in *jlexer.Lexer, out *EnableParams) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast7(in *jlexer.Lexer, out *EnableParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -502,7 +568,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast6(in *jlexer.Lexer, out *
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast6(out *jwriter.Writer, in EnableParams) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast7(out *jwriter.Writer, in EnableParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -518,27 +584,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast6(out *jwriter.Writer, in
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v EnableParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast6(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast7(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast6(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast7(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *EnableParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast6(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast7(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast6(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast7(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast7(in *jlexer.Lexer, out *DisableParams) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast8(in *jlexer.Lexer, out *DisableParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -567,7 +633,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast7(in *jlexer.Lexer, out *
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast7(out *jwriter.Writer, in DisableParams) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast8(out *jwriter.Writer, in DisableParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -577,23 +643,23 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast7(out *jwriter.Writer, in
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v DisableParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast7(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast8(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast7(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoCast8(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *DisableParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast7(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast8(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast7(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoCast8(l, v)
|
||||
}
|
||||
|
||||
89
vendor/github.com/chromedp/cdproto/cdp/easyjson.go
generated
vendored
89
vendor/github.com/chromedp/cdproto/cdp/easyjson.go
generated
vendored
@@ -536,6 +536,8 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCdp4(in *jlexer.Lexer, out *N
|
||||
out.Value = string(in.String())
|
||||
case "pseudoType":
|
||||
(out.PseudoType).UnmarshalEasyJSON(in)
|
||||
case "pseudoIdentifier":
|
||||
out.PseudoIdentifier = string(in.String())
|
||||
case "shadowRootType":
|
||||
(out.ShadowRootType).UnmarshalEasyJSON(in)
|
||||
case "frameId":
|
||||
@@ -657,6 +659,16 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCdp4(in *jlexer.Lexer, out *N
|
||||
out.IsSVG = bool(in.Bool())
|
||||
case "compatibilityMode":
|
||||
(out.CompatibilityMode).UnmarshalEasyJSON(in)
|
||||
case "assignedSlot":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
out.AssignedSlot = nil
|
||||
} else {
|
||||
if out.AssignedSlot == nil {
|
||||
out.AssignedSlot = new(BackendNode)
|
||||
}
|
||||
(*out.AssignedSlot).UnmarshalEasyJSON(in)
|
||||
}
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
@@ -788,6 +800,11 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCdp4(out *jwriter.Writer, in
|
||||
out.RawString(prefix)
|
||||
(in.PseudoType).MarshalEasyJSON(out)
|
||||
}
|
||||
if in.PseudoIdentifier != "" {
|
||||
const prefix string = ",\"pseudoIdentifier\":"
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.PseudoIdentifier))
|
||||
}
|
||||
if in.ShadowRootType != "" {
|
||||
const prefix string = ",\"shadowRootType\":"
|
||||
out.RawString(prefix)
|
||||
@@ -872,6 +889,11 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCdp4(out *jwriter.Writer, in
|
||||
out.RawString(prefix)
|
||||
(in.CompatibilityMode).MarshalEasyJSON(out)
|
||||
}
|
||||
if in.AssignedSlot != nil {
|
||||
const prefix string = ",\"assignedSlot\":"
|
||||
out.RawString(prefix)
|
||||
(*in.AssignedSlot).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
@@ -974,37 +996,6 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCdp5(in *jlexer.Lexer, out *F
|
||||
}
|
||||
in.Delim(']')
|
||||
}
|
||||
case "originTrials":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
out.OriginTrials = nil
|
||||
} else {
|
||||
in.Delim('[')
|
||||
if out.OriginTrials == nil {
|
||||
if !in.IsDelim(']') {
|
||||
out.OriginTrials = make([]*OriginTrial, 0, 8)
|
||||
} else {
|
||||
out.OriginTrials = []*OriginTrial{}
|
||||
}
|
||||
} else {
|
||||
out.OriginTrials = (out.OriginTrials)[:0]
|
||||
}
|
||||
for !in.IsDelim(']') {
|
||||
var v20 *OriginTrial
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
v20 = nil
|
||||
} else {
|
||||
if v20 == nil {
|
||||
v20 = new(OriginTrial)
|
||||
}
|
||||
(*v20).UnmarshalEasyJSON(in)
|
||||
}
|
||||
out.OriginTrials = append(out.OriginTrials, v20)
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim(']')
|
||||
}
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
@@ -1091,29 +1082,11 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCdp5(out *jwriter.Writer, in
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v21, v22 := range in.GatedAPIFeatures {
|
||||
if v21 > 0 {
|
||||
for v20, v21 := range in.GatedAPIFeatures {
|
||||
if v20 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
(v22).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
}
|
||||
if len(in.OriginTrials) != 0 {
|
||||
const prefix string = ",\"originTrials\":"
|
||||
out.RawString(prefix)
|
||||
{
|
||||
out.RawByte('[')
|
||||
for v23, v24 := range in.OriginTrials {
|
||||
if v23 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v24 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v24).MarshalEasyJSON(out)
|
||||
}
|
||||
(v21).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
@@ -1261,9 +1234,9 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoCdp7(in *jlexer.Lexer, out *A
|
||||
out.Explanations = (out.Explanations)[:0]
|
||||
}
|
||||
for !in.IsDelim(']') {
|
||||
var v25 AdFrameExplanation
|
||||
(v25).UnmarshalEasyJSON(in)
|
||||
out.Explanations = append(out.Explanations, v25)
|
||||
var v22 AdFrameExplanation
|
||||
(v22).UnmarshalEasyJSON(in)
|
||||
out.Explanations = append(out.Explanations, v22)
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim(']')
|
||||
@@ -1292,11 +1265,11 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoCdp7(out *jwriter.Writer, in
|
||||
out.RawString(prefix)
|
||||
{
|
||||
out.RawByte('[')
|
||||
for v26, v27 := range in.Explanations {
|
||||
if v26 > 0 {
|
||||
for v23, v24 := range in.Explanations {
|
||||
if v23 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
(v27).MarshalEasyJSON(out)
|
||||
(v24).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
|
||||
123
vendor/github.com/chromedp/cdproto/cdp/types.go
generated
vendored
123
vendor/github.com/chromedp/cdproto/cdp/types.go
generated
vendored
@@ -4,7 +4,6 @@ package cdp
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
@@ -167,25 +166,31 @@ func (t PseudoType) String() string {
|
||||
|
||||
// PseudoType values.
|
||||
const (
|
||||
PseudoTypeFirstLine PseudoType = "first-line"
|
||||
PseudoTypeFirstLetter PseudoType = "first-letter"
|
||||
PseudoTypeBefore PseudoType = "before"
|
||||
PseudoTypeAfter PseudoType = "after"
|
||||
PseudoTypeMarker PseudoType = "marker"
|
||||
PseudoTypeBackdrop PseudoType = "backdrop"
|
||||
PseudoTypeSelection PseudoType = "selection"
|
||||
PseudoTypeTargetText PseudoType = "target-text"
|
||||
PseudoTypeSpellingError PseudoType = "spelling-error"
|
||||
PseudoTypeGrammarError PseudoType = "grammar-error"
|
||||
PseudoTypeFirstLineInherited PseudoType = "first-line-inherited"
|
||||
PseudoTypeScrollbar PseudoType = "scrollbar"
|
||||
PseudoTypeScrollbarThumb PseudoType = "scrollbar-thumb"
|
||||
PseudoTypeScrollbarButton PseudoType = "scrollbar-button"
|
||||
PseudoTypeScrollbarTrack PseudoType = "scrollbar-track"
|
||||
PseudoTypeScrollbarTrackPiece PseudoType = "scrollbar-track-piece"
|
||||
PseudoTypeScrollbarCorner PseudoType = "scrollbar-corner"
|
||||
PseudoTypeResizer PseudoType = "resizer"
|
||||
PseudoTypeInputListButton PseudoType = "input-list-button"
|
||||
PseudoTypeFirstLine PseudoType = "first-line"
|
||||
PseudoTypeFirstLetter PseudoType = "first-letter"
|
||||
PseudoTypeBefore PseudoType = "before"
|
||||
PseudoTypeAfter PseudoType = "after"
|
||||
PseudoTypeMarker PseudoType = "marker"
|
||||
PseudoTypeBackdrop PseudoType = "backdrop"
|
||||
PseudoTypeSelection PseudoType = "selection"
|
||||
PseudoTypeTargetText PseudoType = "target-text"
|
||||
PseudoTypeSpellingError PseudoType = "spelling-error"
|
||||
PseudoTypeGrammarError PseudoType = "grammar-error"
|
||||
PseudoTypeHighlight PseudoType = "highlight"
|
||||
PseudoTypeFirstLineInherited PseudoType = "first-line-inherited"
|
||||
PseudoTypeScrollbar PseudoType = "scrollbar"
|
||||
PseudoTypeScrollbarThumb PseudoType = "scrollbar-thumb"
|
||||
PseudoTypeScrollbarButton PseudoType = "scrollbar-button"
|
||||
PseudoTypeScrollbarTrack PseudoType = "scrollbar-track"
|
||||
PseudoTypeScrollbarTrackPiece PseudoType = "scrollbar-track-piece"
|
||||
PseudoTypeScrollbarCorner PseudoType = "scrollbar-corner"
|
||||
PseudoTypeResizer PseudoType = "resizer"
|
||||
PseudoTypeInputListButton PseudoType = "input-list-button"
|
||||
PseudoTypePageTransition PseudoType = "page-transition"
|
||||
PseudoTypePageTransitionContainer PseudoType = "page-transition-container"
|
||||
PseudoTypePageTransitionImageWrapper PseudoType = "page-transition-image-wrapper"
|
||||
PseudoTypePageTransitionOutgoingImage PseudoType = "page-transition-outgoing-image"
|
||||
PseudoTypePageTransitionIncomingImage PseudoType = "page-transition-incoming-image"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
@@ -200,7 +205,8 @@ func (t PseudoType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *PseudoType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch PseudoType(in.String()) {
|
||||
v := in.String()
|
||||
switch PseudoType(v) {
|
||||
case PseudoTypeFirstLine:
|
||||
*t = PseudoTypeFirstLine
|
||||
case PseudoTypeFirstLetter:
|
||||
@@ -221,6 +227,8 @@ func (t *PseudoType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = PseudoTypeSpellingError
|
||||
case PseudoTypeGrammarError:
|
||||
*t = PseudoTypeGrammarError
|
||||
case PseudoTypeHighlight:
|
||||
*t = PseudoTypeHighlight
|
||||
case PseudoTypeFirstLineInherited:
|
||||
*t = PseudoTypeFirstLineInherited
|
||||
case PseudoTypeScrollbar:
|
||||
@@ -239,9 +247,19 @@ func (t *PseudoType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = PseudoTypeResizer
|
||||
case PseudoTypeInputListButton:
|
||||
*t = PseudoTypeInputListButton
|
||||
case PseudoTypePageTransition:
|
||||
*t = PseudoTypePageTransition
|
||||
case PseudoTypePageTransitionContainer:
|
||||
*t = PseudoTypePageTransitionContainer
|
||||
case PseudoTypePageTransitionImageWrapper:
|
||||
*t = PseudoTypePageTransitionImageWrapper
|
||||
case PseudoTypePageTransitionOutgoingImage:
|
||||
*t = PseudoTypePageTransitionOutgoingImage
|
||||
case PseudoTypePageTransitionIncomingImage:
|
||||
*t = PseudoTypePageTransitionIncomingImage
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown PseudoType value"))
|
||||
in.AddError(fmt.Errorf("unknown PseudoType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -279,7 +297,8 @@ func (t ShadowRootType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ShadowRootType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ShadowRootType(in.String()) {
|
||||
v := in.String()
|
||||
switch ShadowRootType(v) {
|
||||
case ShadowRootTypeUserAgent:
|
||||
*t = ShadowRootTypeUserAgent
|
||||
case ShadowRootTypeOpen:
|
||||
@@ -288,7 +307,7 @@ func (t *ShadowRootType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = ShadowRootTypeClosed
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ShadowRootType value"))
|
||||
in.AddError(fmt.Errorf("unknown ShadowRootType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -326,7 +345,8 @@ func (t CompatibilityMode) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *CompatibilityMode) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch CompatibilityMode(in.String()) {
|
||||
v := in.String()
|
||||
switch CompatibilityMode(v) {
|
||||
case CompatibilityModeQuirksMode:
|
||||
*t = CompatibilityModeQuirksMode
|
||||
case CompatibilityModeLimitedQuirksMode:
|
||||
@@ -335,7 +355,7 @@ func (t *CompatibilityMode) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = CompatibilityModeNoQuirksMode
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown CompatibilityMode value"))
|
||||
in.AddError(fmt.Errorf("unknown CompatibilityMode value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -368,6 +388,7 @@ type Node struct {
|
||||
Name string `json:"name,omitempty"` // Attr's name.
|
||||
Value string `json:"value,omitempty"` // Attr's value.
|
||||
PseudoType PseudoType `json:"pseudoType,omitempty"` // Pseudo element type for this node.
|
||||
PseudoIdentifier string `json:"pseudoIdentifier,omitempty"` // Pseudo element identifier for this node. Only present if there is a valid pseudoType.
|
||||
ShadowRootType ShadowRootType `json:"shadowRootType,omitempty"` // Shadow root type.
|
||||
FrameID FrameID `json:"frameId,omitempty"` // Frame ID for frame owner elements.
|
||||
ContentDocument *Node `json:"contentDocument,omitempty"` // Content document for frame owner elements.
|
||||
@@ -377,6 +398,7 @@ type Node struct {
|
||||
DistributedNodes []*BackendNode `json:"distributedNodes,omitempty"` // Distributed nodes for given insertion point.
|
||||
IsSVG bool `json:"isSVG,omitempty"` // Whether the node is SVG.
|
||||
CompatibilityMode CompatibilityMode `json:"compatibilityMode,omitempty"`
|
||||
AssignedSlot *BackendNode `json:"assignedSlot,omitempty"`
|
||||
Parent *Node `json:"-"` // Parent node.
|
||||
Invalidated chan struct{} `json:"-"` // Invalidated channel.
|
||||
State NodeState `json:"-"` // Node state.
|
||||
@@ -645,7 +667,8 @@ func (t NodeType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *NodeType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch NodeType(in.Int64()) {
|
||||
v := in.Int64()
|
||||
switch NodeType(v) {
|
||||
case NodeTypeElement:
|
||||
*t = NodeTypeElement
|
||||
case NodeTypeAttribute:
|
||||
@@ -672,7 +695,7 @@ func (t *NodeType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = NodeTypeNotation
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown NodeType value"))
|
||||
in.AddError(fmt.Errorf("unknown NodeType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -821,7 +844,8 @@ func (t AdFrameType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *AdFrameType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch AdFrameType(in.String()) {
|
||||
v := in.String()
|
||||
switch AdFrameType(v) {
|
||||
case AdFrameTypeNone:
|
||||
*t = AdFrameTypeNone
|
||||
case AdFrameTypeChild:
|
||||
@@ -830,7 +854,7 @@ func (t *AdFrameType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = AdFrameTypeRoot
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown AdFrameType value"))
|
||||
in.AddError(fmt.Errorf("unknown AdFrameType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -868,7 +892,8 @@ func (t AdFrameExplanation) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *AdFrameExplanation) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch AdFrameExplanation(in.String()) {
|
||||
v := in.String()
|
||||
switch AdFrameExplanation(v) {
|
||||
case AdFrameExplanationParentIsAd:
|
||||
*t = AdFrameExplanationParentIsAd
|
||||
case AdFrameExplanationCreatedByAdScript:
|
||||
@@ -877,7 +902,7 @@ func (t *AdFrameExplanation) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = AdFrameExplanationMatchedBlockingRule
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown AdFrameExplanation value"))
|
||||
in.AddError(fmt.Errorf("unknown AdFrameExplanation value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -926,7 +951,8 @@ func (t SecureContextType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *SecureContextType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch SecureContextType(in.String()) {
|
||||
v := in.String()
|
||||
switch SecureContextType(v) {
|
||||
case SecureContextTypeSecure:
|
||||
*t = SecureContextTypeSecure
|
||||
case SecureContextTypeSecureLocalhost:
|
||||
@@ -937,7 +963,7 @@ func (t *SecureContextType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = SecureContextTypeInsecureAncestor
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown SecureContextType value"))
|
||||
in.AddError(fmt.Errorf("unknown SecureContextType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -976,7 +1002,8 @@ func (t CrossOriginIsolatedContextType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *CrossOriginIsolatedContextType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch CrossOriginIsolatedContextType(in.String()) {
|
||||
v := in.String()
|
||||
switch CrossOriginIsolatedContextType(v) {
|
||||
case CrossOriginIsolatedContextTypeIsolated:
|
||||
*t = CrossOriginIsolatedContextTypeIsolated
|
||||
case CrossOriginIsolatedContextTypeNotIsolated:
|
||||
@@ -985,7 +1012,7 @@ func (t *CrossOriginIsolatedContextType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = CrossOriginIsolatedContextTypeNotIsolatedFeatureDisabled
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown CrossOriginIsolatedContextType value"))
|
||||
in.AddError(fmt.Errorf("unknown CrossOriginIsolatedContextType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1024,7 +1051,8 @@ func (t GatedAPIFeatures) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *GatedAPIFeatures) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch GatedAPIFeatures(in.String()) {
|
||||
v := in.String()
|
||||
switch GatedAPIFeatures(v) {
|
||||
case GatedAPIFeaturesSharedArrayBuffers:
|
||||
*t = GatedAPIFeaturesSharedArrayBuffers
|
||||
case GatedAPIFeaturesSharedArrayBuffersTransferAllowed:
|
||||
@@ -1035,7 +1063,7 @@ func (t *GatedAPIFeatures) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = GatedAPIFeaturesPerformanceProfile
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown GatedAPIFeatures value"))
|
||||
in.AddError(fmt.Errorf("unknown GatedAPIFeatures value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1069,6 +1097,7 @@ const (
|
||||
OriginTrialTokenStatusFeatureDisabled OriginTrialTokenStatus = "FeatureDisabled"
|
||||
OriginTrialTokenStatusTokenDisabled OriginTrialTokenStatus = "TokenDisabled"
|
||||
OriginTrialTokenStatusFeatureDisabledForUser OriginTrialTokenStatus = "FeatureDisabledForUser"
|
||||
OriginTrialTokenStatusUnknownTrial OriginTrialTokenStatus = "UnknownTrial"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
@@ -1083,7 +1112,8 @@ func (t OriginTrialTokenStatus) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *OriginTrialTokenStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch OriginTrialTokenStatus(in.String()) {
|
||||
v := in.String()
|
||||
switch OriginTrialTokenStatus(v) {
|
||||
case OriginTrialTokenStatusSuccess:
|
||||
*t = OriginTrialTokenStatusSuccess
|
||||
case OriginTrialTokenStatusNotSupported:
|
||||
@@ -1106,9 +1136,11 @@ func (t *OriginTrialTokenStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = OriginTrialTokenStatusTokenDisabled
|
||||
case OriginTrialTokenStatusFeatureDisabledForUser:
|
||||
*t = OriginTrialTokenStatusFeatureDisabledForUser
|
||||
case OriginTrialTokenStatusUnknownTrial:
|
||||
*t = OriginTrialTokenStatusUnknownTrial
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown OriginTrialTokenStatus value"))
|
||||
in.AddError(fmt.Errorf("unknown OriginTrialTokenStatus value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1147,7 +1179,8 @@ func (t OriginTrialStatus) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *OriginTrialStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch OriginTrialStatus(in.String()) {
|
||||
v := in.String()
|
||||
switch OriginTrialStatus(v) {
|
||||
case OriginTrialStatusEnabled:
|
||||
*t = OriginTrialStatusEnabled
|
||||
case OriginTrialStatusValidTokenNotProvided:
|
||||
@@ -1158,7 +1191,7 @@ func (t *OriginTrialStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = OriginTrialStatusTrialNotAllowed
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown OriginTrialStatus value"))
|
||||
in.AddError(fmt.Errorf("unknown OriginTrialStatus value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1195,14 +1228,15 @@ func (t OriginTrialUsageRestriction) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *OriginTrialUsageRestriction) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch OriginTrialUsageRestriction(in.String()) {
|
||||
v := in.String()
|
||||
switch OriginTrialUsageRestriction(v) {
|
||||
case OriginTrialUsageRestrictionNone:
|
||||
*t = OriginTrialUsageRestrictionNone
|
||||
case OriginTrialUsageRestrictionSubset:
|
||||
*t = OriginTrialUsageRestrictionSubset
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown OriginTrialUsageRestriction value"))
|
||||
in.AddError(fmt.Errorf("unknown OriginTrialUsageRestriction value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1259,7 +1293,6 @@ type Frame struct {
|
||||
SecureContextType SecureContextType `json:"secureContextType"` // Indicates whether the main document is a secure context and explains why that is the case.
|
||||
CrossOriginIsolatedContextType CrossOriginIsolatedContextType `json:"crossOriginIsolatedContextType"` // Indicates whether this is a cross origin isolated context.
|
||||
GatedAPIFeatures []GatedAPIFeatures `json:"gatedAPIFeatures"` // Indicated which gated APIs / features are available.
|
||||
OriginTrials []*OriginTrial `json:"originTrials,omitempty"` // Frame document's origin trials with at least one token present.
|
||||
State FrameState `json:"-"` // Frame state.
|
||||
Root *Node `json:"-"` // Frame document root.
|
||||
Nodes map[NodeID]*Node `json:"-"` // Frame nodes.
|
||||
|
||||
268
vendor/github.com/chromedp/cdproto/cdproto.go
generated
vendored
268
vendor/github.com/chromedp/cdproto/cdproto.go
generated
vendored
@@ -14,7 +14,6 @@ import (
|
||||
|
||||
"github.com/chromedp/cdproto/accessibility"
|
||||
"github.com/chromedp/cdproto/animation"
|
||||
"github.com/chromedp/cdproto/applicationcache"
|
||||
"github.com/chromedp/cdproto/audits"
|
||||
"github.com/chromedp/cdproto/backgroundservice"
|
||||
"github.com/chromedp/cdproto/browser"
|
||||
@@ -30,6 +29,7 @@ import (
|
||||
"github.com/chromedp/cdproto/domsnapshot"
|
||||
"github.com/chromedp/cdproto/domstorage"
|
||||
"github.com/chromedp/cdproto/emulation"
|
||||
"github.com/chromedp/cdproto/eventbreakpoints"
|
||||
"github.com/chromedp/cdproto/fetch"
|
||||
"github.com/chromedp/cdproto/headlessexperimental"
|
||||
"github.com/chromedp/cdproto/heapprofiler"
|
||||
@@ -80,8 +80,12 @@ const (
|
||||
CommandAccessibilityEnable = accessibility.CommandEnable
|
||||
CommandAccessibilityGetPartialAXTree = accessibility.CommandGetPartialAXTree
|
||||
CommandAccessibilityGetFullAXTree = accessibility.CommandGetFullAXTree
|
||||
CommandAccessibilityGetRootAXNode = accessibility.CommandGetRootAXNode
|
||||
CommandAccessibilityGetAXNodeAndAncestors = accessibility.CommandGetAXNodeAndAncestors
|
||||
CommandAccessibilityGetChildAXNodes = accessibility.CommandGetChildAXNodes
|
||||
CommandAccessibilityQueryAXTree = accessibility.CommandQueryAXTree
|
||||
EventAccessibilityLoadComplete = "Accessibility.loadComplete"
|
||||
EventAccessibilityNodesUpdated = "Accessibility.nodesUpdated"
|
||||
CommandAnimationDisable = animation.CommandDisable
|
||||
CommandAnimationEnable = animation.CommandEnable
|
||||
CommandAnimationGetCurrentTime = animation.CommandGetCurrentTime
|
||||
@@ -95,12 +99,6 @@ const (
|
||||
EventAnimationAnimationCanceled = "Animation.animationCanceled"
|
||||
EventAnimationAnimationCreated = "Animation.animationCreated"
|
||||
EventAnimationAnimationStarted = "Animation.animationStarted"
|
||||
CommandApplicationCacheEnable = applicationcache.CommandEnable
|
||||
CommandApplicationCacheGetApplicationCacheForFrame = applicationcache.CommandGetApplicationCacheForFrame
|
||||
CommandApplicationCacheGetFramesWithManifests = applicationcache.CommandGetFramesWithManifests
|
||||
CommandApplicationCacheGetManifestForFrame = applicationcache.CommandGetManifestForFrame
|
||||
EventApplicationCacheApplicationCacheStatusUpdated = "ApplicationCache.applicationCacheStatusUpdated"
|
||||
EventApplicationCacheNetworkStateUpdated = "ApplicationCache.networkStateUpdated"
|
||||
CommandAuditsGetEncodedResponse = audits.CommandGetEncodedResponse
|
||||
CommandAuditsDisable = audits.CommandDisable
|
||||
CommandAuditsEnable = audits.CommandEnable
|
||||
@@ -144,12 +142,15 @@ const (
|
||||
CommandCSSGetMediaQueries = css.CommandGetMediaQueries
|
||||
CommandCSSGetPlatformFontsForNode = css.CommandGetPlatformFontsForNode
|
||||
CommandCSSGetStyleSheetText = css.CommandGetStyleSheetText
|
||||
CommandCSSGetLayersForNode = css.CommandGetLayersForNode
|
||||
CommandCSSTrackComputedStyleUpdates = css.CommandTrackComputedStyleUpdates
|
||||
CommandCSSTakeComputedStyleUpdates = css.CommandTakeComputedStyleUpdates
|
||||
CommandCSSSetEffectivePropertyValueForNode = css.CommandSetEffectivePropertyValueForNode
|
||||
CommandCSSSetKeyframeKey = css.CommandSetKeyframeKey
|
||||
CommandCSSSetMediaText = css.CommandSetMediaText
|
||||
CommandCSSSetContainerQueryText = css.CommandSetContainerQueryText
|
||||
CommandCSSSetSupportsText = css.CommandSetSupportsText
|
||||
CommandCSSSetScopeText = css.CommandSetScopeText
|
||||
CommandCSSSetRuleSelector = css.CommandSetRuleSelector
|
||||
CommandCSSSetStyleSheetText = css.CommandSetStyleSheetText
|
||||
CommandCSSSetStyleTexts = css.CommandSetStyleTexts
|
||||
@@ -170,6 +171,7 @@ const (
|
||||
CommandCastEnable = cast.CommandEnable
|
||||
CommandCastDisable = cast.CommandDisable
|
||||
CommandCastSetSinkToUse = cast.CommandSetSinkToUse
|
||||
CommandCastStartDesktopMirroring = cast.CommandStartDesktopMirroring
|
||||
CommandCastStartTabMirroring = cast.CommandStartTabMirroring
|
||||
CommandCastStopCasting = cast.CommandStopCasting
|
||||
EventCastSinksUpdated = "Cast.sinksUpdated"
|
||||
@@ -195,9 +197,10 @@ const (
|
||||
CommandDOMMoveTo = dom.CommandMoveTo
|
||||
CommandDOMPerformSearch = dom.CommandPerformSearch
|
||||
CommandDOMPushNodeByPathToFrontend = dom.CommandPushNodeByPathToFrontend
|
||||
CommandDOMPushNodesByBackendIdsToFrontend = dom.CommandPushNodesByBackendIdsToFrontend
|
||||
CommandDOMPushNodesByBackendIDsToFrontend = dom.CommandPushNodesByBackendIDsToFrontend
|
||||
CommandDOMQuerySelector = dom.CommandQuerySelector
|
||||
CommandDOMQuerySelectorAll = dom.CommandQuerySelectorAll
|
||||
CommandDOMGetTopLayerElements = dom.CommandGetTopLayerElements
|
||||
CommandDOMRedo = dom.CommandRedo
|
||||
CommandDOMRemoveAttribute = dom.CommandRemoveAttribute
|
||||
CommandDOMRemoveNode = dom.CommandRemoveNode
|
||||
@@ -216,6 +219,8 @@ const (
|
||||
CommandDOMSetOuterHTML = dom.CommandSetOuterHTML
|
||||
CommandDOMUndo = dom.CommandUndo
|
||||
CommandDOMGetFrameOwner = dom.CommandGetFrameOwner
|
||||
CommandDOMGetContainerForNode = dom.CommandGetContainerForNode
|
||||
CommandDOMGetQueryingDescendantsForContainer = dom.CommandGetQueryingDescendantsForContainer
|
||||
EventDOMAttributeModified = "DOM.attributeModified"
|
||||
EventDOMAttributeRemoved = "DOM.attributeRemoved"
|
||||
EventDOMCharacterDataModified = "DOM.characterDataModified"
|
||||
@@ -226,6 +231,7 @@ const (
|
||||
EventDOMDocumentUpdated = "DOM.documentUpdated"
|
||||
EventDOMInlineStyleInvalidated = "DOM.inlineStyleInvalidated"
|
||||
EventDOMPseudoElementAdded = "DOM.pseudoElementAdded"
|
||||
EventDOMTopLayerElementsUpdated = "DOM.topLayerElementsUpdated"
|
||||
EventDOMPseudoElementRemoved = "DOM.pseudoElementRemoved"
|
||||
EventDOMSetChildNodes = "DOM.setChildNodes"
|
||||
EventDOMShadowRootPopped = "DOM.shadowRootPopped"
|
||||
@@ -264,9 +270,12 @@ const (
|
||||
CommandDebuggerEvaluateOnCallFrame = debugger.CommandEvaluateOnCallFrame
|
||||
CommandDebuggerGetPossibleBreakpoints = debugger.CommandGetPossibleBreakpoints
|
||||
CommandDebuggerGetScriptSource = debugger.CommandGetScriptSource
|
||||
CommandDebuggerDisassembleWasmModule = debugger.CommandDisassembleWasmModule
|
||||
CommandDebuggerNextWasmDisassemblyChunk = debugger.CommandNextWasmDisassemblyChunk
|
||||
CommandDebuggerGetStackTrace = debugger.CommandGetStackTrace
|
||||
CommandDebuggerPause = debugger.CommandPause
|
||||
CommandDebuggerRemoveBreakpoint = debugger.CommandRemoveBreakpoint
|
||||
CommandDebuggerRestartFrame = debugger.CommandRestartFrame
|
||||
CommandDebuggerResume = debugger.CommandResume
|
||||
CommandDebuggerSearchInContent = debugger.CommandSearchInContent
|
||||
CommandDebuggerSetAsyncCallStackDepth = debugger.CommandSetAsyncCallStackDepth
|
||||
@@ -297,6 +306,7 @@ const (
|
||||
CommandEmulationClearGeolocationOverride = emulation.CommandClearGeolocationOverride
|
||||
CommandEmulationResetPageScaleFactor = emulation.CommandResetPageScaleFactor
|
||||
CommandEmulationSetFocusEmulationEnabled = emulation.CommandSetFocusEmulationEnabled
|
||||
CommandEmulationSetAutoDarkModeOverride = emulation.CommandSetAutoDarkModeOverride
|
||||
CommandEmulationSetCPUThrottlingRate = emulation.CommandSetCPUThrottlingRate
|
||||
CommandEmulationSetDefaultBackgroundColorOverride = emulation.CommandSetDefaultBackgroundColorOverride
|
||||
CommandEmulationSetDeviceMetricsOverride = emulation.CommandSetDeviceMetricsOverride
|
||||
@@ -315,14 +325,19 @@ const (
|
||||
CommandEmulationSetLocaleOverride = emulation.CommandSetLocaleOverride
|
||||
CommandEmulationSetTimezoneOverride = emulation.CommandSetTimezoneOverride
|
||||
CommandEmulationSetDisabledImageTypes = emulation.CommandSetDisabledImageTypes
|
||||
CommandEmulationSetHardwareConcurrencyOverride = emulation.CommandSetHardwareConcurrencyOverride
|
||||
CommandEmulationSetUserAgentOverride = emulation.CommandSetUserAgentOverride
|
||||
CommandEmulationSetAutomationOverride = emulation.CommandSetAutomationOverride
|
||||
EventEmulationVirtualTimeBudgetExpired = "Emulation.virtualTimeBudgetExpired"
|
||||
CommandEventBreakpointsSetInstrumentationBreakpoint = eventbreakpoints.CommandSetInstrumentationBreakpoint
|
||||
CommandEventBreakpointsRemoveInstrumentationBreakpoint = eventbreakpoints.CommandRemoveInstrumentationBreakpoint
|
||||
CommandFetchDisable = fetch.CommandDisable
|
||||
CommandFetchEnable = fetch.CommandEnable
|
||||
CommandFetchFailRequest = fetch.CommandFailRequest
|
||||
CommandFetchFulfillRequest = fetch.CommandFulfillRequest
|
||||
CommandFetchContinueRequest = fetch.CommandContinueRequest
|
||||
CommandFetchContinueWithAuth = fetch.CommandContinueWithAuth
|
||||
CommandFetchContinueResponse = fetch.CommandContinueResponse
|
||||
CommandFetchGetResponseBody = fetch.CommandGetResponseBody
|
||||
CommandFetchTakeResponseBodyAsStream = fetch.CommandTakeResponseBodyAsStream
|
||||
EventFetchRequestPaused = "Fetch.requestPaused"
|
||||
@@ -362,6 +377,7 @@ const (
|
||||
CommandInputDispatchDragEvent = input.CommandDispatchDragEvent
|
||||
CommandInputDispatchKeyEvent = input.CommandDispatchKeyEvent
|
||||
CommandInputInsertText = input.CommandInsertText
|
||||
CommandInputImeSetComposition = input.CommandImeSetComposition
|
||||
CommandInputDispatchMouseEvent = input.CommandDispatchMouseEvent
|
||||
CommandInputDispatchTouchEvent = input.CommandDispatchTouchEvent
|
||||
CommandInputEmulateTouchFromMouseEvent = input.CommandEmulateTouchFromMouseEvent
|
||||
@@ -435,6 +451,7 @@ const (
|
||||
CommandNetworkSetExtraHTTPHeaders = network.CommandSetExtraHTTPHeaders
|
||||
CommandNetworkSetAttachDebugStack = network.CommandSetAttachDebugStack
|
||||
CommandNetworkGetSecurityIsolationStatus = network.CommandGetSecurityIsolationStatus
|
||||
CommandNetworkEnableReportingAPI = network.CommandEnableReportingAPI
|
||||
CommandNetworkLoadNetworkResource = network.CommandLoadNetworkResource
|
||||
EventNetworkDataReceived = "Network.dataReceived"
|
||||
EventNetworkEventSourceMessageReceived = "Network.eventSourceMessageReceived"
|
||||
@@ -462,13 +479,15 @@ const (
|
||||
EventNetworkSubresourceWebBundleMetadataError = "Network.subresourceWebBundleMetadataError"
|
||||
EventNetworkSubresourceWebBundleInnerResponseParsed = "Network.subresourceWebBundleInnerResponseParsed"
|
||||
EventNetworkSubresourceWebBundleInnerResponseError = "Network.subresourceWebBundleInnerResponseError"
|
||||
EventNetworkReportingAPIReportAdded = "Network.reportingApiReportAdded"
|
||||
EventNetworkReportingAPIReportUpdated = "Network.reportingApiReportUpdated"
|
||||
EventNetworkReportingAPIEndpointsChangedForOrigin = "Network.reportingApiEndpointsChangedForOrigin"
|
||||
CommandOverlayDisable = overlay.CommandDisable
|
||||
CommandOverlayEnable = overlay.CommandEnable
|
||||
CommandOverlayGetHighlightObjectForTest = overlay.CommandGetHighlightObjectForTest
|
||||
CommandOverlayGetGridHighlightObjectsForTest = overlay.CommandGetGridHighlightObjectsForTest
|
||||
CommandOverlayGetSourceOrderHighlightObjectForTest = overlay.CommandGetSourceOrderHighlightObjectForTest
|
||||
CommandOverlayHideHighlight = overlay.CommandHideHighlight
|
||||
CommandOverlayHighlightFrame = overlay.CommandHighlightFrame
|
||||
CommandOverlayHighlightNode = overlay.CommandHighlightNode
|
||||
CommandOverlayHighlightQuad = overlay.CommandHighlightQuad
|
||||
CommandOverlayHighlightRect = overlay.CommandHighlightRect
|
||||
@@ -481,13 +500,14 @@ const (
|
||||
CommandOverlaySetShowGridOverlays = overlay.CommandSetShowGridOverlays
|
||||
CommandOverlaySetShowFlexOverlays = overlay.CommandSetShowFlexOverlays
|
||||
CommandOverlaySetShowScrollSnapOverlays = overlay.CommandSetShowScrollSnapOverlays
|
||||
CommandOverlaySetShowContainerQueryOverlays = overlay.CommandSetShowContainerQueryOverlays
|
||||
CommandOverlaySetShowPaintRects = overlay.CommandSetShowPaintRects
|
||||
CommandOverlaySetShowLayoutShiftRegions = overlay.CommandSetShowLayoutShiftRegions
|
||||
CommandOverlaySetShowScrollBottleneckRects = overlay.CommandSetShowScrollBottleneckRects
|
||||
CommandOverlaySetShowHitTestBorders = overlay.CommandSetShowHitTestBorders
|
||||
CommandOverlaySetShowWebVitals = overlay.CommandSetShowWebVitals
|
||||
CommandOverlaySetShowViewportSizeOnResize = overlay.CommandSetShowViewportSizeOnResize
|
||||
CommandOverlaySetShowHinge = overlay.CommandSetShowHinge
|
||||
CommandOverlaySetShowIsolatedElements = overlay.CommandSetShowIsolatedElements
|
||||
EventOverlayInspectNodeRequested = "Overlay.inspectNodeRequested"
|
||||
EventOverlayNodeHighlightRequested = "Overlay.nodeHighlightRequested"
|
||||
EventOverlayScreenshotRequested = "Overlay.screenshotRequested"
|
||||
@@ -502,6 +522,8 @@ const (
|
||||
CommandPageGetAppManifest = page.CommandGetAppManifest
|
||||
CommandPageGetInstallabilityErrors = page.CommandGetInstallabilityErrors
|
||||
CommandPageGetManifestIcons = page.CommandGetManifestIcons
|
||||
CommandPageGetAppID = page.CommandGetAppID
|
||||
CommandPageGetAdScriptID = page.CommandGetAdScriptID
|
||||
CommandPageGetFrameTree = page.CommandGetFrameTree
|
||||
CommandPageGetLayoutMetrics = page.CommandGetLayoutMetrics
|
||||
CommandPageGetNavigationHistory = page.CommandGetNavigationHistory
|
||||
@@ -519,6 +541,7 @@ const (
|
||||
CommandPageSetAdBlockingEnabled = page.CommandSetAdBlockingEnabled
|
||||
CommandPageSetBypassCSP = page.CommandSetBypassCSP
|
||||
CommandPageGetPermissionsPolicyState = page.CommandGetPermissionsPolicyState
|
||||
CommandPageGetOriginTrials = page.CommandGetOriginTrials
|
||||
CommandPageSetFontFamilies = page.CommandSetFontFamilies
|
||||
CommandPageSetFontSizes = page.CommandSetFontSizes
|
||||
CommandPageSetDocumentContent = page.CommandSetDocumentContent
|
||||
@@ -530,10 +553,10 @@ const (
|
||||
CommandPageClose = page.CommandClose
|
||||
CommandPageSetWebLifecycleState = page.CommandSetWebLifecycleState
|
||||
CommandPageStopScreencast = page.CommandStopScreencast
|
||||
CommandPageSetProduceCompilationCache = page.CommandSetProduceCompilationCache
|
||||
CommandPageProduceCompilationCache = page.CommandProduceCompilationCache
|
||||
CommandPageAddCompilationCache = page.CommandAddCompilationCache
|
||||
CommandPageClearCompilationCache = page.CommandClearCompilationCache
|
||||
CommandPageSetSPCTransactionMode = page.CommandSetSPCTransactionMode
|
||||
CommandPageGenerateTestReport = page.CommandGenerateTestReport
|
||||
CommandPageWaitForDebugger = page.CommandWaitForDebugger
|
||||
CommandPageSetInterceptFileChooserDialog = page.CommandSetInterceptFileChooserDialog
|
||||
@@ -553,6 +576,7 @@ const (
|
||||
EventPageJavascriptDialogOpening = "Page.javascriptDialogOpening"
|
||||
EventPageLifecycleEvent = "Page.lifecycleEvent"
|
||||
EventPageBackForwardCacheNotUsed = "Page.backForwardCacheNotUsed"
|
||||
EventPagePrerenderAttemptCompleted = "Page.prerenderAttemptCompleted"
|
||||
EventPageLoadEventFired = "Page.loadEventFired"
|
||||
EventPageNavigatedWithinDocument = "Page.navigatedWithinDocument"
|
||||
EventPageScreencastFrame = "Page.screencastFrame"
|
||||
@@ -571,18 +595,9 @@ const (
|
||||
CommandProfilerSetSamplingInterval = profiler.CommandSetSamplingInterval
|
||||
CommandProfilerStart = profiler.CommandStart
|
||||
CommandProfilerStartPreciseCoverage = profiler.CommandStartPreciseCoverage
|
||||
CommandProfilerStartTypeProfile = profiler.CommandStartTypeProfile
|
||||
CommandProfilerStop = profiler.CommandStop
|
||||
CommandProfilerStopPreciseCoverage = profiler.CommandStopPreciseCoverage
|
||||
CommandProfilerStopTypeProfile = profiler.CommandStopTypeProfile
|
||||
CommandProfilerTakePreciseCoverage = profiler.CommandTakePreciseCoverage
|
||||
CommandProfilerTakeTypeProfile = profiler.CommandTakeTypeProfile
|
||||
CommandProfilerEnableCounters = profiler.CommandEnableCounters
|
||||
CommandProfilerDisableCounters = profiler.CommandDisableCounters
|
||||
CommandProfilerGetCounters = profiler.CommandGetCounters
|
||||
CommandProfilerEnableRuntimeCallStats = profiler.CommandEnableRuntimeCallStats
|
||||
CommandProfilerDisableRuntimeCallStats = profiler.CommandDisableRuntimeCallStats
|
||||
CommandProfilerGetRuntimeCallStats = profiler.CommandGetRuntimeCallStats
|
||||
EventProfilerConsoleProfileFinished = "Profiler.consoleProfileFinished"
|
||||
EventProfilerConsoleProfileStarted = "Profiler.consoleProfileStarted"
|
||||
EventProfilerPreciseCoverageDeltaUpdate = "Profiler.preciseCoverageDeltaUpdate"
|
||||
@@ -607,6 +622,7 @@ const (
|
||||
CommandRuntimeTerminateExecution = runtime.CommandTerminateExecution
|
||||
CommandRuntimeAddBinding = runtime.CommandAddBinding
|
||||
CommandRuntimeRemoveBinding = runtime.CommandRemoveBinding
|
||||
CommandRuntimeGetExceptionDetails = runtime.CommandGetExceptionDetails
|
||||
EventRuntimeBindingCalled = "Runtime.bindingCalled"
|
||||
EventRuntimeConsoleAPICalled = "Runtime.consoleAPICalled"
|
||||
EventRuntimeExceptionRevoked = "Runtime.exceptionRevoked"
|
||||
@@ -619,7 +635,6 @@ const (
|
||||
CommandSecurityEnable = security.CommandEnable
|
||||
CommandSecuritySetIgnoreCertificateErrors = security.CommandSetIgnoreCertificateErrors
|
||||
EventSecurityVisibleSecurityStateChanged = "Security.visibleSecurityStateChanged"
|
||||
EventSecuritySecurityStateChanged = "Security.securityStateChanged"
|
||||
CommandServiceWorkerDeliverPushMessage = serviceworker.CommandDeliverPushMessage
|
||||
CommandServiceWorkerDisable = serviceworker.CommandDisable
|
||||
CommandServiceWorkerDispatchSyncEvent = serviceworker.CommandDispatchSyncEvent
|
||||
@@ -636,7 +651,9 @@ const (
|
||||
EventServiceWorkerWorkerErrorReported = "ServiceWorker.workerErrorReported"
|
||||
EventServiceWorkerWorkerRegistrationUpdated = "ServiceWorker.workerRegistrationUpdated"
|
||||
EventServiceWorkerWorkerVersionUpdated = "ServiceWorker.workerVersionUpdated"
|
||||
CommandStorageGetStorageKeyForFrame = storage.CommandGetStorageKeyForFrame
|
||||
CommandStorageClearDataForOrigin = storage.CommandClearDataForOrigin
|
||||
CommandStorageClearDataForStorageKey = storage.CommandClearDataForStorageKey
|
||||
CommandStorageGetCookies = storage.CommandGetCookies
|
||||
CommandStorageSetCookies = storage.CommandSetCookies
|
||||
CommandStorageClearCookies = storage.CommandClearCookies
|
||||
@@ -644,14 +661,23 @@ const (
|
||||
CommandStorageOverrideQuotaForOrigin = storage.CommandOverrideQuotaForOrigin
|
||||
CommandStorageTrackCacheStorageForOrigin = storage.CommandTrackCacheStorageForOrigin
|
||||
CommandStorageTrackIndexedDBForOrigin = storage.CommandTrackIndexedDBForOrigin
|
||||
CommandStorageTrackIndexedDBForStorageKey = storage.CommandTrackIndexedDBForStorageKey
|
||||
CommandStorageUntrackCacheStorageForOrigin = storage.CommandUntrackCacheStorageForOrigin
|
||||
CommandStorageUntrackIndexedDBForOrigin = storage.CommandUntrackIndexedDBForOrigin
|
||||
CommandStorageUntrackIndexedDBForStorageKey = storage.CommandUntrackIndexedDBForStorageKey
|
||||
CommandStorageGetTrustTokens = storage.CommandGetTrustTokens
|
||||
CommandStorageClearTrustTokens = storage.CommandClearTrustTokens
|
||||
CommandStorageGetInterestGroupDetails = storage.CommandGetInterestGroupDetails
|
||||
CommandStorageSetInterestGroupTracking = storage.CommandSetInterestGroupTracking
|
||||
CommandStorageGetSharedStorageMetadata = storage.CommandGetSharedStorageMetadata
|
||||
CommandStorageGetSharedStorageEntries = storage.CommandGetSharedStorageEntries
|
||||
CommandStorageSetSharedStorageTracking = storage.CommandSetSharedStorageTracking
|
||||
EventStorageCacheStorageContentUpdated = "Storage.cacheStorageContentUpdated"
|
||||
EventStorageCacheStorageListUpdated = "Storage.cacheStorageListUpdated"
|
||||
EventStorageIndexedDBContentUpdated = "Storage.indexedDBContentUpdated"
|
||||
EventStorageIndexedDBListUpdated = "Storage.indexedDBListUpdated"
|
||||
EventStorageInterestGroupAccessed = "Storage.interestGroupAccessed"
|
||||
EventStorageSharedStorageAccessed = "Storage.sharedStorageAccessed"
|
||||
CommandSystemInfoGetInfo = systeminfo.CommandGetInfo
|
||||
CommandSystemInfoGetProcessInfo = systeminfo.CommandGetProcessInfo
|
||||
CommandTargetActivateTarget = target.CommandActivateTarget
|
||||
@@ -667,6 +693,7 @@ const (
|
||||
CommandTargetGetTargetInfo = target.CommandGetTargetInfo
|
||||
CommandTargetGetTargets = target.CommandGetTargets
|
||||
CommandTargetSetAutoAttach = target.CommandSetAutoAttach
|
||||
CommandTargetAutoAttachRelated = target.CommandAutoAttachRelated
|
||||
CommandTargetSetDiscoverTargets = target.CommandSetDiscoverTargets
|
||||
CommandTargetSetRemoteLocations = target.CommandSetRemoteLocations
|
||||
EventTargetAttachedToTarget = "Target.attachedToTarget"
|
||||
@@ -758,12 +785,24 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case CommandAccessibilityGetFullAXTree:
|
||||
v = new(accessibility.GetFullAXTreeReturns)
|
||||
|
||||
case CommandAccessibilityGetRootAXNode:
|
||||
v = new(accessibility.GetRootAXNodeReturns)
|
||||
|
||||
case CommandAccessibilityGetAXNodeAndAncestors:
|
||||
v = new(accessibility.GetAXNodeAndAncestorsReturns)
|
||||
|
||||
case CommandAccessibilityGetChildAXNodes:
|
||||
v = new(accessibility.GetChildAXNodesReturns)
|
||||
|
||||
case CommandAccessibilityQueryAXTree:
|
||||
v = new(accessibility.QueryAXTreeReturns)
|
||||
|
||||
case EventAccessibilityLoadComplete:
|
||||
v = new(accessibility.EventLoadComplete)
|
||||
|
||||
case EventAccessibilityNodesUpdated:
|
||||
v = new(accessibility.EventNodesUpdated)
|
||||
|
||||
case CommandAnimationDisable:
|
||||
return emptyVal, nil
|
||||
|
||||
@@ -803,24 +842,6 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case EventAnimationAnimationStarted:
|
||||
v = new(animation.EventAnimationStarted)
|
||||
|
||||
case CommandApplicationCacheEnable:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandApplicationCacheGetApplicationCacheForFrame:
|
||||
v = new(applicationcache.GetApplicationCacheForFrameReturns)
|
||||
|
||||
case CommandApplicationCacheGetFramesWithManifests:
|
||||
v = new(applicationcache.GetFramesWithManifestsReturns)
|
||||
|
||||
case CommandApplicationCacheGetManifestForFrame:
|
||||
v = new(applicationcache.GetManifestForFrameReturns)
|
||||
|
||||
case EventApplicationCacheApplicationCacheStatusUpdated:
|
||||
v = new(applicationcache.EventApplicationCacheStatusUpdated)
|
||||
|
||||
case EventApplicationCacheNetworkStateUpdated:
|
||||
v = new(applicationcache.EventNetworkStateUpdated)
|
||||
|
||||
case CommandAuditsGetEncodedResponse:
|
||||
v = new(audits.GetEncodedResponseReturns)
|
||||
|
||||
@@ -950,6 +971,9 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case CommandCSSGetStyleSheetText:
|
||||
v = new(css.GetStyleSheetTextReturns)
|
||||
|
||||
case CommandCSSGetLayersForNode:
|
||||
v = new(css.GetLayersForNodeReturns)
|
||||
|
||||
case CommandCSSTrackComputedStyleUpdates:
|
||||
return emptyVal, nil
|
||||
|
||||
@@ -968,6 +992,12 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case CommandCSSSetContainerQueryText:
|
||||
v = new(css.SetContainerQueryTextReturns)
|
||||
|
||||
case CommandCSSSetSupportsText:
|
||||
v = new(css.SetSupportsTextReturns)
|
||||
|
||||
case CommandCSSSetScopeText:
|
||||
v = new(css.SetScopeTextReturns)
|
||||
|
||||
case CommandCSSSetRuleSelector:
|
||||
v = new(css.SetRuleSelectorReturns)
|
||||
|
||||
@@ -1028,6 +1058,9 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case CommandCastSetSinkToUse:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandCastStartDesktopMirroring:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandCastStartTabMirroring:
|
||||
return emptyVal, nil
|
||||
|
||||
@@ -1103,8 +1136,8 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case CommandDOMPushNodeByPathToFrontend:
|
||||
v = new(dom.PushNodeByPathToFrontendReturns)
|
||||
|
||||
case CommandDOMPushNodesByBackendIdsToFrontend:
|
||||
v = new(dom.PushNodesByBackendIdsToFrontendReturns)
|
||||
case CommandDOMPushNodesByBackendIDsToFrontend:
|
||||
v = new(dom.PushNodesByBackendIDsToFrontendReturns)
|
||||
|
||||
case CommandDOMQuerySelector:
|
||||
v = new(dom.QuerySelectorReturns)
|
||||
@@ -1112,6 +1145,9 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case CommandDOMQuerySelectorAll:
|
||||
v = new(dom.QuerySelectorAllReturns)
|
||||
|
||||
case CommandDOMGetTopLayerElements:
|
||||
v = new(dom.GetTopLayerElementsReturns)
|
||||
|
||||
case CommandDOMRedo:
|
||||
return emptyVal, nil
|
||||
|
||||
@@ -1166,6 +1202,12 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case CommandDOMGetFrameOwner:
|
||||
v = new(dom.GetFrameOwnerReturns)
|
||||
|
||||
case CommandDOMGetContainerForNode:
|
||||
v = new(dom.GetContainerForNodeReturns)
|
||||
|
||||
case CommandDOMGetQueryingDescendantsForContainer:
|
||||
v = new(dom.GetQueryingDescendantsForContainerReturns)
|
||||
|
||||
case EventDOMAttributeModified:
|
||||
v = new(dom.EventAttributeModified)
|
||||
|
||||
@@ -1196,6 +1238,9 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case EventDOMPseudoElementAdded:
|
||||
v = new(dom.EventPseudoElementAdded)
|
||||
|
||||
case EventDOMTopLayerElementsUpdated:
|
||||
v = new(dom.EventTopLayerElementsUpdated)
|
||||
|
||||
case EventDOMPseudoElementRemoved:
|
||||
v = new(dom.EventPseudoElementRemoved)
|
||||
|
||||
@@ -1310,6 +1355,12 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case CommandDebuggerGetScriptSource:
|
||||
v = new(debugger.GetScriptSourceReturns)
|
||||
|
||||
case CommandDebuggerDisassembleWasmModule:
|
||||
v = new(debugger.DisassembleWasmModuleReturns)
|
||||
|
||||
case CommandDebuggerNextWasmDisassemblyChunk:
|
||||
v = new(debugger.NextWasmDisassemblyChunkReturns)
|
||||
|
||||
case CommandDebuggerGetStackTrace:
|
||||
v = new(debugger.GetStackTraceReturns)
|
||||
|
||||
@@ -1319,6 +1370,9 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case CommandDebuggerRemoveBreakpoint:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandDebuggerRestartFrame:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandDebuggerResume:
|
||||
return emptyVal, nil
|
||||
|
||||
@@ -1409,6 +1463,9 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case CommandEmulationSetFocusEmulationEnabled:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandEmulationSetAutoDarkModeOverride:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandEmulationSetCPUThrottlingRate:
|
||||
return emptyVal, nil
|
||||
|
||||
@@ -1463,12 +1520,24 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case CommandEmulationSetDisabledImageTypes:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandEmulationSetHardwareConcurrencyOverride:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandEmulationSetUserAgentOverride:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandEmulationSetAutomationOverride:
|
||||
return emptyVal, nil
|
||||
|
||||
case EventEmulationVirtualTimeBudgetExpired:
|
||||
v = new(emulation.EventVirtualTimeBudgetExpired)
|
||||
|
||||
case CommandEventBreakpointsSetInstrumentationBreakpoint:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandEventBreakpointsRemoveInstrumentationBreakpoint:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandFetchDisable:
|
||||
return emptyVal, nil
|
||||
|
||||
@@ -1487,6 +1556,9 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case CommandFetchContinueWithAuth:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandFetchContinueResponse:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandFetchGetResponseBody:
|
||||
v = new(fetch.GetResponseBodyReturns)
|
||||
|
||||
@@ -1604,6 +1676,9 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case CommandInputInsertText:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandInputImeSetComposition:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandInputDispatchMouseEvent:
|
||||
return emptyVal, nil
|
||||
|
||||
@@ -1823,6 +1898,9 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case CommandNetworkGetSecurityIsolationStatus:
|
||||
v = new(network.GetSecurityIsolationStatusReturns)
|
||||
|
||||
case CommandNetworkEnableReportingAPI:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandNetworkLoadNetworkResource:
|
||||
v = new(network.LoadNetworkResourceReturns)
|
||||
|
||||
@@ -1904,6 +1982,15 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case EventNetworkSubresourceWebBundleInnerResponseError:
|
||||
v = new(network.EventSubresourceWebBundleInnerResponseError)
|
||||
|
||||
case EventNetworkReportingAPIReportAdded:
|
||||
v = new(network.EventReportingAPIReportAdded)
|
||||
|
||||
case EventNetworkReportingAPIReportUpdated:
|
||||
v = new(network.EventReportingAPIReportUpdated)
|
||||
|
||||
case EventNetworkReportingAPIEndpointsChangedForOrigin:
|
||||
v = new(network.EventReportingAPIEndpointsChangedForOrigin)
|
||||
|
||||
case CommandOverlayDisable:
|
||||
return emptyVal, nil
|
||||
|
||||
@@ -1922,9 +2009,6 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case CommandOverlayHideHighlight:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandOverlayHighlightFrame:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandOverlayHighlightNode:
|
||||
return emptyVal, nil
|
||||
|
||||
@@ -1961,6 +2045,9 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case CommandOverlaySetShowScrollSnapOverlays:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandOverlaySetShowContainerQueryOverlays:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandOverlaySetShowPaintRects:
|
||||
return emptyVal, nil
|
||||
|
||||
@@ -1970,9 +2057,6 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case CommandOverlaySetShowScrollBottleneckRects:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandOverlaySetShowHitTestBorders:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandOverlaySetShowWebVitals:
|
||||
return emptyVal, nil
|
||||
|
||||
@@ -1982,6 +2066,9 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case CommandOverlaySetShowHinge:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandOverlaySetShowIsolatedElements:
|
||||
return emptyVal, nil
|
||||
|
||||
case EventOverlayInspectNodeRequested:
|
||||
v = new(overlay.EventInspectNodeRequested)
|
||||
|
||||
@@ -2024,6 +2111,12 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case CommandPageGetManifestIcons:
|
||||
v = new(page.GetManifestIconsReturns)
|
||||
|
||||
case CommandPageGetAppID:
|
||||
v = new(page.GetAppIDReturns)
|
||||
|
||||
case CommandPageGetAdScriptID:
|
||||
v = new(page.GetAdScriptIDReturns)
|
||||
|
||||
case CommandPageGetFrameTree:
|
||||
v = new(page.GetFrameTreeReturns)
|
||||
|
||||
@@ -2075,6 +2168,9 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case CommandPageGetPermissionsPolicyState:
|
||||
v = new(page.GetPermissionsPolicyStateReturns)
|
||||
|
||||
case CommandPageGetOriginTrials:
|
||||
v = new(page.GetOriginTrialsReturns)
|
||||
|
||||
case CommandPageSetFontFamilies:
|
||||
return emptyVal, nil
|
||||
|
||||
@@ -2108,9 +2204,6 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case CommandPageStopScreencast:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandPageSetProduceCompilationCache:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandPageProduceCompilationCache:
|
||||
return emptyVal, nil
|
||||
|
||||
@@ -2120,6 +2213,9 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case CommandPageClearCompilationCache:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandPageSetSPCTransactionMode:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandPageGenerateTestReport:
|
||||
return emptyVal, nil
|
||||
|
||||
@@ -2177,6 +2273,9 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case EventPageBackForwardCacheNotUsed:
|
||||
v = new(page.EventBackForwardCacheNotUsed)
|
||||
|
||||
case EventPagePrerenderAttemptCompleted:
|
||||
v = new(page.EventPrerenderAttemptCompleted)
|
||||
|
||||
case EventPageLoadEventFired:
|
||||
v = new(page.EventLoadEventFired)
|
||||
|
||||
@@ -2231,42 +2330,15 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case CommandProfilerStartPreciseCoverage:
|
||||
v = new(profiler.StartPreciseCoverageReturns)
|
||||
|
||||
case CommandProfilerStartTypeProfile:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandProfilerStop:
|
||||
v = new(profiler.StopReturns)
|
||||
|
||||
case CommandProfilerStopPreciseCoverage:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandProfilerStopTypeProfile:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandProfilerTakePreciseCoverage:
|
||||
v = new(profiler.TakePreciseCoverageReturns)
|
||||
|
||||
case CommandProfilerTakeTypeProfile:
|
||||
v = new(profiler.TakeTypeProfileReturns)
|
||||
|
||||
case CommandProfilerEnableCounters:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandProfilerDisableCounters:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandProfilerGetCounters:
|
||||
v = new(profiler.GetCountersReturns)
|
||||
|
||||
case CommandProfilerEnableRuntimeCallStats:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandProfilerDisableRuntimeCallStats:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandProfilerGetRuntimeCallStats:
|
||||
v = new(profiler.GetRuntimeCallStatsReturns)
|
||||
|
||||
case EventProfilerConsoleProfileFinished:
|
||||
v = new(profiler.EventConsoleProfileFinished)
|
||||
|
||||
@@ -2339,6 +2411,9 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case CommandRuntimeRemoveBinding:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandRuntimeGetExceptionDetails:
|
||||
v = new(runtime.GetExceptionDetailsReturns)
|
||||
|
||||
case EventRuntimeBindingCalled:
|
||||
v = new(runtime.EventBindingCalled)
|
||||
|
||||
@@ -2375,9 +2450,6 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case EventSecurityVisibleSecurityStateChanged:
|
||||
v = new(security.EventVisibleSecurityStateChanged)
|
||||
|
||||
case EventSecuritySecurityStateChanged:
|
||||
v = new(security.EventSecurityStateChanged)
|
||||
|
||||
case CommandServiceWorkerDeliverPushMessage:
|
||||
return emptyVal, nil
|
||||
|
||||
@@ -2426,9 +2498,15 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case EventServiceWorkerWorkerVersionUpdated:
|
||||
v = new(serviceworker.EventWorkerVersionUpdated)
|
||||
|
||||
case CommandStorageGetStorageKeyForFrame:
|
||||
v = new(storage.GetStorageKeyForFrameReturns)
|
||||
|
||||
case CommandStorageClearDataForOrigin:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandStorageClearDataForStorageKey:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandStorageGetCookies:
|
||||
v = new(storage.GetCookiesReturns)
|
||||
|
||||
@@ -2450,18 +2528,39 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case CommandStorageTrackIndexedDBForOrigin:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandStorageTrackIndexedDBForStorageKey:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandStorageUntrackCacheStorageForOrigin:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandStorageUntrackIndexedDBForOrigin:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandStorageUntrackIndexedDBForStorageKey:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandStorageGetTrustTokens:
|
||||
v = new(storage.GetTrustTokensReturns)
|
||||
|
||||
case CommandStorageClearTrustTokens:
|
||||
v = new(storage.ClearTrustTokensReturns)
|
||||
|
||||
case CommandStorageGetInterestGroupDetails:
|
||||
v = new(storage.GetInterestGroupDetailsReturns)
|
||||
|
||||
case CommandStorageSetInterestGroupTracking:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandStorageGetSharedStorageMetadata:
|
||||
v = new(storage.GetSharedStorageMetadataReturns)
|
||||
|
||||
case CommandStorageGetSharedStorageEntries:
|
||||
v = new(storage.GetSharedStorageEntriesReturns)
|
||||
|
||||
case CommandStorageSetSharedStorageTracking:
|
||||
return emptyVal, nil
|
||||
|
||||
case EventStorageCacheStorageContentUpdated:
|
||||
v = new(storage.EventCacheStorageContentUpdated)
|
||||
|
||||
@@ -2474,6 +2573,12 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case EventStorageIndexedDBListUpdated:
|
||||
v = new(storage.EventIndexedDBListUpdated)
|
||||
|
||||
case EventStorageInterestGroupAccessed:
|
||||
v = new(storage.EventInterestGroupAccessed)
|
||||
|
||||
case EventStorageSharedStorageAccessed:
|
||||
v = new(storage.EventSharedStorageAccessed)
|
||||
|
||||
case CommandSystemInfoGetInfo:
|
||||
v = new(systeminfo.GetInfoReturns)
|
||||
|
||||
@@ -2519,6 +2624,9 @@ func UnmarshalMessage(msg *Message) (interface{}, error) {
|
||||
case CommandTargetSetAutoAttach:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandTargetAutoAttachRelated:
|
||||
return emptyVal, nil
|
||||
|
||||
case CommandTargetSetDiscoverTargets:
|
||||
return emptyVal, nil
|
||||
|
||||
|
||||
328
vendor/github.com/chromedp/cdproto/css/css.go
generated
vendored
328
vendor/github.com/chromedp/cdproto/css/css.go
generated
vendored
@@ -35,9 +35,10 @@ type AddRuleParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-addRule
|
||||
//
|
||||
// parameters:
|
||||
// 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.
|
||||
//
|
||||
// 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.
|
||||
func AddRule(styleSheetID StyleSheetID, ruleText string, location *SourceRange) *AddRuleParams {
|
||||
return &AddRuleParams{
|
||||
StyleSheetID: styleSheetID,
|
||||
@@ -54,7 +55,8 @@ type AddRuleReturns struct {
|
||||
// Do executes CSS.addRule against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// rule - The newly created rule.
|
||||
//
|
||||
// rule - The newly created rule.
|
||||
func (p *AddRuleParams) Do(ctx context.Context) (rule *Rule, err error) {
|
||||
// execute
|
||||
var res AddRuleReturns
|
||||
@@ -76,7 +78,8 @@ type CollectClassNamesParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-collectClassNames
|
||||
//
|
||||
// parameters:
|
||||
// styleSheetID
|
||||
//
|
||||
// styleSheetID
|
||||
func CollectClassNames(styleSheetID StyleSheetID) *CollectClassNamesParams {
|
||||
return &CollectClassNamesParams{
|
||||
StyleSheetID: styleSheetID,
|
||||
@@ -91,7 +94,8 @@ type CollectClassNamesReturns struct {
|
||||
// Do executes CSS.collectClassNames against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// classNames - Class name list.
|
||||
//
|
||||
// classNames - Class name list.
|
||||
func (p *CollectClassNamesParams) Do(ctx context.Context) (classNames []string, err error) {
|
||||
// execute
|
||||
var res CollectClassNamesReturns
|
||||
@@ -115,7 +119,8 @@ type CreateStyleSheetParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-createStyleSheet
|
||||
//
|
||||
// parameters:
|
||||
// frameID - Identifier of the frame where "via-inspector" stylesheet should be created.
|
||||
//
|
||||
// frameID - Identifier of the frame where "via-inspector" stylesheet should be created.
|
||||
func CreateStyleSheet(frameID cdp.FrameID) *CreateStyleSheetParams {
|
||||
return &CreateStyleSheetParams{
|
||||
FrameID: frameID,
|
||||
@@ -130,7 +135,8 @@ type CreateStyleSheetReturns struct {
|
||||
// Do executes CSS.createStyleSheet against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// styleSheetID - Identifier of the created "via-inspector" stylesheet.
|
||||
//
|
||||
// styleSheetID - Identifier of the created "via-inspector" stylesheet.
|
||||
func (p *CreateStyleSheetParams) Do(ctx context.Context) (styleSheetID StyleSheetID, err error) {
|
||||
// execute
|
||||
var res CreateStyleSheetReturns
|
||||
@@ -189,8 +195,9 @@ type ForcePseudoStateParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-forcePseudoState
|
||||
//
|
||||
// parameters:
|
||||
// nodeID - The element id for which to force the pseudo state.
|
||||
// forcedPseudoClasses - Element pseudo classes to force when computing the element's style.
|
||||
//
|
||||
// nodeID - The element id for which to force the pseudo state.
|
||||
// forcedPseudoClasses - Element pseudo classes to force when computing the element's style.
|
||||
func ForcePseudoState(nodeID cdp.NodeID, forcedPseudoClasses []string) *ForcePseudoStateParams {
|
||||
return &ForcePseudoStateParams{
|
||||
NodeID: nodeID,
|
||||
@@ -213,7 +220,8 @@ type GetBackgroundColorsParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-getBackgroundColors
|
||||
//
|
||||
// parameters:
|
||||
// nodeID - Id of the node to get background colors for.
|
||||
//
|
||||
// nodeID - Id of the node to get background colors for.
|
||||
func GetBackgroundColors(nodeID cdp.NodeID) *GetBackgroundColorsParams {
|
||||
return &GetBackgroundColorsParams{
|
||||
NodeID: nodeID,
|
||||
@@ -230,9 +238,10 @@ type GetBackgroundColorsReturns struct {
|
||||
// Do executes CSS.getBackgroundColors against the provided context.
|
||||
//
|
||||
// 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').
|
||||
//
|
||||
// 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 (p *GetBackgroundColorsParams) Do(ctx context.Context) (backgroundColors []string, computedFontSize string, computedFontWeight string, err error) {
|
||||
// execute
|
||||
var res GetBackgroundColorsReturns
|
||||
@@ -256,7 +265,8 @@ type GetComputedStyleForNodeParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-getComputedStyleForNode
|
||||
//
|
||||
// parameters:
|
||||
// nodeID
|
||||
//
|
||||
// nodeID
|
||||
func GetComputedStyleForNode(nodeID cdp.NodeID) *GetComputedStyleForNodeParams {
|
||||
return &GetComputedStyleForNodeParams{
|
||||
NodeID: nodeID,
|
||||
@@ -271,7 +281,8 @@ type GetComputedStyleForNodeReturns struct {
|
||||
// Do executes CSS.getComputedStyleForNode against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// computedStyle - Computed style for the specified DOM node.
|
||||
//
|
||||
// computedStyle - Computed style for the specified DOM node.
|
||||
func (p *GetComputedStyleForNodeParams) Do(ctx context.Context) (computedStyle []*ComputedStyleProperty, err error) {
|
||||
// execute
|
||||
var res GetComputedStyleForNodeReturns
|
||||
@@ -297,7 +308,8 @@ type GetInlineStylesForNodeParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-getInlineStylesForNode
|
||||
//
|
||||
// parameters:
|
||||
// nodeID
|
||||
//
|
||||
// nodeID
|
||||
func GetInlineStylesForNode(nodeID cdp.NodeID) *GetInlineStylesForNodeParams {
|
||||
return &GetInlineStylesForNodeParams{
|
||||
NodeID: nodeID,
|
||||
@@ -313,8 +325,9 @@ type GetInlineStylesForNodeReturns struct {
|
||||
// Do executes CSS.getInlineStylesForNode against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// inlineStyle - Inline style for the specified DOM node.
|
||||
// attributesStyle - Attribute-defined element style (e.g. resulting from "width=20 height=100%").
|
||||
//
|
||||
// inlineStyle - Inline style for the specified DOM node.
|
||||
// attributesStyle - Attribute-defined element style (e.g. resulting from "width=20 height=100%").
|
||||
func (p *GetInlineStylesForNodeParams) Do(ctx context.Context) (inlineStyle *Style, attributesStyle *Style, err error) {
|
||||
// execute
|
||||
var res GetInlineStylesForNodeReturns
|
||||
@@ -338,7 +351,8 @@ type GetMatchedStylesForNodeParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-getMatchedStylesForNode
|
||||
//
|
||||
// parameters:
|
||||
// nodeID
|
||||
//
|
||||
// nodeID
|
||||
func GetMatchedStylesForNode(nodeID cdp.NodeID) *GetMatchedStylesForNodeParams {
|
||||
return &GetMatchedStylesForNodeParams{
|
||||
NodeID: nodeID,
|
||||
@@ -347,32 +361,37 @@ func GetMatchedStylesForNode(nodeID cdp.NodeID) *GetMatchedStylesForNodeParams {
|
||||
|
||||
// GetMatchedStylesForNodeReturns return values.
|
||||
type GetMatchedStylesForNodeReturns struct {
|
||||
InlineStyle *Style `json:"inlineStyle,omitempty"` // Inline style for the specified DOM node.
|
||||
AttributesStyle *Style `json:"attributesStyle,omitempty"` // Attribute-defined element style (e.g. resulting from "width=20 height=100%").
|
||||
MatchedCSSRules []*RuleMatch `json:"matchedCSSRules,omitempty"` // CSS rules matching this node, from all applicable stylesheets.
|
||||
PseudoElements []*PseudoElementMatches `json:"pseudoElements,omitempty"` // Pseudo style matches for this node.
|
||||
Inherited []*InheritedStyleEntry `json:"inherited,omitempty"` // A chain of inherited styles (from the immediate node parent up to the DOM tree root).
|
||||
CSSKeyframesRules []*KeyframesRule `json:"cssKeyframesRules,omitempty"` // A list of CSS keyframed animations matching this node.
|
||||
InlineStyle *Style `json:"inlineStyle,omitempty"` // Inline style for the specified DOM node.
|
||||
AttributesStyle *Style `json:"attributesStyle,omitempty"` // Attribute-defined element style (e.g. resulting from "width=20 height=100%").
|
||||
MatchedCSSRules []*RuleMatch `json:"matchedCSSRules,omitempty"` // CSS rules matching this node, from all applicable stylesheets.
|
||||
PseudoElements []*PseudoElementMatches `json:"pseudoElements,omitempty"` // Pseudo style matches for this node.
|
||||
Inherited []*InheritedStyleEntry `json:"inherited,omitempty"` // A chain of inherited styles (from the immediate node parent up to the DOM tree root).
|
||||
InheritedPseudoElements []*InheritedPseudoElementMatches `json:"inheritedPseudoElements,omitempty"` // A chain of inherited pseudo element styles (from the immediate node parent up to the DOM tree root).
|
||||
CSSKeyframesRules []*KeyframesRule `json:"cssKeyframesRules,omitempty"` // A list of CSS keyframed animations matching this node.
|
||||
ParentLayoutNodeID cdp.NodeID `json:"parentLayoutNodeId,omitempty"` // Id of the first parent element that does not have display: contents.
|
||||
}
|
||||
|
||||
// Do executes CSS.getMatchedStylesForNode against the provided context.
|
||||
//
|
||||
// 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).
|
||||
// cssKeyframesRules - A list of CSS keyframed animations matching this node.
|
||||
func (p *GetMatchedStylesForNodeParams) Do(ctx context.Context) (inlineStyle *Style, attributesStyle *Style, matchedCSSRules []*RuleMatch, pseudoElements []*PseudoElementMatches, inherited []*InheritedStyleEntry, cssKeyframesRules []*KeyframesRule, err error) {
|
||||
//
|
||||
// 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.
|
||||
// parentLayoutNodeID - Id of the first parent element that does not have display: contents.
|
||||
func (p *GetMatchedStylesForNodeParams) Do(ctx context.Context) (inlineStyle *Style, attributesStyle *Style, matchedCSSRules []*RuleMatch, pseudoElements []*PseudoElementMatches, inherited []*InheritedStyleEntry, inheritedPseudoElements []*InheritedPseudoElementMatches, cssKeyframesRules []*KeyframesRule, parentLayoutNodeID cdp.NodeID, err error) {
|
||||
// execute
|
||||
var res GetMatchedStylesForNodeReturns
|
||||
err = cdp.Execute(ctx, CommandGetMatchedStylesForNode, p, &res)
|
||||
if err != nil {
|
||||
return nil, nil, nil, nil, nil, nil, err
|
||||
return nil, nil, nil, nil, nil, nil, nil, 0, err
|
||||
}
|
||||
|
||||
return res.InlineStyle, res.AttributesStyle, res.MatchedCSSRules, res.PseudoElements, res.Inherited, res.CSSKeyframesRules, nil
|
||||
return res.InlineStyle, res.AttributesStyle, res.MatchedCSSRules, res.PseudoElements, res.Inherited, res.InheritedPseudoElements, res.CSSKeyframesRules, res.ParentLayoutNodeID, nil
|
||||
}
|
||||
|
||||
// GetMediaQueriesParams returns all media queries parsed by the rendering
|
||||
@@ -394,7 +413,8 @@ type GetMediaQueriesReturns struct {
|
||||
// Do executes CSS.getMediaQueries against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// medias
|
||||
//
|
||||
// medias
|
||||
func (p *GetMediaQueriesParams) Do(ctx context.Context) (medias []*Media, err error) {
|
||||
// execute
|
||||
var res GetMediaQueriesReturns
|
||||
@@ -418,7 +438,8 @@ type GetPlatformFontsForNodeParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-getPlatformFontsForNode
|
||||
//
|
||||
// parameters:
|
||||
// nodeID
|
||||
//
|
||||
// nodeID
|
||||
func GetPlatformFontsForNode(nodeID cdp.NodeID) *GetPlatformFontsForNodeParams {
|
||||
return &GetPlatformFontsForNodeParams{
|
||||
NodeID: nodeID,
|
||||
@@ -433,7 +454,8 @@ type GetPlatformFontsForNodeReturns struct {
|
||||
// Do executes CSS.getPlatformFontsForNode against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// fonts - Usage statistics for every employed platform font.
|
||||
//
|
||||
// fonts - Usage statistics for every employed platform font.
|
||||
func (p *GetPlatformFontsForNodeParams) Do(ctx context.Context) (fonts []*PlatformFontUsage, err error) {
|
||||
// execute
|
||||
var res GetPlatformFontsForNodeReturns
|
||||
@@ -456,7 +478,8 @@ type GetStyleSheetTextParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-getStyleSheetText
|
||||
//
|
||||
// parameters:
|
||||
// styleSheetID
|
||||
//
|
||||
// styleSheetID
|
||||
func GetStyleSheetText(styleSheetID StyleSheetID) *GetStyleSheetTextParams {
|
||||
return &GetStyleSheetTextParams{
|
||||
StyleSheetID: styleSheetID,
|
||||
@@ -471,7 +494,8 @@ type GetStyleSheetTextReturns struct {
|
||||
// Do executes CSS.getStyleSheetText against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// text - The stylesheet text.
|
||||
//
|
||||
// text - The stylesheet text.
|
||||
func (p *GetStyleSheetTextParams) Do(ctx context.Context) (text string, err error) {
|
||||
// execute
|
||||
var res GetStyleSheetTextReturns
|
||||
@@ -483,6 +507,53 @@ func (p *GetStyleSheetTextParams) Do(ctx context.Context) (text string, err erro
|
||||
return res.Text, nil
|
||||
}
|
||||
|
||||
// GetLayersForNodeParams 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.
|
||||
type GetLayersForNodeParams struct {
|
||||
NodeID cdp.NodeID `json:"nodeId"`
|
||||
}
|
||||
|
||||
// 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.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-getLayersForNode
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// nodeID
|
||||
func GetLayersForNode(nodeID cdp.NodeID) *GetLayersForNodeParams {
|
||||
return &GetLayersForNodeParams{
|
||||
NodeID: nodeID,
|
||||
}
|
||||
}
|
||||
|
||||
// GetLayersForNodeReturns return values.
|
||||
type GetLayersForNodeReturns struct {
|
||||
RootLayer *LayerData `json:"rootLayer,omitempty"`
|
||||
}
|
||||
|
||||
// Do executes CSS.getLayersForNode against the provided context.
|
||||
//
|
||||
// returns:
|
||||
//
|
||||
// rootLayer
|
||||
func (p *GetLayersForNodeParams) Do(ctx context.Context) (rootLayer *LayerData, err error) {
|
||||
// execute
|
||||
var res GetLayersForNodeReturns
|
||||
err = cdp.Execute(ctx, CommandGetLayersForNode, p, &res)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return res.RootLayer, nil
|
||||
}
|
||||
|
||||
// TrackComputedStyleUpdatesParams 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
|
||||
@@ -507,7 +578,8 @@ type TrackComputedStyleUpdatesParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-trackComputedStyleUpdates
|
||||
//
|
||||
// parameters:
|
||||
// propertiesToTrack
|
||||
//
|
||||
// propertiesToTrack
|
||||
func TrackComputedStyleUpdates(propertiesToTrack []*ComputedStyleProperty) *TrackComputedStyleUpdatesParams {
|
||||
return &TrackComputedStyleUpdatesParams{
|
||||
PropertiesToTrack: propertiesToTrack,
|
||||
@@ -532,14 +604,15 @@ func TakeComputedStyleUpdates() *TakeComputedStyleUpdatesParams {
|
||||
|
||||
// TakeComputedStyleUpdatesReturns return values.
|
||||
type TakeComputedStyleUpdatesReturns struct {
|
||||
NodeIds []cdp.NodeID `json:"nodeIds,omitempty"` // The list of node Ids that have their tracked computed styles updated
|
||||
NodeIDs []cdp.NodeID `json:"nodeIds,omitempty"` // The list of node Ids that have their tracked computed styles updated
|
||||
}
|
||||
|
||||
// Do executes CSS.takeComputedStyleUpdates against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// nodeIds - The list of node Ids that have their tracked computed styles updated
|
||||
func (p *TakeComputedStyleUpdatesParams) Do(ctx context.Context) (nodeIds []cdp.NodeID, err error) {
|
||||
//
|
||||
// nodeIDs - The list of node Ids that have their tracked computed styles updated
|
||||
func (p *TakeComputedStyleUpdatesParams) Do(ctx context.Context) (nodeIDs []cdp.NodeID, err error) {
|
||||
// execute
|
||||
var res TakeComputedStyleUpdatesReturns
|
||||
err = cdp.Execute(ctx, CommandTakeComputedStyleUpdates, nil, &res)
|
||||
@@ -547,7 +620,7 @@ func (p *TakeComputedStyleUpdatesParams) Do(ctx context.Context) (nodeIds []cdp.
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return res.NodeIds, nil
|
||||
return res.NodeIDs, nil
|
||||
}
|
||||
|
||||
// SetEffectivePropertyValueForNodeParams find a rule with the given active
|
||||
@@ -564,9 +637,10 @@ type SetEffectivePropertyValueForNodeParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-setEffectivePropertyValueForNode
|
||||
//
|
||||
// parameters:
|
||||
// nodeID - The element id for which to set property.
|
||||
// propertyName
|
||||
// value
|
||||
//
|
||||
// nodeID - The element id for which to set property.
|
||||
// propertyName
|
||||
// value
|
||||
func SetEffectivePropertyValueForNode(nodeID cdp.NodeID, propertyName string, value string) *SetEffectivePropertyValueForNodeParams {
|
||||
return &SetEffectivePropertyValueForNodeParams{
|
||||
NodeID: nodeID,
|
||||
@@ -592,9 +666,10 @@ type SetKeyframeKeyParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-setKeyframeKey
|
||||
//
|
||||
// parameters:
|
||||
// styleSheetID
|
||||
// range
|
||||
// keyText
|
||||
//
|
||||
// styleSheetID
|
||||
// range
|
||||
// keyText
|
||||
func SetKeyframeKey(styleSheetID StyleSheetID, rangeVal *SourceRange, keyText string) *SetKeyframeKeyParams {
|
||||
return &SetKeyframeKeyParams{
|
||||
StyleSheetID: styleSheetID,
|
||||
@@ -611,7 +686,8 @@ type SetKeyframeKeyReturns struct {
|
||||
// Do executes CSS.setKeyframeKey against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// keyText - The resulting key text after modification.
|
||||
//
|
||||
// keyText - The resulting key text after modification.
|
||||
func (p *SetKeyframeKeyParams) Do(ctx context.Context) (keyText *Value, err error) {
|
||||
// execute
|
||||
var res SetKeyframeKeyReturns
|
||||
@@ -635,9 +711,10 @@ type SetMediaTextParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-setMediaText
|
||||
//
|
||||
// parameters:
|
||||
// styleSheetID
|
||||
// range
|
||||
// text
|
||||
//
|
||||
// styleSheetID
|
||||
// range
|
||||
// text
|
||||
func SetMediaText(styleSheetID StyleSheetID, rangeVal *SourceRange, text string) *SetMediaTextParams {
|
||||
return &SetMediaTextParams{
|
||||
StyleSheetID: styleSheetID,
|
||||
@@ -654,7 +731,8 @@ type SetMediaTextReturns struct {
|
||||
// Do executes CSS.setMediaText against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// media - The resulting CSS media rule after modification.
|
||||
//
|
||||
// media - The resulting CSS media rule after modification.
|
||||
func (p *SetMediaTextParams) Do(ctx context.Context) (media *Media, err error) {
|
||||
// execute
|
||||
var res SetMediaTextReturns
|
||||
@@ -678,9 +756,10 @@ type SetContainerQueryTextParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-setContainerQueryText
|
||||
//
|
||||
// parameters:
|
||||
// styleSheetID
|
||||
// range
|
||||
// text
|
||||
//
|
||||
// styleSheetID
|
||||
// range
|
||||
// text
|
||||
func SetContainerQueryText(styleSheetID StyleSheetID, rangeVal *SourceRange, text string) *SetContainerQueryTextParams {
|
||||
return &SetContainerQueryTextParams{
|
||||
StyleSheetID: styleSheetID,
|
||||
@@ -697,7 +776,8 @@ type SetContainerQueryTextReturns struct {
|
||||
// Do executes CSS.setContainerQueryText against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// containerQuery - The resulting CSS container query rule after modification.
|
||||
//
|
||||
// containerQuery - The resulting CSS container query rule after modification.
|
||||
func (p *SetContainerQueryTextParams) Do(ctx context.Context) (containerQuery *ContainerQuery, err error) {
|
||||
// execute
|
||||
var res SetContainerQueryTextReturns
|
||||
@@ -709,6 +789,96 @@ func (p *SetContainerQueryTextParams) Do(ctx context.Context) (containerQuery *C
|
||||
return res.ContainerQuery, nil
|
||||
}
|
||||
|
||||
// SetSupportsTextParams modifies the expression of a supports at-rule.
|
||||
type SetSupportsTextParams struct {
|
||||
StyleSheetID StyleSheetID `json:"styleSheetId"`
|
||||
Range *SourceRange `json:"range"`
|
||||
Text string `json:"text"`
|
||||
}
|
||||
|
||||
// SetSupportsText modifies the expression of a supports at-rule.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-setSupportsText
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// styleSheetID
|
||||
// range
|
||||
// text
|
||||
func SetSupportsText(styleSheetID StyleSheetID, rangeVal *SourceRange, text string) *SetSupportsTextParams {
|
||||
return &SetSupportsTextParams{
|
||||
StyleSheetID: styleSheetID,
|
||||
Range: rangeVal,
|
||||
Text: text,
|
||||
}
|
||||
}
|
||||
|
||||
// SetSupportsTextReturns return values.
|
||||
type SetSupportsTextReturns struct {
|
||||
Supports *Supports `json:"supports,omitempty"` // The resulting CSS Supports rule after modification.
|
||||
}
|
||||
|
||||
// Do executes CSS.setSupportsText against the provided context.
|
||||
//
|
||||
// returns:
|
||||
//
|
||||
// supports - The resulting CSS Supports rule after modification.
|
||||
func (p *SetSupportsTextParams) Do(ctx context.Context) (supports *Supports, err error) {
|
||||
// execute
|
||||
var res SetSupportsTextReturns
|
||||
err = cdp.Execute(ctx, CommandSetSupportsText, p, &res)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return res.Supports, nil
|
||||
}
|
||||
|
||||
// SetScopeTextParams modifies the expression of a scope at-rule.
|
||||
type SetScopeTextParams struct {
|
||||
StyleSheetID StyleSheetID `json:"styleSheetId"`
|
||||
Range *SourceRange `json:"range"`
|
||||
Text string `json:"text"`
|
||||
}
|
||||
|
||||
// SetScopeText modifies the expression of a scope at-rule.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-setScopeText
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// styleSheetID
|
||||
// range
|
||||
// text
|
||||
func SetScopeText(styleSheetID StyleSheetID, rangeVal *SourceRange, text string) *SetScopeTextParams {
|
||||
return &SetScopeTextParams{
|
||||
StyleSheetID: styleSheetID,
|
||||
Range: rangeVal,
|
||||
Text: text,
|
||||
}
|
||||
}
|
||||
|
||||
// SetScopeTextReturns return values.
|
||||
type SetScopeTextReturns struct {
|
||||
Scope *Scope `json:"scope,omitempty"` // The resulting CSS Scope rule after modification.
|
||||
}
|
||||
|
||||
// Do executes CSS.setScopeText against the provided context.
|
||||
//
|
||||
// returns:
|
||||
//
|
||||
// scope - The resulting CSS Scope rule after modification.
|
||||
func (p *SetScopeTextParams) Do(ctx context.Context) (scope *Scope, err error) {
|
||||
// execute
|
||||
var res SetScopeTextReturns
|
||||
err = cdp.Execute(ctx, CommandSetScopeText, p, &res)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return res.Scope, nil
|
||||
}
|
||||
|
||||
// SetRuleSelectorParams modifies the rule selector.
|
||||
type SetRuleSelectorParams struct {
|
||||
StyleSheetID StyleSheetID `json:"styleSheetId"`
|
||||
@@ -721,9 +891,10 @@ type SetRuleSelectorParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-setRuleSelector
|
||||
//
|
||||
// parameters:
|
||||
// styleSheetID
|
||||
// range
|
||||
// selector
|
||||
//
|
||||
// styleSheetID
|
||||
// range
|
||||
// selector
|
||||
func SetRuleSelector(styleSheetID StyleSheetID, rangeVal *SourceRange, selector string) *SetRuleSelectorParams {
|
||||
return &SetRuleSelectorParams{
|
||||
StyleSheetID: styleSheetID,
|
||||
@@ -740,7 +911,8 @@ type SetRuleSelectorReturns struct {
|
||||
// Do executes CSS.setRuleSelector against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// selectorList - The resulting selector list after modification.
|
||||
//
|
||||
// selectorList - The resulting selector list after modification.
|
||||
func (p *SetRuleSelectorParams) Do(ctx context.Context) (selectorList *SelectorList, err error) {
|
||||
// execute
|
||||
var res SetRuleSelectorReturns
|
||||
@@ -763,8 +935,9 @@ type SetStyleSheetTextParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-setStyleSheetText
|
||||
//
|
||||
// parameters:
|
||||
// styleSheetID
|
||||
// text
|
||||
//
|
||||
// styleSheetID
|
||||
// text
|
||||
func SetStyleSheetText(styleSheetID StyleSheetID, text string) *SetStyleSheetTextParams {
|
||||
return &SetStyleSheetTextParams{
|
||||
StyleSheetID: styleSheetID,
|
||||
@@ -780,7 +953,8 @@ type SetStyleSheetTextReturns struct {
|
||||
// Do executes CSS.setStyleSheetText against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// sourceMapURL - URL of source map associated with script (if any).
|
||||
//
|
||||
// sourceMapURL - URL of source map associated with script (if any).
|
||||
func (p *SetStyleSheetTextParams) Do(ctx context.Context) (sourceMapURL string, err error) {
|
||||
// execute
|
||||
var res SetStyleSheetTextReturns
|
||||
@@ -804,7 +978,8 @@ type SetStyleTextsParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-setStyleTexts
|
||||
//
|
||||
// parameters:
|
||||
// edits
|
||||
//
|
||||
// edits
|
||||
func SetStyleTexts(edits []*StyleDeclarationEdit) *SetStyleTextsParams {
|
||||
return &SetStyleTextsParams{
|
||||
Edits: edits,
|
||||
@@ -819,7 +994,8 @@ type SetStyleTextsReturns struct {
|
||||
// Do executes CSS.setStyleTexts against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// styles - The resulting styles after modification.
|
||||
//
|
||||
// styles - The resulting styles after modification.
|
||||
func (p *SetStyleTextsParams) Do(ctx context.Context) (styles []*Style, err error) {
|
||||
// execute
|
||||
var res SetStyleTextsReturns
|
||||
@@ -868,7 +1044,8 @@ type StopRuleUsageTrackingReturns struct {
|
||||
// Do executes CSS.stopRuleUsageTracking against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// ruleUsage
|
||||
//
|
||||
// ruleUsage
|
||||
func (p *StopRuleUsageTrackingParams) Do(ctx context.Context) (ruleUsage []*RuleUsage, err error) {
|
||||
// execute
|
||||
var res StopRuleUsageTrackingReturns
|
||||
@@ -901,8 +1078,9 @@ type TakeCoverageDeltaReturns struct {
|
||||
// Do executes CSS.takeCoverageDelta against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// coverage
|
||||
// timestamp - Monotonically increasing time, in seconds.
|
||||
//
|
||||
// coverage
|
||||
// timestamp - Monotonically increasing time, in seconds.
|
||||
func (p *TakeCoverageDeltaParams) Do(ctx context.Context) (coverage []*RuleUsage, timestamp float64, err error) {
|
||||
// execute
|
||||
var res TakeCoverageDeltaReturns
|
||||
@@ -926,7 +1104,8 @@ type SetLocalFontsEnabledParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#method-setLocalFontsEnabled
|
||||
//
|
||||
// parameters:
|
||||
// enabled - Whether rendering of local fonts is enabled.
|
||||
//
|
||||
// enabled - Whether rendering of local fonts is enabled.
|
||||
func SetLocalFontsEnabled(enabled bool) *SetLocalFontsEnabledParams {
|
||||
return &SetLocalFontsEnabledParams{
|
||||
Enabled: enabled,
|
||||
@@ -953,12 +1132,15 @@ const (
|
||||
CommandGetMediaQueries = "CSS.getMediaQueries"
|
||||
CommandGetPlatformFontsForNode = "CSS.getPlatformFontsForNode"
|
||||
CommandGetStyleSheetText = "CSS.getStyleSheetText"
|
||||
CommandGetLayersForNode = "CSS.getLayersForNode"
|
||||
CommandTrackComputedStyleUpdates = "CSS.trackComputedStyleUpdates"
|
||||
CommandTakeComputedStyleUpdates = "CSS.takeComputedStyleUpdates"
|
||||
CommandSetEffectivePropertyValueForNode = "CSS.setEffectivePropertyValueForNode"
|
||||
CommandSetKeyframeKey = "CSS.setKeyframeKey"
|
||||
CommandSetMediaText = "CSS.setMediaText"
|
||||
CommandSetContainerQueryText = "CSS.setContainerQueryText"
|
||||
CommandSetSupportsText = "CSS.setSupportsText"
|
||||
CommandSetScopeText = "CSS.setScopeText"
|
||||
CommandSetRuleSelector = "CSS.setRuleSelector"
|
||||
CommandSetStyleSheetText = "CSS.setStyleSheetText"
|
||||
CommandSetStyleTexts = "CSS.setStyleTexts"
|
||||
|
||||
2393
vendor/github.com/chromedp/cdproto/css/easyjson.go
generated
vendored
2393
vendor/github.com/chromedp/cdproto/css/easyjson.go
generated
vendored
File diff suppressed because it is too large
Load Diff
88
vendor/github.com/chromedp/cdproto/css/types.go
generated
vendored
88
vendor/github.com/chromedp/cdproto/css/types.go
generated
vendored
@@ -3,7 +3,7 @@ package css
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/chromedp/cdproto/cdp"
|
||||
"github.com/mailru/easyjson"
|
||||
@@ -54,7 +54,8 @@ func (t StyleSheetOrigin) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *StyleSheetOrigin) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch StyleSheetOrigin(in.String()) {
|
||||
v := in.String()
|
||||
switch StyleSheetOrigin(v) {
|
||||
case StyleSheetOriginInjected:
|
||||
*t = StyleSheetOriginInjected
|
||||
case StyleSheetOriginUserAgent:
|
||||
@@ -65,7 +66,7 @@ func (t *StyleSheetOrigin) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = StyleSheetOriginRegular
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown StyleSheetOrigin value"))
|
||||
in.AddError(fmt.Errorf("unknown StyleSheetOrigin value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,8 +79,9 @@ func (t *StyleSheetOrigin) UnmarshalJSON(buf []byte) error {
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-PseudoElementMatches
|
||||
type PseudoElementMatches struct {
|
||||
PseudoType cdp.PseudoType `json:"pseudoType"` // Pseudo element type.
|
||||
Matches []*RuleMatch `json:"matches"` // Matches of CSS rules applicable to the pseudo style.
|
||||
PseudoType cdp.PseudoType `json:"pseudoType"` // Pseudo element type.
|
||||
PseudoIdentifier string `json:"pseudoIdentifier,omitempty"` // Pseudo element custom ident.
|
||||
Matches []*RuleMatch `json:"matches"` // Matches of CSS rules applicable to the pseudo style.
|
||||
}
|
||||
|
||||
// InheritedStyleEntry inherited CSS rule collection from ancestor node.
|
||||
@@ -90,6 +92,14 @@ type InheritedStyleEntry struct {
|
||||
MatchedCSSRules []*RuleMatch `json:"matchedCSSRules"` // Matches of CSS rules matching the ancestor node in the style inheritance chain.
|
||||
}
|
||||
|
||||
// InheritedPseudoElementMatches inherited pseudo element matches from
|
||||
// pseudos of an ancestor node.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-InheritedPseudoElementMatches
|
||||
type InheritedPseudoElementMatches struct {
|
||||
PseudoElements []*PseudoElementMatches `json:"pseudoElements"` // Matches of pseudo styles from the pseudos of an ancestor node.
|
||||
}
|
||||
|
||||
// RuleMatch match data for a CSS rule.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-RuleMatch
|
||||
@@ -121,7 +131,7 @@ type SelectorList struct {
|
||||
type StyleSheetHeader struct {
|
||||
StyleSheetID StyleSheetID `json:"styleSheetId"` // The stylesheet identifier.
|
||||
FrameID cdp.FrameID `json:"frameId"` // Owner frame identifier.
|
||||
SourceURL string `json:"sourceURL"` // Stylesheet resource URL.
|
||||
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 StyleSheetOrigin `json:"origin"` // Stylesheet origin.
|
||||
Title string `json:"title"` // Stylesheet title.
|
||||
@@ -130,7 +140,7 @@ type StyleSheetHeader struct {
|
||||
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"` // Whether this stylesheet is a constructed stylesheet (created using new CSSStyleSheet()).
|
||||
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).
|
||||
@@ -148,6 +158,9 @@ type Rule struct {
|
||||
Style *Style `json:"style"` // Associated style declaration.
|
||||
Media []*Media `json:"media,omitempty"` // Media list array (for rules involving media queries). The array enumerates media queries starting with the innermost one, going outwards.
|
||||
ContainerQueries []*ContainerQuery `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 []*Supports `json:"supports,omitempty"` // @supports CSS at-rule array. The array enumerates @supports at-rules starting with the innermost one, going outwards.
|
||||
Layers []*Layer `json:"layers,omitempty"` // Cascade layer array. Contains the layer hierarchy that this rule belongs to starting with the innermost layer and going outwards.
|
||||
Scopes []*Scope `json:"scopes,omitempty"` // @scope CSS at-rule array. The array enumerates @scope at-rules starting with the innermost one, going outwards.
|
||||
}
|
||||
|
||||
// RuleUsage CSS coverage information.
|
||||
@@ -202,14 +215,15 @@ type Style struct {
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSProperty
|
||||
type Property 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 *SourceRange `json:"range,omitempty"` // The entire property range in the enclosing style declaration (if available).
|
||||
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 *SourceRange `json:"range,omitempty"` // The entire property range in the enclosing style declaration (if available).
|
||||
LonghandProperties []*Property `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.
|
||||
}
|
||||
|
||||
// Media CSS media rule descriptor.
|
||||
@@ -250,6 +264,44 @@ type ContainerQuery struct {
|
||||
Text string `json:"text"` // Container query text.
|
||||
Range *SourceRange `json:"range,omitempty"` // The associated rule header range in the enclosing stylesheet (if available).
|
||||
StyleSheetID StyleSheetID `json:"styleSheetId,omitempty"` // Identifier of the stylesheet containing this object (if exists).
|
||||
Name string `json:"name,omitempty"` // Optional name for the container.
|
||||
}
|
||||
|
||||
// Supports CSS Supports at-rule descriptor.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSSupports
|
||||
type Supports struct {
|
||||
Text string `json:"text"` // Supports rule text.
|
||||
Active bool `json:"active"` // Whether the supports condition is satisfied.
|
||||
Range *SourceRange `json:"range,omitempty"` // The associated rule header range in the enclosing stylesheet (if available).
|
||||
StyleSheetID StyleSheetID `json:"styleSheetId,omitempty"` // Identifier of the stylesheet containing this object (if exists).
|
||||
}
|
||||
|
||||
// Scope CSS Scope at-rule descriptor.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSScope
|
||||
type Scope struct {
|
||||
Text string `json:"text"` // Scope rule text.
|
||||
Range *SourceRange `json:"range,omitempty"` // The associated rule header range in the enclosing stylesheet (if available).
|
||||
StyleSheetID StyleSheetID `json:"styleSheetId,omitempty"` // Identifier of the stylesheet containing this object (if exists).
|
||||
}
|
||||
|
||||
// Layer CSS Layer at-rule descriptor.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSLayer
|
||||
type Layer struct {
|
||||
Text string `json:"text"` // Layer name.
|
||||
Range *SourceRange `json:"range,omitempty"` // The associated rule header range in the enclosing stylesheet (if available).
|
||||
StyleSheetID StyleSheetID `json:"styleSheetId,omitempty"` // Identifier of the stylesheet containing this object (if exists).
|
||||
}
|
||||
|
||||
// LayerData CSS Layer data.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/CSS#type-CSSLayerData
|
||||
type LayerData struct {
|
||||
Name string `json:"name"` // Layer name.
|
||||
SubLayers []*LayerData `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.
|
||||
}
|
||||
|
||||
// PlatformFontUsage information about amount of glyphs that were rendered
|
||||
@@ -285,6 +337,7 @@ type FontFace struct {
|
||||
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
|
||||
@@ -353,7 +406,8 @@ func (t MediaSource) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *MediaSource) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch MediaSource(in.String()) {
|
||||
v := in.String()
|
||||
switch MediaSource(v) {
|
||||
case MediaSourceMediaRule:
|
||||
*t = MediaSourceMediaRule
|
||||
case MediaSourceImportRule:
|
||||
@@ -364,7 +418,7 @@ func (t *MediaSource) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = MediaSourceInlineSheet
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown MediaSource value"))
|
||||
in.AddError(fmt.Errorf("unknown MediaSource value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
18
vendor/github.com/chromedp/cdproto/database/database.go
generated
vendored
18
vendor/github.com/chromedp/cdproto/database/database.go
generated
vendored
@@ -58,8 +58,9 @@ type ExecuteSQLParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Database#method-executeSQL
|
||||
//
|
||||
// parameters:
|
||||
// databaseID
|
||||
// query
|
||||
//
|
||||
// databaseID
|
||||
// query
|
||||
func ExecuteSQL(databaseID ID, query string) *ExecuteSQLParams {
|
||||
return &ExecuteSQLParams{
|
||||
DatabaseID: databaseID,
|
||||
@@ -77,9 +78,10 @@ type ExecuteSQLReturns struct {
|
||||
// Do executes Database.executeSQL against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// columnNames
|
||||
// values
|
||||
// sqlError
|
||||
//
|
||||
// columnNames
|
||||
// values
|
||||
// sqlError
|
||||
func (p *ExecuteSQLParams) Do(ctx context.Context) (columnNames []string, values []easyjson.RawMessage, sqlError *Error, err error) {
|
||||
// execute
|
||||
var res ExecuteSQLReturns
|
||||
@@ -101,7 +103,8 @@ type GetDatabaseTableNamesParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Database#method-getDatabaseTableNames
|
||||
//
|
||||
// parameters:
|
||||
// databaseID
|
||||
//
|
||||
// databaseID
|
||||
func GetDatabaseTableNames(databaseID ID) *GetDatabaseTableNamesParams {
|
||||
return &GetDatabaseTableNamesParams{
|
||||
DatabaseID: databaseID,
|
||||
@@ -116,7 +119,8 @@ type GetDatabaseTableNamesReturns struct {
|
||||
// Do executes Database.getDatabaseTableNames against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// tableNames
|
||||
//
|
||||
// tableNames
|
||||
func (p *GetDatabaseTableNamesParams) Do(ctx context.Context) (tableNames []string, err error) {
|
||||
// execute
|
||||
var res GetDatabaseTableNamesReturns
|
||||
|
||||
304
vendor/github.com/chromedp/cdproto/debugger/debugger.go
generated
vendored
304
vendor/github.com/chromedp/cdproto/debugger/debugger.go
generated
vendored
@@ -30,7 +30,8 @@ type ContinueToLocationParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-continueToLocation
|
||||
//
|
||||
// parameters:
|
||||
// location - Location to continue to.
|
||||
//
|
||||
// location - Location to continue to.
|
||||
func ContinueToLocation(location *Location) *ContinueToLocationParams {
|
||||
return &ContinueToLocationParams{
|
||||
Location: location,
|
||||
@@ -96,7 +97,8 @@ type EnableReturns struct {
|
||||
// Do executes Debugger.enable against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// debuggerID - Unique identifier of the debugger.
|
||||
//
|
||||
// debuggerID - Unique identifier of the debugger.
|
||||
func (p *EnableParams) Do(ctx context.Context) (debuggerID runtime.UniqueDebuggerID, err error) {
|
||||
// execute
|
||||
var res EnableReturns
|
||||
@@ -126,8 +128,9 @@ type EvaluateOnCallFrameParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-evaluateOnCallFrame
|
||||
//
|
||||
// parameters:
|
||||
// callFrameID - Call frame identifier to evaluate on.
|
||||
// expression - Expression to evaluate.
|
||||
//
|
||||
// callFrameID - Call frame identifier to evaluate on.
|
||||
// expression - Expression to evaluate.
|
||||
func EvaluateOnCallFrame(callFrameID CallFrameID, expression string) *EvaluateOnCallFrameParams {
|
||||
return &EvaluateOnCallFrameParams{
|
||||
CallFrameID: callFrameID,
|
||||
@@ -191,8 +194,9 @@ type EvaluateOnCallFrameReturns struct {
|
||||
// Do executes Debugger.evaluateOnCallFrame against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// result - Object wrapper for the evaluation result.
|
||||
// exceptionDetails - Exception details.
|
||||
//
|
||||
// result - Object wrapper for the evaluation result.
|
||||
// exceptionDetails - Exception details.
|
||||
func (p *EvaluateOnCallFrameParams) Do(ctx context.Context) (result *runtime.RemoteObject, exceptionDetails *runtime.ExceptionDetails, err error) {
|
||||
// execute
|
||||
var res EvaluateOnCallFrameReturns
|
||||
@@ -218,7 +222,8 @@ type GetPossibleBreakpointsParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-getPossibleBreakpoints
|
||||
//
|
||||
// parameters:
|
||||
// start - Start of range to search possible breakpoint locations in.
|
||||
//
|
||||
// start - Start of range to search possible breakpoint locations in.
|
||||
func GetPossibleBreakpoints(start *Location) *GetPossibleBreakpointsParams {
|
||||
return &GetPossibleBreakpointsParams{
|
||||
Start: start,
|
||||
@@ -247,7 +252,8 @@ type GetPossibleBreakpointsReturns struct {
|
||||
// Do executes Debugger.getPossibleBreakpoints against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// locations - List of the possible breakpoint locations.
|
||||
//
|
||||
// locations - List of the possible breakpoint locations.
|
||||
func (p *GetPossibleBreakpointsParams) Do(ctx context.Context) (locations []*BreakLocation, err error) {
|
||||
// execute
|
||||
var res GetPossibleBreakpointsReturns
|
||||
@@ -269,7 +275,8 @@ type GetScriptSourceParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-getScriptSource
|
||||
//
|
||||
// parameters:
|
||||
// scriptID - Id of the script to get source for.
|
||||
//
|
||||
// scriptID - Id of the script to get source for.
|
||||
func GetScriptSource(scriptID runtime.ScriptID) *GetScriptSourceParams {
|
||||
return &GetScriptSourceParams{
|
||||
ScriptID: scriptID,
|
||||
@@ -285,8 +292,9 @@ type GetScriptSourceReturns struct {
|
||||
// Do executes Debugger.getScriptSource against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// scriptSource - Script source (empty in case of Wasm bytecode).
|
||||
// bytecode - Wasm bytecode.
|
||||
//
|
||||
// scriptSource - Script source (empty in case of Wasm bytecode).
|
||||
// bytecode - Wasm bytecode.
|
||||
func (p *GetScriptSourceParams) Do(ctx context.Context) (scriptSource string, bytecode []byte, err error) {
|
||||
// execute
|
||||
var res GetScriptSourceReturns
|
||||
@@ -304,6 +312,96 @@ func (p *GetScriptSourceParams) Do(ctx context.Context) (scriptSource string, by
|
||||
return res.ScriptSource, dec, nil
|
||||
}
|
||||
|
||||
// DisassembleWasmModuleParams [no description].
|
||||
type DisassembleWasmModuleParams struct {
|
||||
ScriptID runtime.ScriptID `json:"scriptId"` // Id of the script to disassemble
|
||||
}
|
||||
|
||||
// DisassembleWasmModule [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-disassembleWasmModule
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// scriptID - Id of the script to disassemble
|
||||
func DisassembleWasmModule(scriptID runtime.ScriptID) *DisassembleWasmModuleParams {
|
||||
return &DisassembleWasmModuleParams{
|
||||
ScriptID: scriptID,
|
||||
}
|
||||
}
|
||||
|
||||
// DisassembleWasmModuleReturns return values.
|
||||
type DisassembleWasmModuleReturns struct {
|
||||
StreamID string `json:"streamId,omitempty"` // For large modules, return a stream from which additional chunks of disassembly can be read successively.
|
||||
TotalNumberOfLines int64 `json:"totalNumberOfLines,omitempty"` // The total number of lines in the disassembly text.
|
||||
FunctionBodyOffsets []int64 `json:"functionBodyOffsets,omitempty"` // The offsets of all function bodies, in the format [start1, end1, start2, end2, ...] where all ends are exclusive.
|
||||
Chunk *WasmDisassemblyChunk `json:"chunk,omitempty"` // The first chunk of disassembly.
|
||||
}
|
||||
|
||||
// Do executes Debugger.disassembleWasmModule against the provided context.
|
||||
//
|
||||
// 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 (p *DisassembleWasmModuleParams) Do(ctx context.Context) (streamID string, totalNumberOfLines int64, functionBodyOffsets []int64, chunk *WasmDisassemblyChunk, err error) {
|
||||
// execute
|
||||
var res DisassembleWasmModuleReturns
|
||||
err = cdp.Execute(ctx, CommandDisassembleWasmModule, p, &res)
|
||||
if err != nil {
|
||||
return "", 0, nil, nil, err
|
||||
}
|
||||
|
||||
return res.StreamID, res.TotalNumberOfLines, res.FunctionBodyOffsets, res.Chunk, nil
|
||||
}
|
||||
|
||||
// NextWasmDisassemblyChunkParams 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.
|
||||
type NextWasmDisassemblyChunkParams struct {
|
||||
StreamID string `json:"streamId"`
|
||||
}
|
||||
|
||||
// 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.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-nextWasmDisassemblyChunk
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// streamID
|
||||
func NextWasmDisassemblyChunk(streamID string) *NextWasmDisassemblyChunkParams {
|
||||
return &NextWasmDisassemblyChunkParams{
|
||||
StreamID: streamID,
|
||||
}
|
||||
}
|
||||
|
||||
// NextWasmDisassemblyChunkReturns return values.
|
||||
type NextWasmDisassemblyChunkReturns struct {
|
||||
Chunk *WasmDisassemblyChunk `json:"chunk,omitempty"` // The next chunk of disassembly.
|
||||
}
|
||||
|
||||
// Do executes Debugger.nextWasmDisassemblyChunk against the provided context.
|
||||
//
|
||||
// returns:
|
||||
//
|
||||
// chunk - The next chunk of disassembly.
|
||||
func (p *NextWasmDisassemblyChunkParams) Do(ctx context.Context) (chunk *WasmDisassemblyChunk, err error) {
|
||||
// execute
|
||||
var res NextWasmDisassemblyChunkReturns
|
||||
err = cdp.Execute(ctx, CommandNextWasmDisassemblyChunk, p, &res)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return res.Chunk, nil
|
||||
}
|
||||
|
||||
// GetStackTraceParams returns stack trace with given stackTraceId.
|
||||
type GetStackTraceParams struct {
|
||||
StackTraceID *runtime.StackTraceID `json:"stackTraceId"`
|
||||
@@ -314,7 +412,8 @@ type GetStackTraceParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-getStackTrace
|
||||
//
|
||||
// parameters:
|
||||
// stackTraceID
|
||||
//
|
||||
// stackTraceID
|
||||
func GetStackTrace(stackTraceID *runtime.StackTraceID) *GetStackTraceParams {
|
||||
return &GetStackTraceParams{
|
||||
StackTraceID: stackTraceID,
|
||||
@@ -329,7 +428,8 @@ type GetStackTraceReturns struct {
|
||||
// Do executes Debugger.getStackTrace against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// stackTrace
|
||||
//
|
||||
// stackTrace
|
||||
func (p *GetStackTraceParams) Do(ctx context.Context) (stackTrace *runtime.StackTrace, err error) {
|
||||
// execute
|
||||
var res GetStackTraceReturns
|
||||
@@ -366,7 +466,8 @@ type RemoveBreakpointParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-removeBreakpoint
|
||||
//
|
||||
// parameters:
|
||||
// breakpointID
|
||||
//
|
||||
// breakpointID
|
||||
func RemoveBreakpoint(breakpointID BreakpointID) *RemoveBreakpointParams {
|
||||
return &RemoveBreakpointParams{
|
||||
BreakpointID: breakpointID,
|
||||
@@ -378,6 +479,55 @@ func (p *RemoveBreakpointParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandRemoveBreakpoint, p, nil)
|
||||
}
|
||||
|
||||
// RestartFrameParams 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 immediately 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.
|
||||
type RestartFrameParams struct {
|
||||
CallFrameID CallFrameID `json:"callFrameId"` // Call frame identifier to evaluate on.
|
||||
Mode RestartFrameMode `json:"mode,omitempty"` // The mode parameter must be present and set to 'StepInto', otherwise restartFrame will error out.
|
||||
}
|
||||
|
||||
// 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 immediately 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.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-restartFrame
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// callFrameID - Call frame identifier to evaluate on.
|
||||
func RestartFrame(callFrameID CallFrameID) *RestartFrameParams {
|
||||
return &RestartFrameParams{
|
||||
CallFrameID: callFrameID,
|
||||
}
|
||||
}
|
||||
|
||||
// WithMode the mode parameter must be present and set to 'StepInto',
|
||||
// otherwise restartFrame will error out.
|
||||
func (p RestartFrameParams) WithMode(mode RestartFrameMode) *RestartFrameParams {
|
||||
p.Mode = mode
|
||||
return &p
|
||||
}
|
||||
|
||||
// Do executes Debugger.restartFrame against the provided context.
|
||||
func (p *RestartFrameParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandRestartFrame, p, nil)
|
||||
}
|
||||
|
||||
// ResumeParams resumes JavaScript execution.
|
||||
type ResumeParams struct {
|
||||
TerminateOnResume bool `json:"terminateOnResume,omitempty"` // 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.
|
||||
@@ -420,8 +570,9 @@ type SearchInContentParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-searchInContent
|
||||
//
|
||||
// parameters:
|
||||
// scriptID - Id of the script to search in.
|
||||
// query - String to search for.
|
||||
//
|
||||
// scriptID - Id of the script to search in.
|
||||
// query - String to search for.
|
||||
func SearchInContent(scriptID runtime.ScriptID, query string) *SearchInContentParams {
|
||||
return &SearchInContentParams{
|
||||
ScriptID: scriptID,
|
||||
@@ -449,7 +600,8 @@ type SearchInContentReturns struct {
|
||||
// Do executes Debugger.searchInContent against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// result - List of search matches.
|
||||
//
|
||||
// result - List of search matches.
|
||||
func (p *SearchInContentParams) Do(ctx context.Context) (result []*SearchMatch, err error) {
|
||||
// execute
|
||||
var res SearchInContentReturns
|
||||
@@ -472,7 +624,8 @@ type SetAsyncCallStackDepthParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-setAsyncCallStackDepth
|
||||
//
|
||||
// parameters:
|
||||
// maxDepth - Maximum depth of async call stacks. Setting to 0 will effectively disable collecting async call stacks (default).
|
||||
//
|
||||
// maxDepth - Maximum depth of async call stacks. Setting to 0 will effectively disable collecting async call stacks (default).
|
||||
func SetAsyncCallStackDepth(maxDepth int64) *SetAsyncCallStackDepthParams {
|
||||
return &SetAsyncCallStackDepthParams{
|
||||
MaxDepth: maxDepth,
|
||||
@@ -500,7 +653,8 @@ type SetBlackboxPatternsParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-setBlackboxPatterns
|
||||
//
|
||||
// parameters:
|
||||
// patterns - Array of regexps that will be used to check script url for blackbox state.
|
||||
//
|
||||
// patterns - Array of regexps that will be used to check script url for blackbox state.
|
||||
func SetBlackboxPatterns(patterns []string) *SetBlackboxPatternsParams {
|
||||
return &SetBlackboxPatternsParams{
|
||||
Patterns: patterns,
|
||||
@@ -531,8 +685,9 @@ type SetBlackboxedRangesParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-setBlackboxedRanges
|
||||
//
|
||||
// parameters:
|
||||
// scriptID - Id of the script.
|
||||
// positions
|
||||
//
|
||||
// scriptID - Id of the script.
|
||||
// positions
|
||||
func SetBlackboxedRanges(scriptID runtime.ScriptID, positions []*ScriptPosition) *SetBlackboxedRangesParams {
|
||||
return &SetBlackboxedRangesParams{
|
||||
ScriptID: scriptID,
|
||||
@@ -556,7 +711,8 @@ type SetBreakpointParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-setBreakpoint
|
||||
//
|
||||
// parameters:
|
||||
// location - Location to set breakpoint in.
|
||||
//
|
||||
// location - Location to set breakpoint in.
|
||||
func SetBreakpoint(location *Location) *SetBreakpointParams {
|
||||
return &SetBreakpointParams{
|
||||
Location: location,
|
||||
@@ -580,8 +736,9 @@ type SetBreakpointReturns struct {
|
||||
// Do executes Debugger.setBreakpoint against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// breakpointID - Id of the created breakpoint for further reference.
|
||||
// actualLocation - Location this breakpoint resolved into.
|
||||
//
|
||||
// breakpointID - Id of the created breakpoint for further reference.
|
||||
// actualLocation - Location this breakpoint resolved into.
|
||||
func (p *SetBreakpointParams) Do(ctx context.Context) (breakpointID BreakpointID, actualLocation *Location, err error) {
|
||||
// execute
|
||||
var res SetBreakpointReturns
|
||||
@@ -603,7 +760,8 @@ type SetInstrumentationBreakpointParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-setInstrumentationBreakpoint
|
||||
//
|
||||
// parameters:
|
||||
// instrumentation - Instrumentation name.
|
||||
//
|
||||
// instrumentation - Instrumentation name.
|
||||
func SetInstrumentationBreakpoint(instrumentation SetInstrumentationBreakpointInstrumentation) *SetInstrumentationBreakpointParams {
|
||||
return &SetInstrumentationBreakpointParams{
|
||||
Instrumentation: instrumentation,
|
||||
@@ -618,7 +776,8 @@ type SetInstrumentationBreakpointReturns struct {
|
||||
// Do executes Debugger.setInstrumentationBreakpoint against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// breakpointID - Id of the created breakpoint for further reference.
|
||||
//
|
||||
// breakpointID - Id of the created breakpoint for further reference.
|
||||
func (p *SetInstrumentationBreakpointParams) Do(ctx context.Context) (breakpointID BreakpointID, err error) {
|
||||
// execute
|
||||
var res SetInstrumentationBreakpointReturns
|
||||
@@ -654,7 +813,8 @@ type SetBreakpointByURLParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-setBreakpointByUrl
|
||||
//
|
||||
// parameters:
|
||||
// lineNumber - Line number to set breakpoint at.
|
||||
//
|
||||
// lineNumber - Line number to set breakpoint at.
|
||||
func SetBreakpointByURL(lineNumber int64) *SetBreakpointByURLParams {
|
||||
return &SetBreakpointByURLParams{
|
||||
LineNumber: lineNumber,
|
||||
@@ -703,8 +863,9 @@ type SetBreakpointByURLReturns struct {
|
||||
// Do executes Debugger.setBreakpointByUrl against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// breakpointID - Id of the created breakpoint for further reference.
|
||||
// locations - List of the locations this breakpoint resolved into upon addition.
|
||||
//
|
||||
// breakpointID - Id of the created breakpoint for further reference.
|
||||
// locations - List of the locations this breakpoint resolved into upon addition.
|
||||
func (p *SetBreakpointByURLParams) Do(ctx context.Context) (breakpointID BreakpointID, locations []*Location, err error) {
|
||||
// execute
|
||||
var res SetBreakpointByURLReturns
|
||||
@@ -731,7 +892,8 @@ type SetBreakpointOnFunctionCallParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-setBreakpointOnFunctionCall
|
||||
//
|
||||
// parameters:
|
||||
// objectID - Function object id.
|
||||
//
|
||||
// objectID - Function object id.
|
||||
func SetBreakpointOnFunctionCall(objectID runtime.RemoteObjectID) *SetBreakpointOnFunctionCallParams {
|
||||
return &SetBreakpointOnFunctionCallParams{
|
||||
ObjectID: objectID,
|
||||
@@ -753,7 +915,8 @@ type SetBreakpointOnFunctionCallReturns struct {
|
||||
// Do executes Debugger.setBreakpointOnFunctionCall against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// breakpointID - Id of the created breakpoint for further reference.
|
||||
//
|
||||
// breakpointID - Id of the created breakpoint for further reference.
|
||||
func (p *SetBreakpointOnFunctionCallParams) Do(ctx context.Context) (breakpointID BreakpointID, err error) {
|
||||
// execute
|
||||
var res SetBreakpointOnFunctionCallReturns
|
||||
@@ -776,7 +939,8 @@ type SetBreakpointsActiveParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-setBreakpointsActive
|
||||
//
|
||||
// parameters:
|
||||
// active - New value for breakpoints active state.
|
||||
//
|
||||
// active - New value for breakpoints active state.
|
||||
func SetBreakpointsActive(active bool) *SetBreakpointsActiveParams {
|
||||
return &SetBreakpointsActiveParams{
|
||||
Active: active,
|
||||
@@ -802,7 +966,8 @@ type SetPauseOnExceptionsParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-setPauseOnExceptions
|
||||
//
|
||||
// parameters:
|
||||
// state - Pause on exceptions mode.
|
||||
//
|
||||
// state - Pause on exceptions mode.
|
||||
func SetPauseOnExceptions(state ExceptionsState) *SetPauseOnExceptionsParams {
|
||||
return &SetPauseOnExceptionsParams{
|
||||
State: state,
|
||||
@@ -826,7 +991,8 @@ type SetReturnValueParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-setReturnValue
|
||||
//
|
||||
// parameters:
|
||||
// newValue - New return value.
|
||||
//
|
||||
// newValue - New return value.
|
||||
func SetReturnValue(newValue *runtime.CallArgument) *SetReturnValueParams {
|
||||
return &SetReturnValueParams{
|
||||
NewValue: newValue,
|
||||
@@ -838,20 +1004,32 @@ func (p *SetReturnValueParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandSetReturnValue, p, nil)
|
||||
}
|
||||
|
||||
// SetScriptSourceParams edits JavaScript source live.
|
||||
// SetScriptSourceParams 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.
|
||||
type SetScriptSourceParams struct {
|
||||
ScriptID runtime.ScriptID `json:"scriptId"` // Id of the script to edit.
|
||||
ScriptSource string `json:"scriptSource"` // New content of the script.
|
||||
DryRun bool `json:"dryRun,omitempty"` // If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code.
|
||||
ScriptID runtime.ScriptID `json:"scriptId"` // Id of the script to edit.
|
||||
ScriptSource string `json:"scriptSource"` // New content of the script.
|
||||
DryRun bool `json:"dryRun,omitempty"` // If true the change will not actually be applied. Dry run may be used to get result description without actually modifying the code.
|
||||
AllowTopFrameEditing bool `json:"allowTopFrameEditing,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.
|
||||
}
|
||||
|
||||
// SetScriptSource edits JavaScript source live.
|
||||
// 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.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-setScriptSource
|
||||
//
|
||||
// parameters:
|
||||
// scriptID - Id of the script to edit.
|
||||
// scriptSource - New content of the script.
|
||||
//
|
||||
// scriptID - Id of the script to edit.
|
||||
// scriptSource - New content of the script.
|
||||
func SetScriptSource(scriptID runtime.ScriptID, scriptSource string) *SetScriptSourceParams {
|
||||
return &SetScriptSourceParams{
|
||||
ScriptID: scriptID,
|
||||
@@ -866,32 +1044,35 @@ func (p SetScriptSourceParams) WithDryRun(dryRun bool) *SetScriptSourceParams {
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithAllowTopFrameEditing 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.
|
||||
func (p SetScriptSourceParams) WithAllowTopFrameEditing(allowTopFrameEditing bool) *SetScriptSourceParams {
|
||||
p.AllowTopFrameEditing = allowTopFrameEditing
|
||||
return &p
|
||||
}
|
||||
|
||||
// SetScriptSourceReturns return values.
|
||||
type SetScriptSourceReturns struct {
|
||||
CallFrames []*CallFrame `json:"callFrames,omitempty"` // New stack trace in case editing has happened while VM was stopped.
|
||||
StackChanged bool `json:"stackChanged,omitempty"` // Whether current call stack was modified after applying the changes.
|
||||
AsyncStackTrace *runtime.StackTrace `json:"asyncStackTrace,omitempty"` // Async stack trace, if any.
|
||||
AsyncStackTraceID *runtime.StackTraceID `json:"asyncStackTraceId,omitempty"` // Async stack trace, if any.
|
||||
ExceptionDetails *runtime.ExceptionDetails `json:"exceptionDetails,omitempty"` // Exception details if any.
|
||||
Status SetScriptSourceStatus `json:"status,omitempty"` // 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 *runtime.ExceptionDetails `json:"exceptionDetails,omitempty"` // Exception details if any. Only present when status is CompileError.
|
||||
}
|
||||
|
||||
// Do executes Debugger.setScriptSource against the provided context.
|
||||
//
|
||||
// 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.
|
||||
// exceptionDetails - Exception details if any.
|
||||
func (p *SetScriptSourceParams) Do(ctx context.Context) (callFrames []*CallFrame, stackChanged bool, asyncStackTrace *runtime.StackTrace, asyncStackTraceID *runtime.StackTraceID, exceptionDetails *runtime.ExceptionDetails, err error) {
|
||||
//
|
||||
// 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 (p *SetScriptSourceParams) Do(ctx context.Context) (status SetScriptSourceStatus, exceptionDetails *runtime.ExceptionDetails, err error) {
|
||||
// execute
|
||||
var res SetScriptSourceReturns
|
||||
err = cdp.Execute(ctx, CommandSetScriptSource, p, &res)
|
||||
if err != nil {
|
||||
return nil, false, nil, nil, nil, err
|
||||
return "", nil, err
|
||||
}
|
||||
|
||||
return res.CallFrames, res.StackChanged, res.AsyncStackTrace, res.AsyncStackTraceID, res.ExceptionDetails, nil
|
||||
return res.Status, res.ExceptionDetails, nil
|
||||
}
|
||||
|
||||
// SetSkipAllPausesParams makes page not interrupt on any pauses (breakpoint,
|
||||
@@ -906,7 +1087,8 @@ type SetSkipAllPausesParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-setSkipAllPauses
|
||||
//
|
||||
// parameters:
|
||||
// skip - New value for skip pauses state.
|
||||
//
|
||||
// skip - New value for skip pauses state.
|
||||
func SetSkipAllPauses(skip bool) *SetSkipAllPausesParams {
|
||||
return &SetSkipAllPausesParams{
|
||||
Skip: skip,
|
||||
@@ -933,10 +1115,11 @@ type SetVariableValueParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-setVariableValue
|
||||
//
|
||||
// parameters:
|
||||
// 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.
|
||||
//
|
||||
// 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 SetVariableValue(scopeNumber int64, variableName string, newValue *runtime.CallArgument, callFrameID CallFrameID) *SetVariableValueParams {
|
||||
return &SetVariableValueParams{
|
||||
ScopeNumber: scopeNumber,
|
||||
@@ -1034,9 +1217,12 @@ const (
|
||||
CommandEvaluateOnCallFrame = "Debugger.evaluateOnCallFrame"
|
||||
CommandGetPossibleBreakpoints = "Debugger.getPossibleBreakpoints"
|
||||
CommandGetScriptSource = "Debugger.getScriptSource"
|
||||
CommandDisassembleWasmModule = "Debugger.disassembleWasmModule"
|
||||
CommandNextWasmDisassemblyChunk = "Debugger.nextWasmDisassemblyChunk"
|
||||
CommandGetStackTrace = "Debugger.getStackTrace"
|
||||
CommandPause = "Debugger.pause"
|
||||
CommandRemoveBreakpoint = "Debugger.removeBreakpoint"
|
||||
CommandRestartFrame = "Debugger.restartFrame"
|
||||
CommandResume = "Debugger.resume"
|
||||
CommandSearchInContent = "Debugger.searchInContent"
|
||||
CommandSetAsyncCallStackDepth = "Debugger.setAsyncCallStackDepth"
|
||||
|
||||
1479
vendor/github.com/chromedp/cdproto/debugger/easyjson.go
generated
vendored
1479
vendor/github.com/chromedp/cdproto/debugger/easyjson.go
generated
vendored
File diff suppressed because it is too large
Load Diff
4
vendor/github.com/chromedp/cdproto/debugger/events.go
generated
vendored
4
vendor/github.com/chromedp/cdproto/debugger/events.go
generated
vendored
@@ -46,7 +46,7 @@ type EventScriptFailedToParse struct {
|
||||
EndLine int64 `json:"endLine"` // Last line of the script.
|
||||
EndColumn int64 `json:"endColumn"` // Length of the last line of the script.
|
||||
ExecutionContextID runtime.ExecutionContextID `json:"executionContextId"` // Specifies script creation context.
|
||||
Hash string `json:"hash"` // Content hash of the script.
|
||||
Hash string `json:"hash"` // Content hash of the script, SHA-256.
|
||||
ExecutionContextAuxData easyjson.RawMessage `json:"executionContextAuxData,omitempty"`
|
||||
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.
|
||||
@@ -70,7 +70,7 @@ type EventScriptParsed struct {
|
||||
EndLine int64 `json:"endLine"` // Last line of the script.
|
||||
EndColumn int64 `json:"endColumn"` // Length of the last line of the script.
|
||||
ExecutionContextID runtime.ExecutionContextID `json:"executionContextId"` // Specifies script creation context.
|
||||
Hash string `json:"hash"` // Content hash of the script.
|
||||
Hash string `json:"hash"` // Content hash of the script, SHA-256.
|
||||
ExecutionContextAuxData easyjson.RawMessage `json:"executionContextAuxData,omitempty"`
|
||||
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).
|
||||
|
||||
148
vendor/github.com/chromedp/cdproto/debugger/types.go
generated
vendored
148
vendor/github.com/chromedp/cdproto/debugger/types.go
generated
vendored
@@ -3,7 +3,7 @@ package debugger
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/chromedp/cdproto/runtime"
|
||||
"github.com/mailru/easyjson"
|
||||
@@ -65,10 +65,10 @@ type CallFrame struct {
|
||||
FunctionName string `json:"functionName"` // Name of the JavaScript function called on this call frame.
|
||||
FunctionLocation *Location `json:"functionLocation,omitempty"` // Location in the source code.
|
||||
Location *Location `json:"location"` // Location in the source code.
|
||||
URL string `json:"url"` // JavaScript script name or url.
|
||||
ScopeChain []*Scope `json:"scopeChain"` // Scope chain for this call frame.
|
||||
This *runtime.RemoteObject `json:"this"` // this object for this call frame.
|
||||
ReturnValue *runtime.RemoteObject `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.
|
||||
}
|
||||
|
||||
// Scope scope description.
|
||||
@@ -100,6 +100,14 @@ type BreakLocation struct {
|
||||
Type BreakLocationType `json:"type,omitempty"`
|
||||
}
|
||||
|
||||
// WasmDisassemblyChunk [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#type-WasmDisassemblyChunk
|
||||
type WasmDisassemblyChunk struct {
|
||||
Lines []string `json:"lines"` // The next chunk of disassembled lines.
|
||||
BytecodeOffsets []int64 `json:"bytecodeOffsets"` // The bytecode offsets describing the start of each line.
|
||||
}
|
||||
|
||||
// ScriptLanguage enum of possible script languages.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#type-ScriptLanguage
|
||||
@@ -128,14 +136,15 @@ func (t ScriptLanguage) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ScriptLanguage) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ScriptLanguage(in.String()) {
|
||||
v := in.String()
|
||||
switch ScriptLanguage(v) {
|
||||
case ScriptLanguageJavaScript:
|
||||
*t = ScriptLanguageJavaScript
|
||||
case ScriptLanguageWebAssembly:
|
||||
*t = ScriptLanguageWebAssembly
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ScriptLanguage value"))
|
||||
in.AddError(fmt.Errorf("unknown ScriptLanguage value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -188,7 +197,8 @@ func (t ScopeType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ScopeType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ScopeType(in.String()) {
|
||||
v := in.String()
|
||||
switch ScopeType(v) {
|
||||
case ScopeTypeGlobal:
|
||||
*t = ScopeTypeGlobal
|
||||
case ScopeTypeLocal:
|
||||
@@ -211,7 +221,7 @@ func (t *ScopeType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = ScopeTypeWasmExpressionStack
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ScopeType value"))
|
||||
in.AddError(fmt.Errorf("unknown ScopeType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -249,7 +259,8 @@ func (t BreakLocationType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *BreakLocationType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch BreakLocationType(in.String()) {
|
||||
v := in.String()
|
||||
switch BreakLocationType(v) {
|
||||
case BreakLocationTypeDebuggerStatement:
|
||||
*t = BreakLocationTypeDebuggerStatement
|
||||
case BreakLocationTypeCall:
|
||||
@@ -258,7 +269,7 @@ func (t *BreakLocationType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = BreakLocationTypeReturn
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown BreakLocationType value"))
|
||||
in.AddError(fmt.Errorf("unknown BreakLocationType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -297,7 +308,8 @@ func (t DebugSymbolsType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *DebugSymbolsType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch DebugSymbolsType(in.String()) {
|
||||
v := in.String()
|
||||
switch DebugSymbolsType(v) {
|
||||
case DebugSymbolsTypeNone:
|
||||
*t = DebugSymbolsTypeNone
|
||||
case DebugSymbolsTypeSourceMap:
|
||||
@@ -308,7 +320,7 @@ func (t *DebugSymbolsType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = DebugSymbolsTypeExternalDWARF
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown DebugSymbolsType value"))
|
||||
in.AddError(fmt.Errorf("unknown DebugSymbolsType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -355,7 +367,8 @@ func (t PausedReason) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *PausedReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch PausedReason(in.String()) {
|
||||
v := in.String()
|
||||
switch PausedReason(v) {
|
||||
case PausedReasonAmbiguous:
|
||||
*t = PausedReasonAmbiguous
|
||||
case PausedReasonAssert:
|
||||
@@ -382,7 +395,7 @@ func (t *PausedReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = PausedReasonXHR
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown PausedReason value"))
|
||||
in.AddError(fmt.Errorf("unknown PausedReason value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -419,14 +432,15 @@ func (t ContinueToLocationTargetCallFrames) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ContinueToLocationTargetCallFrames) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ContinueToLocationTargetCallFrames(in.String()) {
|
||||
v := in.String()
|
||||
switch ContinueToLocationTargetCallFrames(v) {
|
||||
case ContinueToLocationTargetCallFramesAny:
|
||||
*t = ContinueToLocationTargetCallFramesAny
|
||||
case ContinueToLocationTargetCallFramesCurrent:
|
||||
*t = ContinueToLocationTargetCallFramesCurrent
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ContinueToLocationTargetCallFrames value"))
|
||||
in.AddError(fmt.Errorf("unknown ContinueToLocationTargetCallFrames value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -435,6 +449,49 @@ func (t *ContinueToLocationTargetCallFrames) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
// RestartFrameMode the mode parameter must be present and set to 'StepInto',
|
||||
// otherwise restartFrame will error out.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-restartFrame
|
||||
type RestartFrameMode string
|
||||
|
||||
// String returns the RestartFrameMode as string value.
|
||||
func (t RestartFrameMode) String() string {
|
||||
return string(t)
|
||||
}
|
||||
|
||||
// RestartFrameMode values.
|
||||
const (
|
||||
RestartFrameModeStepInto RestartFrameMode = "StepInto"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
func (t RestartFrameMode) MarshalEasyJSON(out *jwriter.Writer) {
|
||||
out.String(string(t))
|
||||
}
|
||||
|
||||
// MarshalJSON satisfies json.Marshaler.
|
||||
func (t RestartFrameMode) MarshalJSON() ([]byte, error) {
|
||||
return easyjson.Marshal(t)
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *RestartFrameMode) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
v := in.String()
|
||||
switch RestartFrameMode(v) {
|
||||
case RestartFrameModeStepInto:
|
||||
*t = RestartFrameModeStepInto
|
||||
|
||||
default:
|
||||
in.AddError(fmt.Errorf("unknown RestartFrameMode value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
// UnmarshalJSON satisfies json.Unmarshaler.
|
||||
func (t *RestartFrameMode) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
// SetInstrumentationBreakpointInstrumentation instrumentation name.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-setInstrumentationBreakpoint
|
||||
@@ -463,14 +520,15 @@ func (t SetInstrumentationBreakpointInstrumentation) MarshalJSON() ([]byte, erro
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *SetInstrumentationBreakpointInstrumentation) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch SetInstrumentationBreakpointInstrumentation(in.String()) {
|
||||
v := in.String()
|
||||
switch SetInstrumentationBreakpointInstrumentation(v) {
|
||||
case SetInstrumentationBreakpointInstrumentationBeforeScriptExecution:
|
||||
*t = SetInstrumentationBreakpointInstrumentationBeforeScriptExecution
|
||||
case SetInstrumentationBreakpointInstrumentationBeforeScriptWithSourceMapExecution:
|
||||
*t = SetInstrumentationBreakpointInstrumentationBeforeScriptWithSourceMapExecution
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown SetInstrumentationBreakpointInstrumentation value"))
|
||||
in.AddError(fmt.Errorf("unknown SetInstrumentationBreakpointInstrumentation value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -508,7 +566,8 @@ func (t ExceptionsState) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ExceptionsState) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ExceptionsState(in.String()) {
|
||||
v := in.String()
|
||||
switch ExceptionsState(v) {
|
||||
case ExceptionsStateNone:
|
||||
*t = ExceptionsStateNone
|
||||
case ExceptionsStateUncaught:
|
||||
@@ -517,7 +576,7 @@ func (t *ExceptionsState) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = ExceptionsStateAll
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ExceptionsState value"))
|
||||
in.AddError(fmt.Errorf("unknown ExceptionsState value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -525,3 +584,56 @@ func (t *ExceptionsState) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
func (t *ExceptionsState) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
// SetScriptSourceStatus 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.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-setScriptSource
|
||||
type SetScriptSourceStatus string
|
||||
|
||||
// String returns the SetScriptSourceStatus as string value.
|
||||
func (t SetScriptSourceStatus) String() string {
|
||||
return string(t)
|
||||
}
|
||||
|
||||
// SetScriptSourceStatus values.
|
||||
const (
|
||||
SetScriptSourceStatusOk SetScriptSourceStatus = "Ok"
|
||||
SetScriptSourceStatusCompileError SetScriptSourceStatus = "CompileError"
|
||||
SetScriptSourceStatusBlockedByActiveGenerator SetScriptSourceStatus = "BlockedByActiveGenerator"
|
||||
SetScriptSourceStatusBlockedByActiveFunction SetScriptSourceStatus = "BlockedByActiveFunction"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
func (t SetScriptSourceStatus) MarshalEasyJSON(out *jwriter.Writer) {
|
||||
out.String(string(t))
|
||||
}
|
||||
|
||||
// MarshalJSON satisfies json.Marshaler.
|
||||
func (t SetScriptSourceStatus) MarshalJSON() ([]byte, error) {
|
||||
return easyjson.Marshal(t)
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *SetScriptSourceStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
v := in.String()
|
||||
switch SetScriptSourceStatus(v) {
|
||||
case SetScriptSourceStatusOk:
|
||||
*t = SetScriptSourceStatusOk
|
||||
case SetScriptSourceStatusCompileError:
|
||||
*t = SetScriptSourceStatusCompileError
|
||||
case SetScriptSourceStatusBlockedByActiveGenerator:
|
||||
*t = SetScriptSourceStatusBlockedByActiveGenerator
|
||||
case SetScriptSourceStatusBlockedByActiveFunction:
|
||||
*t = SetScriptSourceStatusBlockedByActiveFunction
|
||||
|
||||
default:
|
||||
in.AddError(fmt.Errorf("unknown SetScriptSourceStatus value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
// UnmarshalJSON satisfies json.Unmarshaler.
|
||||
func (t *SetScriptSourceStatus) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
7
vendor/github.com/chromedp/cdproto/deviceorientation/deviceorientation.go
generated
vendored
7
vendor/github.com/chromedp/cdproto/deviceorientation/deviceorientation.go
generated
vendored
@@ -40,9 +40,10 @@ type SetDeviceOrientationOverrideParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DeviceOrientation#method-setDeviceOrientationOverride
|
||||
//
|
||||
// parameters:
|
||||
// alpha - Mock alpha
|
||||
// beta - Mock beta
|
||||
// gamma - Mock gamma
|
||||
//
|
||||
// alpha - Mock alpha
|
||||
// beta - Mock beta
|
||||
// gamma - Mock gamma
|
||||
func SetDeviceOrientationOverride(alpha float64, beta float64, gamma float64) *SetDeviceOrientationOverrideParams {
|
||||
return &SetDeviceOrientationOverrideParams{
|
||||
Alpha: alpha,
|
||||
|
||||
473
vendor/github.com/chromedp/cdproto/dom/dom.go
generated
vendored
473
vendor/github.com/chromedp/cdproto/dom/dom.go
generated
vendored
@@ -37,7 +37,8 @@ type CollectClassNamesFromSubtreeParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-collectClassNamesFromSubtree
|
||||
//
|
||||
// parameters:
|
||||
// nodeID - Id of the node to collect class names.
|
||||
//
|
||||
// nodeID - Id of the node to collect class names.
|
||||
func CollectClassNamesFromSubtree(nodeID cdp.NodeID) *CollectClassNamesFromSubtreeParams {
|
||||
return &CollectClassNamesFromSubtreeParams{
|
||||
NodeID: nodeID,
|
||||
@@ -52,7 +53,8 @@ type CollectClassNamesFromSubtreeReturns struct {
|
||||
// Do executes DOM.collectClassNamesFromSubtree against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// classNames - Class name list.
|
||||
//
|
||||
// classNames - Class name list.
|
||||
func (p *CollectClassNamesFromSubtreeParams) Do(ctx context.Context) (classNames []string, err error) {
|
||||
// execute
|
||||
var res CollectClassNamesFromSubtreeReturns
|
||||
@@ -78,8 +80,9 @@ type CopyToParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-copyTo
|
||||
//
|
||||
// parameters:
|
||||
// nodeID - Id of the node to copy.
|
||||
// targetNodeID - Id of the element to drop the copy into.
|
||||
//
|
||||
// nodeID - Id of the node to copy.
|
||||
// targetNodeID - Id of the element to drop the copy into.
|
||||
func CopyTo(nodeID cdp.NodeID, targetNodeID cdp.NodeID) *CopyToParams {
|
||||
return &CopyToParams{
|
||||
NodeID: nodeID,
|
||||
@@ -102,7 +105,8 @@ type CopyToReturns struct {
|
||||
// Do executes DOM.copyTo against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// nodeID - Id of the node clone.
|
||||
//
|
||||
// nodeID - Id of the node clone.
|
||||
func (p *CopyToParams) Do(ctx context.Context) (nodeID cdp.NodeID, err error) {
|
||||
// execute
|
||||
var res CopyToReturns
|
||||
@@ -175,7 +179,8 @@ type DescribeNodeReturns struct {
|
||||
// Do executes DOM.describeNode against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// node - Node description.
|
||||
//
|
||||
// node - Node description.
|
||||
func (p *DescribeNodeParams) Do(ctx context.Context) (node *cdp.Node, err error) {
|
||||
// execute
|
||||
var res DescribeNodeReturns
|
||||
@@ -266,7 +271,8 @@ type DiscardSearchResultsParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-discardSearchResults
|
||||
//
|
||||
// parameters:
|
||||
// searchID - Unique search session identifier.
|
||||
//
|
||||
// searchID - Unique search session identifier.
|
||||
func DiscardSearchResults(searchID string) *DiscardSearchResultsParams {
|
||||
return &DiscardSearchResultsParams{
|
||||
SearchID: searchID,
|
||||
@@ -279,18 +285,29 @@ func (p *DiscardSearchResultsParams) Do(ctx context.Context) (err error) {
|
||||
}
|
||||
|
||||
// EnableParams enables DOM agent for the given page.
|
||||
type EnableParams struct{}
|
||||
type EnableParams struct {
|
||||
IncludeWhitespace EnableIncludeWhitespace `json:"includeWhitespace,omitempty"` // Whether to include whitespaces in the children array of returned Nodes.
|
||||
}
|
||||
|
||||
// Enable enables DOM agent for the given page.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-enable
|
||||
//
|
||||
// parameters:
|
||||
func Enable() *EnableParams {
|
||||
return &EnableParams{}
|
||||
}
|
||||
|
||||
// WithIncludeWhitespace whether to include whitespaces in the children array
|
||||
// of returned Nodes.
|
||||
func (p EnableParams) WithIncludeWhitespace(includeWhitespace EnableIncludeWhitespace) *EnableParams {
|
||||
p.IncludeWhitespace = includeWhitespace
|
||||
return &p
|
||||
}
|
||||
|
||||
// Do executes DOM.enable against the provided context.
|
||||
func (p *EnableParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandEnable, nil, nil)
|
||||
return cdp.Execute(ctx, CommandEnable, p, nil)
|
||||
}
|
||||
|
||||
// FocusParams focuses the given element.
|
||||
@@ -342,7 +359,8 @@ type GetAttributesParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getAttributes
|
||||
//
|
||||
// parameters:
|
||||
// nodeID - Id of the node to retrieve attibutes for.
|
||||
//
|
||||
// nodeID - Id of the node to retrieve attibutes for.
|
||||
func GetAttributes(nodeID cdp.NodeID) *GetAttributesParams {
|
||||
return &GetAttributesParams{
|
||||
NodeID: nodeID,
|
||||
@@ -357,7 +375,8 @@ type GetAttributesReturns struct {
|
||||
// Do executes DOM.getAttributes against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// attributes - An interleaved array of node attribute names and values.
|
||||
//
|
||||
// attributes - An interleaved array of node attribute names and values.
|
||||
func (p *GetAttributesParams) Do(ctx context.Context) (attributes []string, err error) {
|
||||
// execute
|
||||
var res GetAttributesReturns
|
||||
@@ -411,7 +430,8 @@ type GetBoxModelReturns struct {
|
||||
// Do executes DOM.getBoxModel against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// model - Box model for the node.
|
||||
//
|
||||
// model - Box model for the node.
|
||||
func (p *GetBoxModelParams) Do(ctx context.Context) (model *BoxModel, err error) {
|
||||
// execute
|
||||
var res GetBoxModelReturns
|
||||
@@ -467,7 +487,8 @@ type GetContentQuadsReturns struct {
|
||||
// Do executes DOM.getContentQuads against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// quads - Quads that describe node layout relative to viewport.
|
||||
//
|
||||
// quads - Quads that describe node layout relative to viewport.
|
||||
func (p *GetContentQuadsParams) Do(ctx context.Context) (quads []Quad, err error) {
|
||||
// execute
|
||||
var res GetContentQuadsReturns
|
||||
@@ -519,7 +540,8 @@ type GetDocumentReturns struct {
|
||||
// Do executes DOM.getDocument against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// root - Resulting node.
|
||||
//
|
||||
// root - Resulting node.
|
||||
func (p *GetDocumentParams) Do(ctx context.Context) (root *cdp.Node, err error) {
|
||||
// execute
|
||||
var res GetDocumentReturns
|
||||
@@ -545,8 +567,9 @@ type GetNodesForSubtreeByStyleParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getNodesForSubtreeByStyle
|
||||
//
|
||||
// parameters:
|
||||
// nodeID - Node ID pointing to the root of a subtree.
|
||||
// computedStyles - The style to filter nodes by (includes nodes if any of properties matches).
|
||||
//
|
||||
// nodeID - Node ID pointing to the root of a subtree.
|
||||
// computedStyles - The style to filter nodes by (includes nodes if any of properties matches).
|
||||
func GetNodesForSubtreeByStyle(nodeID cdp.NodeID, computedStyles []*CSSComputedStyleProperty) *GetNodesForSubtreeByStyleParams {
|
||||
return &GetNodesForSubtreeByStyleParams{
|
||||
NodeID: nodeID,
|
||||
@@ -563,14 +586,15 @@ func (p GetNodesForSubtreeByStyleParams) WithPierce(pierce bool) *GetNodesForSub
|
||||
|
||||
// GetNodesForSubtreeByStyleReturns return values.
|
||||
type GetNodesForSubtreeByStyleReturns struct {
|
||||
NodeIds []cdp.NodeID `json:"nodeIds,omitempty"` // Resulting nodes.
|
||||
NodeIDs []cdp.NodeID `json:"nodeIds,omitempty"` // Resulting nodes.
|
||||
}
|
||||
|
||||
// Do executes DOM.getNodesForSubtreeByStyle against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// nodeIds - Resulting nodes.
|
||||
func (p *GetNodesForSubtreeByStyleParams) Do(ctx context.Context) (nodeIds []cdp.NodeID, err error) {
|
||||
//
|
||||
// nodeIDs - Resulting nodes.
|
||||
func (p *GetNodesForSubtreeByStyleParams) Do(ctx context.Context) (nodeIDs []cdp.NodeID, err error) {
|
||||
// execute
|
||||
var res GetNodesForSubtreeByStyleReturns
|
||||
err = cdp.Execute(ctx, CommandGetNodesForSubtreeByStyle, p, &res)
|
||||
@@ -578,7 +602,7 @@ func (p *GetNodesForSubtreeByStyleParams) Do(ctx context.Context) (nodeIds []cdp
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return res.NodeIds, nil
|
||||
return res.NodeIDs, nil
|
||||
}
|
||||
|
||||
// GetNodeForLocationParams returns node id at given location. Depending on
|
||||
@@ -596,8 +620,9 @@ type GetNodeForLocationParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getNodeForLocation
|
||||
//
|
||||
// parameters:
|
||||
// x - X coordinate.
|
||||
// y - Y coordinate.
|
||||
//
|
||||
// x - X coordinate.
|
||||
// y - Y coordinate.
|
||||
func GetNodeForLocation(x int64, y int64) *GetNodeForLocationParams {
|
||||
return &GetNodeForLocationParams{
|
||||
X: x,
|
||||
@@ -629,9 +654,10 @@ type GetNodeForLocationReturns struct {
|
||||
// Do executes DOM.getNodeForLocation against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// backendNodeID - Resulting node.
|
||||
// frameID - Frame this node belongs to.
|
||||
// nodeID - Id of the node at given coordinates, only when enabled and requested document.
|
||||
//
|
||||
// backendNodeID - Resulting node.
|
||||
// frameID - Frame this node belongs to.
|
||||
// nodeID - Id of the node at given coordinates, only when enabled and requested document.
|
||||
func (p *GetNodeForLocationParams) Do(ctx context.Context) (backendNodeID cdp.BackendNodeID, frameID cdp.FrameID, nodeID cdp.NodeID, err error) {
|
||||
// execute
|
||||
var res GetNodeForLocationReturns
|
||||
@@ -685,7 +711,8 @@ type GetOuterHTMLReturns struct {
|
||||
// Do executes DOM.getOuterHTML against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// outerHTML - Outer HTML markup.
|
||||
//
|
||||
// outerHTML - Outer HTML markup.
|
||||
func (p *GetOuterHTMLParams) Do(ctx context.Context) (outerHTML string, err error) {
|
||||
// execute
|
||||
var res GetOuterHTMLReturns
|
||||
@@ -709,7 +736,8 @@ type GetRelayoutBoundaryParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getRelayoutBoundary
|
||||
//
|
||||
// parameters:
|
||||
// nodeID - Id of the node.
|
||||
//
|
||||
// nodeID - Id of the node.
|
||||
func GetRelayoutBoundary(nodeID cdp.NodeID) *GetRelayoutBoundaryParams {
|
||||
return &GetRelayoutBoundaryParams{
|
||||
NodeID: nodeID,
|
||||
@@ -724,7 +752,8 @@ type GetRelayoutBoundaryReturns struct {
|
||||
// Do executes DOM.getRelayoutBoundary against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// nodeID - Relayout boundary node id for the given node.
|
||||
//
|
||||
// nodeID - Relayout boundary node id for the given node.
|
||||
func (p *GetRelayoutBoundaryParams) Do(ctx context.Context) (nodeID cdp.NodeID, err error) {
|
||||
// execute
|
||||
var res GetRelayoutBoundaryReturns
|
||||
@@ -750,9 +779,10 @@ type GetSearchResultsParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getSearchResults
|
||||
//
|
||||
// parameters:
|
||||
// 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.
|
||||
//
|
||||
// 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.
|
||||
func GetSearchResults(searchID string, fromIndex int64, toIndex int64) *GetSearchResultsParams {
|
||||
return &GetSearchResultsParams{
|
||||
SearchID: searchID,
|
||||
@@ -763,14 +793,15 @@ func GetSearchResults(searchID string, fromIndex int64, toIndex int64) *GetSearc
|
||||
|
||||
// GetSearchResultsReturns return values.
|
||||
type GetSearchResultsReturns struct {
|
||||
NodeIds []cdp.NodeID `json:"nodeIds,omitempty"` // Ids of the search result nodes.
|
||||
NodeIDs []cdp.NodeID `json:"nodeIds,omitempty"` // Ids of the search result nodes.
|
||||
}
|
||||
|
||||
// Do executes DOM.getSearchResults against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// nodeIds - Ids of the search result nodes.
|
||||
func (p *GetSearchResultsParams) Do(ctx context.Context) (nodeIds []cdp.NodeID, err error) {
|
||||
//
|
||||
// nodeIDs - Ids of the search result nodes.
|
||||
func (p *GetSearchResultsParams) Do(ctx context.Context) (nodeIDs []cdp.NodeID, err error) {
|
||||
// execute
|
||||
var res GetSearchResultsReturns
|
||||
err = cdp.Execute(ctx, CommandGetSearchResults, p, &res)
|
||||
@@ -778,7 +809,7 @@ func (p *GetSearchResultsParams) Do(ctx context.Context) (nodeIds []cdp.NodeID,
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return res.NodeIds, nil
|
||||
return res.NodeIDs, nil
|
||||
}
|
||||
|
||||
// MarkUndoableStateParams marks last undoable state.
|
||||
@@ -810,8 +841,9 @@ type MoveToParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-moveTo
|
||||
//
|
||||
// parameters:
|
||||
// nodeID - Id of the node to move.
|
||||
// targetNodeID - Id of the element to drop the moved node into.
|
||||
//
|
||||
// nodeID - Id of the node to move.
|
||||
// targetNodeID - Id of the element to drop the moved node into.
|
||||
func MoveTo(nodeID cdp.NodeID, targetNodeID cdp.NodeID) *MoveToParams {
|
||||
return &MoveToParams{
|
||||
NodeID: nodeID,
|
||||
@@ -834,7 +866,8 @@ type MoveToReturns struct {
|
||||
// Do executes DOM.moveTo against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// nodeID - New id of the moved node.
|
||||
//
|
||||
// nodeID - New id of the moved node.
|
||||
func (p *MoveToParams) Do(ctx context.Context) (nodeID cdp.NodeID, err error) {
|
||||
// execute
|
||||
var res MoveToReturns
|
||||
@@ -861,7 +894,8 @@ type PerformSearchParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-performSearch
|
||||
//
|
||||
// parameters:
|
||||
// query - Plain text or query selector or XPath search query.
|
||||
//
|
||||
// query - Plain text or query selector or XPath search query.
|
||||
func PerformSearch(query string) *PerformSearchParams {
|
||||
return &PerformSearchParams{
|
||||
Query: query,
|
||||
@@ -883,8 +917,9 @@ type PerformSearchReturns struct {
|
||||
// Do executes DOM.performSearch against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// searchID - Unique search session identifier.
|
||||
// resultCount - Number of search results.
|
||||
//
|
||||
// searchID - Unique search session identifier.
|
||||
// resultCount - Number of search results.
|
||||
func (p *PerformSearchParams) Do(ctx context.Context) (searchID string, resultCount int64, err error) {
|
||||
// execute
|
||||
var res PerformSearchReturns
|
||||
@@ -908,7 +943,8 @@ type PushNodeByPathToFrontendParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-pushNodeByPathToFrontend
|
||||
//
|
||||
// parameters:
|
||||
// path - Path to node in the proprietary format.
|
||||
//
|
||||
// path - Path to node in the proprietary format.
|
||||
func PushNodeByPathToFrontend(path string) *PushNodeByPathToFrontendParams {
|
||||
return &PushNodeByPathToFrontendParams{
|
||||
Path: path,
|
||||
@@ -923,7 +959,8 @@ type PushNodeByPathToFrontendReturns struct {
|
||||
// Do executes DOM.pushNodeByPathToFrontend against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// nodeID - Id of the node for given path.
|
||||
//
|
||||
// nodeID - Id of the node for given path.
|
||||
func (p *PushNodeByPathToFrontendParams) Do(ctx context.Context) (nodeID cdp.NodeID, err error) {
|
||||
// execute
|
||||
var res PushNodeByPathToFrontendReturns
|
||||
@@ -935,43 +972,45 @@ func (p *PushNodeByPathToFrontendParams) Do(ctx context.Context) (nodeID cdp.Nod
|
||||
return res.NodeID, nil
|
||||
}
|
||||
|
||||
// PushNodesByBackendIdsToFrontendParams requests that a batch of nodes is
|
||||
// PushNodesByBackendIDsToFrontendParams requests that a batch of nodes is
|
||||
// sent to the caller given their backend node ids.
|
||||
type PushNodesByBackendIdsToFrontendParams struct {
|
||||
BackendNodeIds []cdp.BackendNodeID `json:"backendNodeIds"` // The array of backend node ids.
|
||||
type PushNodesByBackendIDsToFrontendParams struct {
|
||||
BackendNodeIDs []cdp.BackendNodeID `json:"backendNodeIds"` // The array of backend node ids.
|
||||
}
|
||||
|
||||
// PushNodesByBackendIdsToFrontend requests that a batch of nodes is sent to
|
||||
// PushNodesByBackendIDsToFrontend requests that a batch of nodes is sent to
|
||||
// the caller given their backend node ids.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-pushNodesByBackendIdsToFrontend
|
||||
//
|
||||
// parameters:
|
||||
// backendNodeIds - The array of backend node ids.
|
||||
func PushNodesByBackendIdsToFrontend(backendNodeIds []cdp.BackendNodeID) *PushNodesByBackendIdsToFrontendParams {
|
||||
return &PushNodesByBackendIdsToFrontendParams{
|
||||
BackendNodeIds: backendNodeIds,
|
||||
//
|
||||
// backendNodeIDs - The array of backend node ids.
|
||||
func PushNodesByBackendIDsToFrontend(backendNodeIDs []cdp.BackendNodeID) *PushNodesByBackendIDsToFrontendParams {
|
||||
return &PushNodesByBackendIDsToFrontendParams{
|
||||
BackendNodeIDs: backendNodeIDs,
|
||||
}
|
||||
}
|
||||
|
||||
// PushNodesByBackendIdsToFrontendReturns return values.
|
||||
type PushNodesByBackendIdsToFrontendReturns struct {
|
||||
NodeIds []cdp.NodeID `json:"nodeIds,omitempty"` // The array of ids of pushed nodes that correspond to the backend ids specified in backendNodeIds.
|
||||
// PushNodesByBackendIDsToFrontendReturns return values.
|
||||
type PushNodesByBackendIDsToFrontendReturns struct {
|
||||
NodeIDs []cdp.NodeID `json:"nodeIds,omitempty"` // The array of ids of pushed nodes that correspond to the backend ids specified in backendNodeIds.
|
||||
}
|
||||
|
||||
// Do executes DOM.pushNodesByBackendIdsToFrontend against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// nodeIds - The array of ids of pushed nodes that correspond to the backend ids specified in backendNodeIds.
|
||||
func (p *PushNodesByBackendIdsToFrontendParams) Do(ctx context.Context) (nodeIds []cdp.NodeID, err error) {
|
||||
//
|
||||
// nodeIDs - The array of ids of pushed nodes that correspond to the backend ids specified in backendNodeIds.
|
||||
func (p *PushNodesByBackendIDsToFrontendParams) Do(ctx context.Context) (nodeIDs []cdp.NodeID, err error) {
|
||||
// execute
|
||||
var res PushNodesByBackendIdsToFrontendReturns
|
||||
err = cdp.Execute(ctx, CommandPushNodesByBackendIdsToFrontend, p, &res)
|
||||
var res PushNodesByBackendIDsToFrontendReturns
|
||||
err = cdp.Execute(ctx, CommandPushNodesByBackendIDsToFrontend, p, &res)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return res.NodeIds, nil
|
||||
return res.NodeIDs, nil
|
||||
}
|
||||
|
||||
// QuerySelectorParams executes querySelector on a given node.
|
||||
@@ -985,8 +1024,9 @@ type QuerySelectorParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-querySelector
|
||||
//
|
||||
// parameters:
|
||||
// nodeID - Id of the node to query upon.
|
||||
// selector - Selector string.
|
||||
//
|
||||
// nodeID - Id of the node to query upon.
|
||||
// selector - Selector string.
|
||||
func QuerySelector(nodeID cdp.NodeID, selector string) *QuerySelectorParams {
|
||||
return &QuerySelectorParams{
|
||||
NodeID: nodeID,
|
||||
@@ -1002,7 +1042,8 @@ type QuerySelectorReturns struct {
|
||||
// Do executes DOM.querySelector against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// nodeID - Query selector result.
|
||||
//
|
||||
// nodeID - Query selector result.
|
||||
func (p *QuerySelectorParams) Do(ctx context.Context) (nodeID cdp.NodeID, err error) {
|
||||
// execute
|
||||
var res QuerySelectorReturns
|
||||
@@ -1025,8 +1066,9 @@ type QuerySelectorAllParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-querySelectorAll
|
||||
//
|
||||
// parameters:
|
||||
// nodeID - Id of the node to query upon.
|
||||
// selector - Selector string.
|
||||
//
|
||||
// nodeID - Id of the node to query upon.
|
||||
// selector - Selector string.
|
||||
func QuerySelectorAll(nodeID cdp.NodeID, selector string) *QuerySelectorAllParams {
|
||||
return &QuerySelectorAllParams{
|
||||
NodeID: nodeID,
|
||||
@@ -1036,14 +1078,15 @@ func QuerySelectorAll(nodeID cdp.NodeID, selector string) *QuerySelectorAllParam
|
||||
|
||||
// QuerySelectorAllReturns return values.
|
||||
type QuerySelectorAllReturns struct {
|
||||
NodeIds []cdp.NodeID `json:"nodeIds,omitempty"` // Query selector result.
|
||||
NodeIDs []cdp.NodeID `json:"nodeIds,omitempty"` // Query selector result.
|
||||
}
|
||||
|
||||
// Do executes DOM.querySelectorAll against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// nodeIds - Query selector result.
|
||||
func (p *QuerySelectorAllParams) Do(ctx context.Context) (nodeIds []cdp.NodeID, err error) {
|
||||
//
|
||||
// nodeIDs - Query selector result.
|
||||
func (p *QuerySelectorAllParams) Do(ctx context.Context) (nodeIDs []cdp.NodeID, err error) {
|
||||
// execute
|
||||
var res QuerySelectorAllReturns
|
||||
err = cdp.Execute(ctx, CommandQuerySelectorAll, p, &res)
|
||||
@@ -1051,7 +1094,42 @@ func (p *QuerySelectorAllParams) Do(ctx context.Context) (nodeIds []cdp.NodeID,
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return res.NodeIds, nil
|
||||
return res.NodeIDs, nil
|
||||
}
|
||||
|
||||
// GetTopLayerElementsParams 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.
|
||||
type GetTopLayerElementsParams struct{}
|
||||
|
||||
// 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.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getTopLayerElements
|
||||
func GetTopLayerElements() *GetTopLayerElementsParams {
|
||||
return &GetTopLayerElementsParams{}
|
||||
}
|
||||
|
||||
// GetTopLayerElementsReturns return values.
|
||||
type GetTopLayerElementsReturns struct {
|
||||
NodeIDs []cdp.NodeID `json:"nodeIds,omitempty"` // NodeIds of top layer elements
|
||||
}
|
||||
|
||||
// Do executes DOM.getTopLayerElements against the provided context.
|
||||
//
|
||||
// returns:
|
||||
//
|
||||
// nodeIDs - NodeIds of top layer elements
|
||||
func (p *GetTopLayerElementsParams) Do(ctx context.Context) (nodeIDs []cdp.NodeID, err error) {
|
||||
// execute
|
||||
var res GetTopLayerElementsReturns
|
||||
err = cdp.Execute(ctx, CommandGetTopLayerElements, nil, &res)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return res.NodeIDs, nil
|
||||
}
|
||||
|
||||
// RedoParams re-does the last undone action.
|
||||
@@ -1082,8 +1160,9 @@ type RemoveAttributeParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-removeAttribute
|
||||
//
|
||||
// parameters:
|
||||
// nodeID - Id of the element to remove attribute from.
|
||||
// name - Name of the attribute to remove.
|
||||
//
|
||||
// nodeID - Id of the element to remove attribute from.
|
||||
// name - Name of the attribute to remove.
|
||||
func RemoveAttribute(nodeID cdp.NodeID, name string) *RemoveAttributeParams {
|
||||
return &RemoveAttributeParams{
|
||||
NodeID: nodeID,
|
||||
@@ -1106,7 +1185,8 @@ type RemoveNodeParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-removeNode
|
||||
//
|
||||
// parameters:
|
||||
// nodeID - Id of the node to remove.
|
||||
//
|
||||
// nodeID - Id of the node to remove.
|
||||
func RemoveNode(nodeID cdp.NodeID) *RemoveNodeParams {
|
||||
return &RemoveNodeParams{
|
||||
NodeID: nodeID,
|
||||
@@ -1136,7 +1216,8 @@ type RequestChildNodesParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-requestChildNodes
|
||||
//
|
||||
// parameters:
|
||||
// nodeID - Id of the node to get children for.
|
||||
//
|
||||
// nodeID - Id of the node to get children for.
|
||||
func RequestChildNodes(nodeID cdp.NodeID) *RequestChildNodesParams {
|
||||
return &RequestChildNodesParams{
|
||||
NodeID: nodeID,
|
||||
@@ -1179,7 +1260,8 @@ type RequestNodeParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-requestNode
|
||||
//
|
||||
// parameters:
|
||||
// objectID - JavaScript object id to convert into node.
|
||||
//
|
||||
// objectID - JavaScript object id to convert into node.
|
||||
func RequestNode(objectID runtime.RemoteObjectID) *RequestNodeParams {
|
||||
return &RequestNodeParams{
|
||||
ObjectID: objectID,
|
||||
@@ -1194,7 +1276,8 @@ type RequestNodeReturns struct {
|
||||
// Do executes DOM.requestNode against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// nodeID - Node id for given object.
|
||||
//
|
||||
// nodeID - Node id for given object.
|
||||
func (p *RequestNodeParams) Do(ctx context.Context) (nodeID cdp.NodeID, err error) {
|
||||
// execute
|
||||
var res RequestNodeReturns
|
||||
@@ -1258,7 +1341,8 @@ type ResolveNodeReturns struct {
|
||||
// Do executes DOM.resolveNode against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// object - JavaScript object wrapper for given node.
|
||||
//
|
||||
// object - JavaScript object wrapper for given node.
|
||||
func (p *ResolveNodeParams) Do(ctx context.Context) (object *runtime.RemoteObject, err error) {
|
||||
// execute
|
||||
var res ResolveNodeReturns
|
||||
@@ -1282,9 +1366,10 @@ type SetAttributeValueParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-setAttributeValue
|
||||
//
|
||||
// parameters:
|
||||
// nodeID - Id of the element to set attribute for.
|
||||
// name - Attribute name.
|
||||
// value - Attribute value.
|
||||
//
|
||||
// nodeID - Id of the element to set attribute for.
|
||||
// name - Attribute name.
|
||||
// value - Attribute value.
|
||||
func SetAttributeValue(nodeID cdp.NodeID, name string, value string) *SetAttributeValueParams {
|
||||
return &SetAttributeValueParams{
|
||||
NodeID: nodeID,
|
||||
@@ -1314,8 +1399,9 @@ type SetAttributesAsTextParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-setAttributesAsText
|
||||
//
|
||||
// parameters:
|
||||
// nodeID - Id of the element to set attributes for.
|
||||
// text - Text with a number of attributes. Will parse this text using HTML parser.
|
||||
//
|
||||
// nodeID - Id of the element to set attributes for.
|
||||
// text - Text with a number of attributes. Will parse this text using HTML parser.
|
||||
func SetAttributesAsText(nodeID cdp.NodeID, text string) *SetAttributesAsTextParams {
|
||||
return &SetAttributesAsTextParams{
|
||||
NodeID: nodeID,
|
||||
@@ -1348,7 +1434,8 @@ type SetFileInputFilesParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-setFileInputFiles
|
||||
//
|
||||
// parameters:
|
||||
// files - Array of file paths to set.
|
||||
//
|
||||
// files - Array of file paths to set.
|
||||
func SetFileInputFiles(files []string) *SetFileInputFilesParams {
|
||||
return &SetFileInputFilesParams{
|
||||
Files: files,
|
||||
@@ -1390,7 +1477,8 @@ type SetNodeStackTracesEnabledParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-setNodeStackTracesEnabled
|
||||
//
|
||||
// parameters:
|
||||
// enable - Enable or disable.
|
||||
//
|
||||
// enable - Enable or disable.
|
||||
func SetNodeStackTracesEnabled(enable bool) *SetNodeStackTracesEnabledParams {
|
||||
return &SetNodeStackTracesEnabledParams{
|
||||
Enable: enable,
|
||||
@@ -1414,7 +1502,8 @@ type GetNodeStackTracesParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getNodeStackTraces
|
||||
//
|
||||
// parameters:
|
||||
// nodeID - Id of the node to get stack traces for.
|
||||
//
|
||||
// nodeID - Id of the node to get stack traces for.
|
||||
func GetNodeStackTraces(nodeID cdp.NodeID) *GetNodeStackTracesParams {
|
||||
return &GetNodeStackTracesParams{
|
||||
NodeID: nodeID,
|
||||
@@ -1429,7 +1518,8 @@ type GetNodeStackTracesReturns struct {
|
||||
// Do executes DOM.getNodeStackTraces against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// creation - Creation stack trace, if available.
|
||||
//
|
||||
// creation - Creation stack trace, if available.
|
||||
func (p *GetNodeStackTracesParams) Do(ctx context.Context) (creation *runtime.StackTrace, err error) {
|
||||
// execute
|
||||
var res GetNodeStackTracesReturns
|
||||
@@ -1451,7 +1541,8 @@ type GetFileInfoParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getFileInfo
|
||||
//
|
||||
// parameters:
|
||||
// objectID - JavaScript object id of the node wrapper.
|
||||
//
|
||||
// objectID - JavaScript object id of the node wrapper.
|
||||
func GetFileInfo(objectID runtime.RemoteObjectID) *GetFileInfoParams {
|
||||
return &GetFileInfoParams{
|
||||
ObjectID: objectID,
|
||||
@@ -1466,7 +1557,8 @@ type GetFileInfoReturns struct {
|
||||
// Do executes DOM.getFileInfo against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// path
|
||||
//
|
||||
// path
|
||||
func (p *GetFileInfoParams) Do(ctx context.Context) (path string, err error) {
|
||||
// execute
|
||||
var res GetFileInfoReturns
|
||||
@@ -1490,7 +1582,8 @@ type SetInspectedNodeParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-setInspectedNode
|
||||
//
|
||||
// parameters:
|
||||
// nodeID - DOM node id to be accessible by means of $x command line API.
|
||||
//
|
||||
// nodeID - DOM node id to be accessible by means of $x command line API.
|
||||
func SetInspectedNode(nodeID cdp.NodeID) *SetInspectedNodeParams {
|
||||
return &SetInspectedNodeParams{
|
||||
NodeID: nodeID,
|
||||
@@ -1513,8 +1606,9 @@ type SetNodeNameParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-setNodeName
|
||||
//
|
||||
// parameters:
|
||||
// nodeID - Id of the node to set name for.
|
||||
// name - New node's name.
|
||||
//
|
||||
// nodeID - Id of the node to set name for.
|
||||
// name - New node's name.
|
||||
func SetNodeName(nodeID cdp.NodeID, name string) *SetNodeNameParams {
|
||||
return &SetNodeNameParams{
|
||||
NodeID: nodeID,
|
||||
@@ -1530,7 +1624,8 @@ type SetNodeNameReturns struct {
|
||||
// Do executes DOM.setNodeName against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// nodeID - New node's id.
|
||||
//
|
||||
// nodeID - New node's id.
|
||||
func (p *SetNodeNameParams) Do(ctx context.Context) (nodeID cdp.NodeID, err error) {
|
||||
// execute
|
||||
var res SetNodeNameReturns
|
||||
@@ -1553,8 +1648,9 @@ type SetNodeValueParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-setNodeValue
|
||||
//
|
||||
// parameters:
|
||||
// nodeID - Id of the node to set value for.
|
||||
// value - New node's value.
|
||||
//
|
||||
// nodeID - Id of the node to set value for.
|
||||
// value - New node's value.
|
||||
func SetNodeValue(nodeID cdp.NodeID, value string) *SetNodeValueParams {
|
||||
return &SetNodeValueParams{
|
||||
NodeID: nodeID,
|
||||
@@ -1578,8 +1674,9 @@ type SetOuterHTMLParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-setOuterHTML
|
||||
//
|
||||
// parameters:
|
||||
// nodeID - Id of the node to set markup for.
|
||||
// outerHTML - Outer HTML markup to set.
|
||||
//
|
||||
// nodeID - Id of the node to set markup for.
|
||||
// outerHTML - Outer HTML markup to set.
|
||||
func SetOuterHTML(nodeID cdp.NodeID, outerHTML string) *SetOuterHTMLParams {
|
||||
return &SetOuterHTMLParams{
|
||||
NodeID: nodeID,
|
||||
@@ -1618,7 +1715,8 @@ type GetFrameOwnerParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getFrameOwner
|
||||
//
|
||||
// parameters:
|
||||
// frameID
|
||||
//
|
||||
// frameID
|
||||
func GetFrameOwner(frameID cdp.FrameID) *GetFrameOwnerParams {
|
||||
return &GetFrameOwnerParams{
|
||||
FrameID: frameID,
|
||||
@@ -1634,8 +1732,9 @@ type GetFrameOwnerReturns struct {
|
||||
// Do executes DOM.getFrameOwner against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// backendNodeID - Resulting node.
|
||||
// nodeID - Id of the node at given coordinates, only when enabled and requested document.
|
||||
//
|
||||
// backendNodeID - Resulting node.
|
||||
// nodeID - Id of the node at given coordinates, only when enabled and requested document.
|
||||
func (p *GetFrameOwnerParams) Do(ctx context.Context) (backendNodeID cdp.BackendNodeID, nodeID cdp.NodeID, err error) {
|
||||
// execute
|
||||
var res GetFrameOwnerReturns
|
||||
@@ -1647,48 +1746,144 @@ func (p *GetFrameOwnerParams) Do(ctx context.Context) (backendNodeID cdp.Backend
|
||||
return res.BackendNodeID, res.NodeID, nil
|
||||
}
|
||||
|
||||
// GetContainerForNodeParams returns the container of the given node based on
|
||||
// container query conditions. If containerName is given, it will find the
|
||||
// nearest container with a matching name; otherwise it will find the nearest
|
||||
// container regardless of its container name.
|
||||
type GetContainerForNodeParams struct {
|
||||
NodeID cdp.NodeID `json:"nodeId"`
|
||||
ContainerName string `json:"containerName,omitempty"`
|
||||
}
|
||||
|
||||
// GetContainerForNode returns the container of the given node based on
|
||||
// container query conditions. If containerName is given, it will find the
|
||||
// nearest container with a matching name; otherwise it will find the nearest
|
||||
// container regardless of its container name.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getContainerForNode
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// nodeID
|
||||
func GetContainerForNode(nodeID cdp.NodeID) *GetContainerForNodeParams {
|
||||
return &GetContainerForNodeParams{
|
||||
NodeID: nodeID,
|
||||
}
|
||||
}
|
||||
|
||||
// WithContainerName [no description].
|
||||
func (p GetContainerForNodeParams) WithContainerName(containerName string) *GetContainerForNodeParams {
|
||||
p.ContainerName = containerName
|
||||
return &p
|
||||
}
|
||||
|
||||
// GetContainerForNodeReturns return values.
|
||||
type GetContainerForNodeReturns struct {
|
||||
NodeID cdp.NodeID `json:"nodeId,omitempty"` // The container node for the given node, or null if not found.
|
||||
}
|
||||
|
||||
// Do executes DOM.getContainerForNode against the provided context.
|
||||
//
|
||||
// returns:
|
||||
//
|
||||
// nodeID - The container node for the given node, or null if not found.
|
||||
func (p *GetContainerForNodeParams) Do(ctx context.Context) (nodeID cdp.NodeID, err error) {
|
||||
// execute
|
||||
var res GetContainerForNodeReturns
|
||||
err = cdp.Execute(ctx, CommandGetContainerForNode, p, &res)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
return res.NodeID, nil
|
||||
}
|
||||
|
||||
// GetQueryingDescendantsForContainerParams returns the descendants of a
|
||||
// container query container that have container queries against this container.
|
||||
type GetQueryingDescendantsForContainerParams struct {
|
||||
NodeID cdp.NodeID `json:"nodeId"` // Id of the container node to find querying descendants from.
|
||||
}
|
||||
|
||||
// GetQueryingDescendantsForContainer returns the descendants of a container
|
||||
// query container that have container queries against this container.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-getQueryingDescendantsForContainer
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// nodeID - Id of the container node to find querying descendants from.
|
||||
func GetQueryingDescendantsForContainer(nodeID cdp.NodeID) *GetQueryingDescendantsForContainerParams {
|
||||
return &GetQueryingDescendantsForContainerParams{
|
||||
NodeID: nodeID,
|
||||
}
|
||||
}
|
||||
|
||||
// GetQueryingDescendantsForContainerReturns return values.
|
||||
type GetQueryingDescendantsForContainerReturns struct {
|
||||
NodeIDs []cdp.NodeID `json:"nodeIds,omitempty"` // Descendant nodes with container queries against the given container.
|
||||
}
|
||||
|
||||
// Do executes DOM.getQueryingDescendantsForContainer against the provided context.
|
||||
//
|
||||
// returns:
|
||||
//
|
||||
// nodeIDs - Descendant nodes with container queries against the given container.
|
||||
func (p *GetQueryingDescendantsForContainerParams) Do(ctx context.Context) (nodeIDs []cdp.NodeID, err error) {
|
||||
// execute
|
||||
var res GetQueryingDescendantsForContainerReturns
|
||||
err = cdp.Execute(ctx, CommandGetQueryingDescendantsForContainer, p, &res)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return res.NodeIDs, nil
|
||||
}
|
||||
|
||||
// Command names.
|
||||
const (
|
||||
CommandCollectClassNamesFromSubtree = "DOM.collectClassNamesFromSubtree"
|
||||
CommandCopyTo = "DOM.copyTo"
|
||||
CommandDescribeNode = "DOM.describeNode"
|
||||
CommandScrollIntoViewIfNeeded = "DOM.scrollIntoViewIfNeeded"
|
||||
CommandDisable = "DOM.disable"
|
||||
CommandDiscardSearchResults = "DOM.discardSearchResults"
|
||||
CommandEnable = "DOM.enable"
|
||||
CommandFocus = "DOM.focus"
|
||||
CommandGetAttributes = "DOM.getAttributes"
|
||||
CommandGetBoxModel = "DOM.getBoxModel"
|
||||
CommandGetContentQuads = "DOM.getContentQuads"
|
||||
CommandGetDocument = "DOM.getDocument"
|
||||
CommandGetNodesForSubtreeByStyle = "DOM.getNodesForSubtreeByStyle"
|
||||
CommandGetNodeForLocation = "DOM.getNodeForLocation"
|
||||
CommandGetOuterHTML = "DOM.getOuterHTML"
|
||||
CommandGetRelayoutBoundary = "DOM.getRelayoutBoundary"
|
||||
CommandGetSearchResults = "DOM.getSearchResults"
|
||||
CommandMarkUndoableState = "DOM.markUndoableState"
|
||||
CommandMoveTo = "DOM.moveTo"
|
||||
CommandPerformSearch = "DOM.performSearch"
|
||||
CommandPushNodeByPathToFrontend = "DOM.pushNodeByPathToFrontend"
|
||||
CommandPushNodesByBackendIdsToFrontend = "DOM.pushNodesByBackendIdsToFrontend"
|
||||
CommandQuerySelector = "DOM.querySelector"
|
||||
CommandQuerySelectorAll = "DOM.querySelectorAll"
|
||||
CommandRedo = "DOM.redo"
|
||||
CommandRemoveAttribute = "DOM.removeAttribute"
|
||||
CommandRemoveNode = "DOM.removeNode"
|
||||
CommandRequestChildNodes = "DOM.requestChildNodes"
|
||||
CommandRequestNode = "DOM.requestNode"
|
||||
CommandResolveNode = "DOM.resolveNode"
|
||||
CommandSetAttributeValue = "DOM.setAttributeValue"
|
||||
CommandSetAttributesAsText = "DOM.setAttributesAsText"
|
||||
CommandSetFileInputFiles = "DOM.setFileInputFiles"
|
||||
CommandSetNodeStackTracesEnabled = "DOM.setNodeStackTracesEnabled"
|
||||
CommandGetNodeStackTraces = "DOM.getNodeStackTraces"
|
||||
CommandGetFileInfo = "DOM.getFileInfo"
|
||||
CommandSetInspectedNode = "DOM.setInspectedNode"
|
||||
CommandSetNodeName = "DOM.setNodeName"
|
||||
CommandSetNodeValue = "DOM.setNodeValue"
|
||||
CommandSetOuterHTML = "DOM.setOuterHTML"
|
||||
CommandUndo = "DOM.undo"
|
||||
CommandGetFrameOwner = "DOM.getFrameOwner"
|
||||
CommandCollectClassNamesFromSubtree = "DOM.collectClassNamesFromSubtree"
|
||||
CommandCopyTo = "DOM.copyTo"
|
||||
CommandDescribeNode = "DOM.describeNode"
|
||||
CommandScrollIntoViewIfNeeded = "DOM.scrollIntoViewIfNeeded"
|
||||
CommandDisable = "DOM.disable"
|
||||
CommandDiscardSearchResults = "DOM.discardSearchResults"
|
||||
CommandEnable = "DOM.enable"
|
||||
CommandFocus = "DOM.focus"
|
||||
CommandGetAttributes = "DOM.getAttributes"
|
||||
CommandGetBoxModel = "DOM.getBoxModel"
|
||||
CommandGetContentQuads = "DOM.getContentQuads"
|
||||
CommandGetDocument = "DOM.getDocument"
|
||||
CommandGetNodesForSubtreeByStyle = "DOM.getNodesForSubtreeByStyle"
|
||||
CommandGetNodeForLocation = "DOM.getNodeForLocation"
|
||||
CommandGetOuterHTML = "DOM.getOuterHTML"
|
||||
CommandGetRelayoutBoundary = "DOM.getRelayoutBoundary"
|
||||
CommandGetSearchResults = "DOM.getSearchResults"
|
||||
CommandMarkUndoableState = "DOM.markUndoableState"
|
||||
CommandMoveTo = "DOM.moveTo"
|
||||
CommandPerformSearch = "DOM.performSearch"
|
||||
CommandPushNodeByPathToFrontend = "DOM.pushNodeByPathToFrontend"
|
||||
CommandPushNodesByBackendIDsToFrontend = "DOM.pushNodesByBackendIdsToFrontend"
|
||||
CommandQuerySelector = "DOM.querySelector"
|
||||
CommandQuerySelectorAll = "DOM.querySelectorAll"
|
||||
CommandGetTopLayerElements = "DOM.getTopLayerElements"
|
||||
CommandRedo = "DOM.redo"
|
||||
CommandRemoveAttribute = "DOM.removeAttribute"
|
||||
CommandRemoveNode = "DOM.removeNode"
|
||||
CommandRequestChildNodes = "DOM.requestChildNodes"
|
||||
CommandRequestNode = "DOM.requestNode"
|
||||
CommandResolveNode = "DOM.resolveNode"
|
||||
CommandSetAttributeValue = "DOM.setAttributeValue"
|
||||
CommandSetAttributesAsText = "DOM.setAttributesAsText"
|
||||
CommandSetFileInputFiles = "DOM.setFileInputFiles"
|
||||
CommandSetNodeStackTracesEnabled = "DOM.setNodeStackTracesEnabled"
|
||||
CommandGetNodeStackTraces = "DOM.getNodeStackTraces"
|
||||
CommandGetFileInfo = "DOM.getFileInfo"
|
||||
CommandSetInspectedNode = "DOM.setInspectedNode"
|
||||
CommandSetNodeName = "DOM.setNodeName"
|
||||
CommandSetNodeValue = "DOM.setNodeValue"
|
||||
CommandSetOuterHTML = "DOM.setOuterHTML"
|
||||
CommandUndo = "DOM.undo"
|
||||
CommandGetFrameOwner = "DOM.getFrameOwner"
|
||||
CommandGetContainerForNode = "DOM.getContainerForNode"
|
||||
CommandGetQueryingDescendantsForContainer = "DOM.getQueryingDescendantsForContainer"
|
||||
)
|
||||
|
||||
1426
vendor/github.com/chromedp/cdproto/dom/easyjson.go
generated
vendored
1426
vendor/github.com/chromedp/cdproto/dom/easyjson.go
generated
vendored
File diff suppressed because it is too large
Load Diff
9
vendor/github.com/chromedp/cdproto/dom/events.go
generated
vendored
9
vendor/github.com/chromedp/cdproto/dom/events.go
generated
vendored
@@ -45,7 +45,7 @@ type EventChildNodeCountUpdated struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-childNodeInserted
|
||||
type EventChildNodeInserted struct {
|
||||
ParentNodeID cdp.NodeID `json:"parentNodeId"` // Id of the node that has changed.
|
||||
PreviousNodeID cdp.NodeID `json:"previousNodeId"` // If of the previous siblint.
|
||||
PreviousNodeID cdp.NodeID `json:"previousNodeId"` // Id of the previous sibling.
|
||||
Node *cdp.Node `json:"node"` // Inserted node data.
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ type EventDocumentUpdated struct{}
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-inlineStyleInvalidated
|
||||
type EventInlineStyleInvalidated struct {
|
||||
NodeIds []cdp.NodeID `json:"nodeIds"` // Ids of the nodes for which the inline styles have been invalidated.
|
||||
NodeIDs []cdp.NodeID `json:"nodeIds"` // Ids of the nodes for which the inline styles have been invalidated.
|
||||
}
|
||||
|
||||
// EventPseudoElementAdded called when a pseudo element is added to an
|
||||
@@ -88,6 +88,11 @@ type EventPseudoElementAdded struct {
|
||||
PseudoElement *cdp.Node `json:"pseudoElement"` // The added pseudo element.
|
||||
}
|
||||
|
||||
// EventTopLayerElementsUpdated called when top layer elements are changed.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#event-topLayerElementsUpdated
|
||||
type EventTopLayerElementsUpdated struct{}
|
||||
|
||||
// EventPseudoElementRemoved called when a pseudo element is removed from an
|
||||
// element.
|
||||
//
|
||||
|
||||
50
vendor/github.com/chromedp/cdproto/dom/types.go
generated
vendored
50
vendor/github.com/chromedp/cdproto/dom/types.go
generated
vendored
@@ -3,7 +3,11 @@ package dom
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/mailru/easyjson"
|
||||
"github.com/mailru/easyjson/jlexer"
|
||||
"github.com/mailru/easyjson/jwriter"
|
||||
)
|
||||
|
||||
// Quad an array of quad vertices, x immediately followed by y for each
|
||||
@@ -51,3 +55,49 @@ type CSSComputedStyleProperty struct {
|
||||
Name string `json:"name"` // Computed style property name.
|
||||
Value string `json:"value"` // Computed style property value.
|
||||
}
|
||||
|
||||
// EnableIncludeWhitespace whether to include whitespaces in the children
|
||||
// array of returned Nodes.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOM#method-enable
|
||||
type EnableIncludeWhitespace string
|
||||
|
||||
// String returns the EnableIncludeWhitespace as string value.
|
||||
func (t EnableIncludeWhitespace) String() string {
|
||||
return string(t)
|
||||
}
|
||||
|
||||
// EnableIncludeWhitespace values.
|
||||
const (
|
||||
EnableIncludeWhitespaceNone EnableIncludeWhitespace = "none"
|
||||
EnableIncludeWhitespaceAll EnableIncludeWhitespace = "all"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
func (t EnableIncludeWhitespace) MarshalEasyJSON(out *jwriter.Writer) {
|
||||
out.String(string(t))
|
||||
}
|
||||
|
||||
// MarshalJSON satisfies json.Marshaler.
|
||||
func (t EnableIncludeWhitespace) MarshalJSON() ([]byte, error) {
|
||||
return easyjson.Marshal(t)
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *EnableIncludeWhitespace) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
v := in.String()
|
||||
switch EnableIncludeWhitespace(v) {
|
||||
case EnableIncludeWhitespaceNone:
|
||||
*t = EnableIncludeWhitespaceNone
|
||||
case EnableIncludeWhitespaceAll:
|
||||
*t = EnableIncludeWhitespaceAll
|
||||
|
||||
default:
|
||||
in.AddError(fmt.Errorf("unknown EnableIncludeWhitespace value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
// UnmarshalJSON satisfies json.Unmarshaler.
|
||||
func (t *EnableIncludeWhitespace) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
37
vendor/github.com/chromedp/cdproto/domdebugger/domdebugger.go
generated
vendored
37
vendor/github.com/chromedp/cdproto/domdebugger/domdebugger.go
generated
vendored
@@ -29,7 +29,8 @@ type GetEventListenersParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMDebugger#method-getEventListeners
|
||||
//
|
||||
// parameters:
|
||||
// objectID - Identifier of the object to return listeners for.
|
||||
//
|
||||
// objectID - Identifier of the object to return listeners for.
|
||||
func GetEventListeners(objectID runtime.RemoteObjectID) *GetEventListenersParams {
|
||||
return &GetEventListenersParams{
|
||||
ObjectID: objectID,
|
||||
@@ -60,7 +61,8 @@ type GetEventListenersReturns struct {
|
||||
// Do executes DOMDebugger.getEventListeners against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// listeners - Array of relevant listeners.
|
||||
//
|
||||
// listeners - Array of relevant listeners.
|
||||
func (p *GetEventListenersParams) Do(ctx context.Context) (listeners []*EventListener, err error) {
|
||||
// execute
|
||||
var res GetEventListenersReturns
|
||||
@@ -85,8 +87,9 @@ type RemoveDOMBreakpointParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMDebugger#method-removeDOMBreakpoint
|
||||
//
|
||||
// parameters:
|
||||
// nodeID - Identifier of the node to remove breakpoint from.
|
||||
// type - Type of the breakpoint to remove.
|
||||
//
|
||||
// nodeID - Identifier of the node to remove breakpoint from.
|
||||
// type - Type of the breakpoint to remove.
|
||||
func RemoveDOMBreakpoint(nodeID cdp.NodeID, typeVal DOMBreakpointType) *RemoveDOMBreakpointParams {
|
||||
return &RemoveDOMBreakpointParams{
|
||||
NodeID: nodeID,
|
||||
@@ -111,7 +114,8 @@ type RemoveEventListenerBreakpointParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMDebugger#method-removeEventListenerBreakpoint
|
||||
//
|
||||
// parameters:
|
||||
// eventName - Event name.
|
||||
//
|
||||
// eventName - Event name.
|
||||
func RemoveEventListenerBreakpoint(eventName string) *RemoveEventListenerBreakpointParams {
|
||||
return &RemoveEventListenerBreakpointParams{
|
||||
EventName: eventName,
|
||||
@@ -141,7 +145,8 @@ type RemoveInstrumentationBreakpointParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMDebugger#method-removeInstrumentationBreakpoint
|
||||
//
|
||||
// parameters:
|
||||
// eventName - Instrumentation name to stop on.
|
||||
//
|
||||
// eventName - Instrumentation name to stop on.
|
||||
func RemoveInstrumentationBreakpoint(eventName string) *RemoveInstrumentationBreakpointParams {
|
||||
return &RemoveInstrumentationBreakpointParams{
|
||||
EventName: eventName,
|
||||
@@ -163,7 +168,8 @@ type RemoveXHRBreakpointParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMDebugger#method-removeXHRBreakpoint
|
||||
//
|
||||
// parameters:
|
||||
// url - Resource URL substring.
|
||||
//
|
||||
// url - Resource URL substring.
|
||||
func RemoveXHRBreakpoint(url string) *RemoveXHRBreakpointParams {
|
||||
return &RemoveXHRBreakpointParams{
|
||||
URL: url,
|
||||
@@ -185,7 +191,8 @@ type SetBreakOnCSPViolationParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMDebugger#method-setBreakOnCSPViolation
|
||||
//
|
||||
// parameters:
|
||||
// violationTypes - CSP Violations to stop upon.
|
||||
//
|
||||
// violationTypes - CSP Violations to stop upon.
|
||||
func SetBreakOnCSPViolation(violationTypes []CSPViolationType) *SetBreakOnCSPViolationParams {
|
||||
return &SetBreakOnCSPViolationParams{
|
||||
ViolationTypes: violationTypes,
|
||||
@@ -208,8 +215,9 @@ type SetDOMBreakpointParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMDebugger#method-setDOMBreakpoint
|
||||
//
|
||||
// parameters:
|
||||
// nodeID - Identifier of the node to set breakpoint on.
|
||||
// type - Type of the operation to stop upon.
|
||||
//
|
||||
// nodeID - Identifier of the node to set breakpoint on.
|
||||
// type - Type of the operation to stop upon.
|
||||
func SetDOMBreakpoint(nodeID cdp.NodeID, typeVal DOMBreakpointType) *SetDOMBreakpointParams {
|
||||
return &SetDOMBreakpointParams{
|
||||
NodeID: nodeID,
|
||||
@@ -233,7 +241,8 @@ type SetEventListenerBreakpointParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMDebugger#method-setEventListenerBreakpoint
|
||||
//
|
||||
// parameters:
|
||||
// eventName - DOM Event name to stop on (any DOM event will do).
|
||||
//
|
||||
// eventName - DOM Event name to stop on (any DOM event will do).
|
||||
func SetEventListenerBreakpoint(eventName string) *SetEventListenerBreakpointParams {
|
||||
return &SetEventListenerBreakpointParams{
|
||||
EventName: eventName,
|
||||
@@ -263,7 +272,8 @@ type SetInstrumentationBreakpointParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMDebugger#method-setInstrumentationBreakpoint
|
||||
//
|
||||
// parameters:
|
||||
// eventName - Instrumentation name to stop on.
|
||||
//
|
||||
// eventName - Instrumentation name to stop on.
|
||||
func SetInstrumentationBreakpoint(eventName string) *SetInstrumentationBreakpointParams {
|
||||
return &SetInstrumentationBreakpointParams{
|
||||
EventName: eventName,
|
||||
@@ -285,7 +295,8 @@ type SetXHRBreakpointParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMDebugger#method-setXHRBreakpoint
|
||||
//
|
||||
// parameters:
|
||||
// url - Resource URL substring. All XHRs having this substring in the URL will get stopped upon.
|
||||
//
|
||||
// url - Resource URL substring. All XHRs having this substring in the URL will get stopped upon.
|
||||
func SetXHRBreakpoint(url string) *SetXHRBreakpointParams {
|
||||
return &SetXHRBreakpointParams{
|
||||
URL: url,
|
||||
|
||||
12
vendor/github.com/chromedp/cdproto/domdebugger/types.go
generated
vendored
12
vendor/github.com/chromedp/cdproto/domdebugger/types.go
generated
vendored
@@ -3,7 +3,7 @@ package domdebugger
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/chromedp/cdproto/cdp"
|
||||
"github.com/chromedp/cdproto/runtime"
|
||||
@@ -41,7 +41,8 @@ func (t DOMBreakpointType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *DOMBreakpointType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch DOMBreakpointType(in.String()) {
|
||||
v := in.String()
|
||||
switch DOMBreakpointType(v) {
|
||||
case DOMBreakpointTypeSubtreeModified:
|
||||
*t = DOMBreakpointTypeSubtreeModified
|
||||
case DOMBreakpointTypeAttributeModified:
|
||||
@@ -50,7 +51,7 @@ func (t *DOMBreakpointType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = DOMBreakpointTypeNodeRemoved
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown DOMBreakpointType value"))
|
||||
in.AddError(fmt.Errorf("unknown DOMBreakpointType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,14 +88,15 @@ func (t CSPViolationType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *CSPViolationType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch CSPViolationType(in.String()) {
|
||||
v := in.String()
|
||||
switch CSPViolationType(v) {
|
||||
case CSPViolationTypeTrustedtypeSinkViolation:
|
||||
*t = CSPViolationTypeTrustedtypeSinkViolation
|
||||
case CSPViolationTypeTrustedtypePolicyViolation:
|
||||
*t = CSPViolationTypeTrustedtypePolicyViolation
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown CSPViolationType value"))
|
||||
in.AddError(fmt.Errorf("unknown CSPViolationType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
8
vendor/github.com/chromedp/cdproto/domsnapshot/domsnapshot.go
generated
vendored
8
vendor/github.com/chromedp/cdproto/domsnapshot/domsnapshot.go
generated
vendored
@@ -67,7 +67,8 @@ type CaptureSnapshotParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMSnapshot#method-captureSnapshot
|
||||
//
|
||||
// parameters:
|
||||
// computedStyles - Whitelist of computed styles to return.
|
||||
//
|
||||
// computedStyles - Whitelist of computed styles to return.
|
||||
func CaptureSnapshot(computedStyles []string) *CaptureSnapshotParams {
|
||||
return &CaptureSnapshotParams{
|
||||
ComputedStyles: computedStyles,
|
||||
@@ -115,8 +116,9 @@ type CaptureSnapshotReturns struct {
|
||||
// Do executes DOMSnapshot.captureSnapshot against the provided context.
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// 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 (p *CaptureSnapshotParams) Do(ctx context.Context) (documents []*DocumentSnapshot, strings []string, err error) {
|
||||
// execute
|
||||
var res CaptureSnapshotReturns
|
||||
|
||||
40
vendor/github.com/chromedp/cdproto/domsnapshot/easyjson.go
generated
vendored
40
vendor/github.com/chromedp/cdproto/domsnapshot/easyjson.go
generated
vendored
@@ -704,6 +704,16 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot4(in *jlexer.Lexer
|
||||
}
|
||||
in.Delim(']')
|
||||
}
|
||||
case "shadowRootType":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
out.ShadowRootType = nil
|
||||
} else {
|
||||
if out.ShadowRootType == nil {
|
||||
out.ShadowRootType = new(RareStringData)
|
||||
}
|
||||
(*out.ShadowRootType).UnmarshalEasyJSON(in)
|
||||
}
|
||||
case "nodeName":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
@@ -877,6 +887,16 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomsnapshot4(in *jlexer.Lexer
|
||||
}
|
||||
(*out.PseudoType).UnmarshalEasyJSON(in)
|
||||
}
|
||||
case "pseudoIdentifier":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
out.PseudoIdentifier = nil
|
||||
} else {
|
||||
if out.PseudoIdentifier == nil {
|
||||
out.PseudoIdentifier = new(RareStringData)
|
||||
}
|
||||
(*out.PseudoIdentifier).UnmarshalEasyJSON(in)
|
||||
}
|
||||
case "isClickable":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
@@ -955,6 +975,16 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot4(out *jwriter.Wri
|
||||
out.RawByte(']')
|
||||
}
|
||||
}
|
||||
if in.ShadowRootType != nil {
|
||||
const prefix string = ",\"shadowRootType\":"
|
||||
if first {
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
} else {
|
||||
out.RawString(prefix)
|
||||
}
|
||||
(*in.ShadowRootType).MarshalEasyJSON(out)
|
||||
}
|
||||
if len(in.NodeName) != 0 {
|
||||
const prefix string = ",\"nodeName\":"
|
||||
if first {
|
||||
@@ -1102,6 +1132,16 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomsnapshot4(out *jwriter.Wri
|
||||
}
|
||||
(*in.PseudoType).MarshalEasyJSON(out)
|
||||
}
|
||||
if in.PseudoIdentifier != nil {
|
||||
const prefix string = ",\"pseudoIdentifier\":"
|
||||
if first {
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
} else {
|
||||
out.RawString(prefix)
|
||||
}
|
||||
(*in.PseudoIdentifier).MarshalEasyJSON(out)
|
||||
}
|
||||
if in.IsClickable != nil {
|
||||
const prefix string = ",\"isClickable\":"
|
||||
if first {
|
||||
|
||||
2
vendor/github.com/chromedp/cdproto/domsnapshot/types.go
generated
vendored
2
vendor/github.com/chromedp/cdproto/domsnapshot/types.go
generated
vendored
@@ -151,6 +151,7 @@ type DocumentSnapshot struct {
|
||||
type NodeTreeSnapshot struct {
|
||||
ParentIndex []int64 `json:"parentIndex,omitempty"` // Parent node index.
|
||||
NodeType []int64 `json:"nodeType,omitempty"` // Node's nodeType.
|
||||
ShadowRootType *RareStringData `json:"shadowRootType,omitempty"` // Type of the shadow root the Node is in. String values are equal to the ShadowRootType enum.
|
||||
NodeName []StringIndex `json:"nodeName,omitempty"` // Node's nodeName.
|
||||
NodeValue []StringIndex `json:"nodeValue,omitempty"` // Node's nodeValue.
|
||||
BackendNodeID []cdp.BackendNodeID `json:"backendNodeId,omitempty"` // Node's id, corresponds to DOM.Node.backendNodeId.
|
||||
@@ -161,6 +162,7 @@ type NodeTreeSnapshot struct {
|
||||
OptionSelected *RareBooleanData `json:"optionSelected,omitempty"` // Only set for option elements, indicates if the element has been selected
|
||||
ContentDocumentIndex *RareIntegerData `json:"contentDocumentIndex,omitempty"` // The index of the document in the list of the snapshot documents.
|
||||
PseudoType *RareStringData `json:"pseudoType,omitempty"` // Type of a pseudo element node.
|
||||
PseudoIdentifier *RareStringData `json:"pseudoIdentifier,omitempty"` // Pseudo element identifier for this node. Only present if there is a valid pseudoType.
|
||||
IsClickable *RareBooleanData `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 *RareStringData `json:"currentSourceURL,omitempty"` // The selected url for nodes with a srcset attribute.
|
||||
OriginURL *RareStringData `json:"originURL,omitempty"` // The url of the script (if any) that generates this node.
|
||||
|
||||
21
vendor/github.com/chromedp/cdproto/domstorage/domstorage.go
generated
vendored
21
vendor/github.com/chromedp/cdproto/domstorage/domstorage.go
generated
vendored
@@ -24,7 +24,8 @@ type ClearParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMStorage#method-clear
|
||||
//
|
||||
// parameters:
|
||||
// storageID
|
||||
//
|
||||
// storageID
|
||||
func Clear(storageID *StorageID) *ClearParams {
|
||||
return &ClearParams{
|
||||
StorageID: storageID,
|
||||
@@ -80,7 +81,8 @@ type GetDOMStorageItemsParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMStorage#method-getDOMStorageItems
|
||||
//
|
||||
// parameters:
|
||||
// storageID
|
||||
//
|
||||
// storageID
|
||||
func GetDOMStorageItems(storageID *StorageID) *GetDOMStorageItemsParams {
|
||||
return &GetDOMStorageItemsParams{
|
||||
StorageID: storageID,
|
||||
@@ -95,7 +97,8 @@ type GetDOMStorageItemsReturns struct {
|
||||
// Do executes DOMStorage.getDOMStorageItems against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// entries
|
||||
//
|
||||
// entries
|
||||
func (p *GetDOMStorageItemsParams) Do(ctx context.Context) (entries []Item, err error) {
|
||||
// execute
|
||||
var res GetDOMStorageItemsReturns
|
||||
@@ -118,8 +121,9 @@ type RemoveDOMStorageItemParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMStorage#method-removeDOMStorageItem
|
||||
//
|
||||
// parameters:
|
||||
// storageID
|
||||
// key
|
||||
//
|
||||
// storageID
|
||||
// key
|
||||
func RemoveDOMStorageItem(storageID *StorageID, key string) *RemoveDOMStorageItemParams {
|
||||
return &RemoveDOMStorageItemParams{
|
||||
StorageID: storageID,
|
||||
@@ -144,9 +148,10 @@ type SetDOMStorageItemParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMStorage#method-setDOMStorageItem
|
||||
//
|
||||
// parameters:
|
||||
// storageID
|
||||
// key
|
||||
// value
|
||||
//
|
||||
// storageID
|
||||
// key
|
||||
// value
|
||||
func SetDOMStorageItem(storageID *StorageID, key string, value string) *SetDOMStorageItemParams {
|
||||
return &SetDOMStorageItemParams{
|
||||
StorageID: storageID,
|
||||
|
||||
22
vendor/github.com/chromedp/cdproto/domstorage/easyjson.go
generated
vendored
22
vendor/github.com/chromedp/cdproto/domstorage/easyjson.go
generated
vendored
@@ -38,6 +38,8 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage(in *jlexer.Lexer,
|
||||
switch key {
|
||||
case "securityOrigin":
|
||||
out.SecurityOrigin = string(in.String())
|
||||
case "storageKey":
|
||||
out.StorageKey = SerializedStorageKey(in.String())
|
||||
case "isLocalStorage":
|
||||
out.IsLocalStorage = bool(in.Bool())
|
||||
default:
|
||||
@@ -54,14 +56,30 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage(out *jwriter.Write
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
if in.SecurityOrigin != "" {
|
||||
const prefix string = ",\"securityOrigin\":"
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
out.String(string(in.SecurityOrigin))
|
||||
}
|
||||
if in.StorageKey != "" {
|
||||
const prefix string = ",\"storageKey\":"
|
||||
if first {
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
} else {
|
||||
out.RawString(prefix)
|
||||
}
|
||||
out.String(string(in.StorageKey))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"isLocalStorage\":"
|
||||
out.RawString(prefix)
|
||||
if first {
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
} else {
|
||||
out.RawString(prefix)
|
||||
}
|
||||
out.Bool(bool(in.IsLocalStorage))
|
||||
}
|
||||
out.RawByte('}')
|
||||
|
||||
15
vendor/github.com/chromedp/cdproto/domstorage/types.go
generated
vendored
15
vendor/github.com/chromedp/cdproto/domstorage/types.go
generated
vendored
@@ -2,12 +2,23 @@ package domstorage
|
||||
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
// SerializedStorageKey [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMStorage#type-SerializedStorageKey
|
||||
type SerializedStorageKey string
|
||||
|
||||
// String returns the SerializedStorageKey as string value.
|
||||
func (t SerializedStorageKey) String() string {
|
||||
return string(t)
|
||||
}
|
||||
|
||||
// StorageID DOM Storage identifier.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/DOMStorage#type-StorageId
|
||||
type StorageID struct {
|
||||
SecurityOrigin string `json:"securityOrigin"` // Security origin for the storage.
|
||||
IsLocalStorage bool `json:"isLocalStorage"` // Whether the storage is local storage (not session storage).
|
||||
SecurityOrigin string `json:"securityOrigin,omitempty"` // Security origin for the storage.
|
||||
StorageKey SerializedStorageKey `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).
|
||||
}
|
||||
|
||||
// Item DOM Storage item.
|
||||
|
||||
552
vendor/github.com/chromedp/cdproto/emulation/easyjson.go
generated
vendored
552
vendor/github.com/chromedp/cdproto/emulation/easyjson.go
generated
vendored
File diff suppressed because it is too large
Load Diff
145
vendor/github.com/chromedp/cdproto/emulation/emulation.go
generated
vendored
145
vendor/github.com/chromedp/cdproto/emulation/emulation.go
generated
vendored
@@ -33,7 +33,8 @@ type CanEmulateReturns struct {
|
||||
// Do executes Emulation.canEmulate against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// result - True if emulation is supported.
|
||||
//
|
||||
// result - True if emulation is supported.
|
||||
func (p *CanEmulateParams) Do(ctx context.Context) (result bool, err error) {
|
||||
// execute
|
||||
var res CanEmulateReturns
|
||||
@@ -106,7 +107,8 @@ type SetFocusEmulationEnabledParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setFocusEmulationEnabled
|
||||
//
|
||||
// parameters:
|
||||
// enabled - Whether to enable to disable focus emulation.
|
||||
//
|
||||
// enabled - Whether to enable to disable focus emulation.
|
||||
func SetFocusEmulationEnabled(enabled bool) *SetFocusEmulationEnabledParams {
|
||||
return &SetFocusEmulationEnabledParams{
|
||||
Enabled: enabled,
|
||||
@@ -118,6 +120,34 @@ func (p *SetFocusEmulationEnabledParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandSetFocusEmulationEnabled, p, nil)
|
||||
}
|
||||
|
||||
// SetAutoDarkModeOverrideParams automatically render all web contents using
|
||||
// a dark theme.
|
||||
type SetAutoDarkModeOverrideParams struct {
|
||||
Enabled bool `json:"enabled,omitempty"` // Whether to enable or disable automatic dark mode. If not specified, any existing override will be cleared.
|
||||
}
|
||||
|
||||
// SetAutoDarkModeOverride automatically render all web contents using a dark
|
||||
// theme.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setAutoDarkModeOverride
|
||||
//
|
||||
// parameters:
|
||||
func SetAutoDarkModeOverride() *SetAutoDarkModeOverrideParams {
|
||||
return &SetAutoDarkModeOverrideParams{}
|
||||
}
|
||||
|
||||
// WithEnabled whether to enable or disable automatic dark mode. If not
|
||||
// specified, any existing override will be cleared.
|
||||
func (p SetAutoDarkModeOverrideParams) WithEnabled(enabled bool) *SetAutoDarkModeOverrideParams {
|
||||
p.Enabled = enabled
|
||||
return &p
|
||||
}
|
||||
|
||||
// Do executes Emulation.setAutoDarkModeOverride against the provided context.
|
||||
func (p *SetAutoDarkModeOverrideParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandSetAutoDarkModeOverride, p, nil)
|
||||
}
|
||||
|
||||
// SetCPUThrottlingRateParams enables CPU throttling to emulate slow CPUs.
|
||||
type SetCPUThrottlingRateParams struct {
|
||||
Rate float64 `json:"rate"` // Throttling rate as a slowdown factor (1 is no throttle, 2 is 2x slowdown, etc).
|
||||
@@ -128,7 +158,8 @@ type SetCPUThrottlingRateParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setCPUThrottlingRate
|
||||
//
|
||||
// parameters:
|
||||
// rate - Throttling rate as a slowdown factor (1 is no throttle, 2 is 2x slowdown, etc).
|
||||
//
|
||||
// rate - Throttling rate as a slowdown factor (1 is no throttle, 2 is 2x slowdown, etc).
|
||||
func SetCPUThrottlingRate(rate float64) *SetCPUThrottlingRateParams {
|
||||
return &SetCPUThrottlingRateParams{
|
||||
Rate: rate,
|
||||
@@ -198,10 +229,11 @@ type SetDeviceMetricsOverrideParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setDeviceMetricsOverride
|
||||
//
|
||||
// parameters:
|
||||
// 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.
|
||||
//
|
||||
// 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.
|
||||
func SetDeviceMetricsOverride(width int64, height int64, deviceScaleFactor float64, mobile bool) *SetDeviceMetricsOverrideParams {
|
||||
return &SetDeviceMetricsOverrideParams{
|
||||
Width: width,
|
||||
@@ -288,7 +320,8 @@ type SetScrollbarsHiddenParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setScrollbarsHidden
|
||||
//
|
||||
// parameters:
|
||||
// hidden - Whether scrollbars should be always hidden.
|
||||
//
|
||||
// hidden - Whether scrollbars should be always hidden.
|
||||
func SetScrollbarsHidden(hidden bool) *SetScrollbarsHiddenParams {
|
||||
return &SetScrollbarsHiddenParams{
|
||||
Hidden: hidden,
|
||||
@@ -310,7 +343,8 @@ type SetDocumentCookieDisabledParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setDocumentCookieDisabled
|
||||
//
|
||||
// parameters:
|
||||
// disabled - Whether document.coookie API should be disabled.
|
||||
//
|
||||
// disabled - Whether document.coookie API should be disabled.
|
||||
func SetDocumentCookieDisabled(disabled bool) *SetDocumentCookieDisabledParams {
|
||||
return &SetDocumentCookieDisabledParams{
|
||||
Disabled: disabled,
|
||||
@@ -333,7 +367,8 @@ type SetEmitTouchEventsForMouseParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setEmitTouchEventsForMouse
|
||||
//
|
||||
// parameters:
|
||||
// enabled - Whether touch emulation based on mouse input should be enabled.
|
||||
//
|
||||
// enabled - Whether touch emulation based on mouse input should be enabled.
|
||||
func SetEmitTouchEventsForMouse(enabled bool) *SetEmitTouchEventsForMouseParams {
|
||||
return &SetEmitTouchEventsForMouseParams{
|
||||
Enabled: enabled,
|
||||
@@ -396,7 +431,8 @@ type SetEmulatedVisionDeficiencyParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setEmulatedVisionDeficiency
|
||||
//
|
||||
// parameters:
|
||||
// type - Vision deficiency to emulate.
|
||||
//
|
||||
// type - Vision deficiency to emulate.
|
||||
func SetEmulatedVisionDeficiency(typeVal SetEmulatedVisionDeficiencyType) *SetEmulatedVisionDeficiencyParams {
|
||||
return &SetEmulatedVisionDeficiencyParams{
|
||||
Type: typeVal,
|
||||
@@ -460,8 +496,9 @@ type SetIdleOverrideParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setIdleOverride
|
||||
//
|
||||
// parameters:
|
||||
// isUserActive - Mock isUserActive
|
||||
// isScreenUnlocked - Mock isScreenUnlocked
|
||||
//
|
||||
// isUserActive - Mock isUserActive
|
||||
// isScreenUnlocked - Mock isScreenUnlocked
|
||||
func SetIdleOverride(isUserActive bool, isScreenUnlocked bool) *SetIdleOverrideParams {
|
||||
return &SetIdleOverrideParams{
|
||||
IsUserActive: isUserActive,
|
||||
@@ -499,7 +536,8 @@ type SetPageScaleFactorParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setPageScaleFactor
|
||||
//
|
||||
// parameters:
|
||||
// pageScaleFactor - Page scale factor.
|
||||
//
|
||||
// pageScaleFactor - Page scale factor.
|
||||
func SetPageScaleFactor(pageScaleFactor float64) *SetPageScaleFactorParams {
|
||||
return &SetPageScaleFactorParams{
|
||||
PageScaleFactor: pageScaleFactor,
|
||||
@@ -521,7 +559,8 @@ type SetScriptExecutionDisabledParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setScriptExecutionDisabled
|
||||
//
|
||||
// parameters:
|
||||
// value - Whether script execution should be disabled in the page.
|
||||
//
|
||||
// value - Whether script execution should be disabled in the page.
|
||||
func SetScriptExecutionDisabled(value bool) *SetScriptExecutionDisabledParams {
|
||||
return &SetScriptExecutionDisabledParams{
|
||||
Value: value,
|
||||
@@ -546,7 +585,8 @@ type SetTouchEmulationEnabledParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setTouchEmulationEnabled
|
||||
//
|
||||
// parameters:
|
||||
// enabled - Whether the touch event emulation should be enabled.
|
||||
//
|
||||
// enabled - Whether the touch event emulation should be enabled.
|
||||
func SetTouchEmulationEnabled(enabled bool) *SetTouchEmulationEnabledParams {
|
||||
return &SetTouchEmulationEnabledParams{
|
||||
Enabled: enabled,
|
||||
@@ -571,7 +611,6 @@ type SetVirtualTimePolicyParams struct {
|
||||
Policy VirtualTimePolicy `json:"policy"`
|
||||
Budget float64 `json:"budget,omitempty"` // If set, after this many virtual milliseconds have elapsed virtual time will be paused and a virtualTimeBudgetExpired event is sent.
|
||||
MaxVirtualTimeTaskStarvationCount int64 `json:"maxVirtualTimeTaskStarvationCount,omitempty"` // If set this specifies the maximum number of tasks that can be run before virtual is forced forwards to prevent deadlock.
|
||||
WaitForNavigation bool `json:"waitForNavigation,omitempty"` // If set the virtual time policy change should be deferred until any frame starts navigating. Note any previous deferred policy change is superseded.
|
||||
InitialVirtualTime *cdp.TimeSinceEpoch `json:"initialVirtualTime,omitempty"` // If set, base::Time::Now will be overridden to initially return this value.
|
||||
}
|
||||
|
||||
@@ -582,7 +621,8 @@ type SetVirtualTimePolicyParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setVirtualTimePolicy
|
||||
//
|
||||
// parameters:
|
||||
// policy
|
||||
//
|
||||
// policy
|
||||
func SetVirtualTimePolicy(policy VirtualTimePolicy) *SetVirtualTimePolicyParams {
|
||||
return &SetVirtualTimePolicyParams{
|
||||
Policy: policy,
|
||||
@@ -604,14 +644,6 @@ func (p SetVirtualTimePolicyParams) WithMaxVirtualTimeTaskStarvationCount(maxVir
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithWaitForNavigation if set the virtual time policy change should be
|
||||
// deferred until any frame starts navigating. Note any previous deferred policy
|
||||
// change is superseded.
|
||||
func (p SetVirtualTimePolicyParams) WithWaitForNavigation(waitForNavigation bool) *SetVirtualTimePolicyParams {
|
||||
p.WaitForNavigation = waitForNavigation
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithInitialVirtualTime if set, base::Time::Now will be overridden to
|
||||
// initially return this value.
|
||||
func (p SetVirtualTimePolicyParams) WithInitialVirtualTime(initialVirtualTime *cdp.TimeSinceEpoch) *SetVirtualTimePolicyParams {
|
||||
@@ -627,7 +659,8 @@ type SetVirtualTimePolicyReturns struct {
|
||||
// Do executes Emulation.setVirtualTimePolicy against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// virtualTimeTicksBase - Absolute timestamp at which virtual time was first enabled (up time in milliseconds).
|
||||
//
|
||||
// virtualTimeTicksBase - Absolute timestamp at which virtual time was first enabled (up time in milliseconds).
|
||||
func (p *SetVirtualTimePolicyParams) Do(ctx context.Context) (virtualTimeTicksBase float64, err error) {
|
||||
// execute
|
||||
var res SetVirtualTimePolicyReturns
|
||||
@@ -679,7 +712,8 @@ type SetTimezoneOverrideParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setTimezoneOverride
|
||||
//
|
||||
// parameters:
|
||||
// timezoneID - The timezone identifier. If empty, disables the override and restores default host system timezone.
|
||||
//
|
||||
// timezoneID - The timezone identifier. If empty, disables the override and restores default host system timezone.
|
||||
func SetTimezoneOverride(timezoneID string) *SetTimezoneOverrideParams {
|
||||
return &SetTimezoneOverrideParams{
|
||||
TimezoneID: timezoneID,
|
||||
@@ -701,7 +735,8 @@ type SetDisabledImageTypesParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setDisabledImageTypes
|
||||
//
|
||||
// parameters:
|
||||
// imageTypes - Image types to disable.
|
||||
//
|
||||
// imageTypes - Image types to disable.
|
||||
func SetDisabledImageTypes(imageTypes []DisabledImageType) *SetDisabledImageTypesParams {
|
||||
return &SetDisabledImageTypesParams{
|
||||
ImageTypes: imageTypes,
|
||||
@@ -713,6 +748,29 @@ func (p *SetDisabledImageTypesParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandSetDisabledImageTypes, p, nil)
|
||||
}
|
||||
|
||||
// SetHardwareConcurrencyOverrideParams [no description].
|
||||
type SetHardwareConcurrencyOverrideParams struct {
|
||||
HardwareConcurrency int64 `json:"hardwareConcurrency"` // Hardware concurrency to report
|
||||
}
|
||||
|
||||
// SetHardwareConcurrencyOverride [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setHardwareConcurrencyOverride
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// hardwareConcurrency - Hardware concurrency to report
|
||||
func SetHardwareConcurrencyOverride(hardwareConcurrency int64) *SetHardwareConcurrencyOverrideParams {
|
||||
return &SetHardwareConcurrencyOverrideParams{
|
||||
HardwareConcurrency: hardwareConcurrency,
|
||||
}
|
||||
}
|
||||
|
||||
// Do executes Emulation.setHardwareConcurrencyOverride against the provided context.
|
||||
func (p *SetHardwareConcurrencyOverrideParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandSetHardwareConcurrencyOverride, p, nil)
|
||||
}
|
||||
|
||||
// SetUserAgentOverrideParams allows overriding user agent with the given
|
||||
// string.
|
||||
type SetUserAgentOverrideParams struct {
|
||||
@@ -727,7 +785,8 @@ type SetUserAgentOverrideParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setUserAgentOverride
|
||||
//
|
||||
// parameters:
|
||||
// userAgent - User agent to use.
|
||||
//
|
||||
// userAgent - User agent to use.
|
||||
func SetUserAgentOverride(userAgent string) *SetUserAgentOverrideParams {
|
||||
return &SetUserAgentOverrideParams{
|
||||
UserAgent: userAgent,
|
||||
@@ -758,6 +817,29 @@ func (p *SetUserAgentOverrideParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandSetUserAgentOverride, p, nil)
|
||||
}
|
||||
|
||||
// SetAutomationOverrideParams allows overriding the automation flag.
|
||||
type SetAutomationOverrideParams struct {
|
||||
Enabled bool `json:"enabled"` // Whether the override should be enabled.
|
||||
}
|
||||
|
||||
// SetAutomationOverride allows overriding the automation flag.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setAutomationOverride
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// enabled - Whether the override should be enabled.
|
||||
func SetAutomationOverride(enabled bool) *SetAutomationOverrideParams {
|
||||
return &SetAutomationOverrideParams{
|
||||
Enabled: enabled,
|
||||
}
|
||||
}
|
||||
|
||||
// Do executes Emulation.setAutomationOverride against the provided context.
|
||||
func (p *SetAutomationOverrideParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandSetAutomationOverride, p, nil)
|
||||
}
|
||||
|
||||
// Command names.
|
||||
const (
|
||||
CommandCanEmulate = "Emulation.canEmulate"
|
||||
@@ -765,6 +847,7 @@ const (
|
||||
CommandClearGeolocationOverride = "Emulation.clearGeolocationOverride"
|
||||
CommandResetPageScaleFactor = "Emulation.resetPageScaleFactor"
|
||||
CommandSetFocusEmulationEnabled = "Emulation.setFocusEmulationEnabled"
|
||||
CommandSetAutoDarkModeOverride = "Emulation.setAutoDarkModeOverride"
|
||||
CommandSetCPUThrottlingRate = "Emulation.setCPUThrottlingRate"
|
||||
CommandSetDefaultBackgroundColorOverride = "Emulation.setDefaultBackgroundColorOverride"
|
||||
CommandSetDeviceMetricsOverride = "Emulation.setDeviceMetricsOverride"
|
||||
@@ -783,5 +866,7 @@ const (
|
||||
CommandSetLocaleOverride = "Emulation.setLocaleOverride"
|
||||
CommandSetTimezoneOverride = "Emulation.setTimezoneOverride"
|
||||
CommandSetDisabledImageTypes = "Emulation.setDisabledImageTypes"
|
||||
CommandSetHardwareConcurrencyOverride = "Emulation.setHardwareConcurrencyOverride"
|
||||
CommandSetUserAgentOverride = "Emulation.setUserAgentOverride"
|
||||
CommandSetAutomationOverride = "Emulation.setAutomationOverride"
|
||||
)
|
||||
|
||||
36
vendor/github.com/chromedp/cdproto/emulation/types.go
generated
vendored
36
vendor/github.com/chromedp/cdproto/emulation/types.go
generated
vendored
@@ -3,7 +3,7 @@ package emulation
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/mailru/easyjson"
|
||||
"github.com/mailru/easyjson/jlexer"
|
||||
@@ -68,7 +68,8 @@ func (t VirtualTimePolicy) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *VirtualTimePolicy) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch VirtualTimePolicy(in.String()) {
|
||||
v := in.String()
|
||||
switch VirtualTimePolicy(v) {
|
||||
case VirtualTimePolicyAdvance:
|
||||
*t = VirtualTimePolicyAdvance
|
||||
case VirtualTimePolicyPause:
|
||||
@@ -77,7 +78,7 @@ func (t *VirtualTimePolicy) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = VirtualTimePolicyPauseIfNetworkFetchesPending
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown VirtualTimePolicy value"))
|
||||
in.AddError(fmt.Errorf("unknown VirtualTimePolicy value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,12 +103,14 @@ type UserAgentBrandVersion struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Emulation#type-UserAgentMetadata
|
||||
type UserAgentMetadata struct {
|
||||
Brands []*UserAgentBrandVersion `json:"brands,omitempty"`
|
||||
FullVersion string `json:"fullVersion,omitempty"`
|
||||
FullVersionList []*UserAgentBrandVersion `json:"fullVersionList,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"`
|
||||
}
|
||||
|
||||
// DisabledImageType enum of image types that can be disabled.
|
||||
@@ -139,7 +142,8 @@ func (t DisabledImageType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *DisabledImageType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch DisabledImageType(in.String()) {
|
||||
v := in.String()
|
||||
switch DisabledImageType(v) {
|
||||
case DisabledImageTypeAvif:
|
||||
*t = DisabledImageTypeAvif
|
||||
case DisabledImageTypeJxl:
|
||||
@@ -148,7 +152,7 @@ func (t *DisabledImageType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = DisabledImageTypeWebp
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown DisabledImageType value"))
|
||||
in.AddError(fmt.Errorf("unknown DisabledImageType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -187,7 +191,8 @@ func (t OrientationType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *OrientationType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch OrientationType(in.String()) {
|
||||
v := in.String()
|
||||
switch OrientationType(v) {
|
||||
case OrientationTypePortraitPrimary:
|
||||
*t = OrientationTypePortraitPrimary
|
||||
case OrientationTypePortraitSecondary:
|
||||
@@ -198,7 +203,7 @@ func (t *OrientationType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = OrientationTypeLandscapeSecondary
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown OrientationType value"))
|
||||
in.AddError(fmt.Errorf("unknown OrientationType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -236,14 +241,15 @@ func (t DisplayFeatureOrientation) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *DisplayFeatureOrientation) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch DisplayFeatureOrientation(in.String()) {
|
||||
v := in.String()
|
||||
switch DisplayFeatureOrientation(v) {
|
||||
case DisplayFeatureOrientationVertical:
|
||||
*t = DisplayFeatureOrientationVertical
|
||||
case DisplayFeatureOrientationHorizontal:
|
||||
*t = DisplayFeatureOrientationHorizontal
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown DisplayFeatureOrientation value"))
|
||||
in.AddError(fmt.Errorf("unknown DisplayFeatureOrientation value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -281,14 +287,15 @@ func (t SetEmitTouchEventsForMouseConfiguration) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *SetEmitTouchEventsForMouseConfiguration) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch SetEmitTouchEventsForMouseConfiguration(in.String()) {
|
||||
v := in.String()
|
||||
switch SetEmitTouchEventsForMouseConfiguration(v) {
|
||||
case SetEmitTouchEventsForMouseConfigurationMobile:
|
||||
*t = SetEmitTouchEventsForMouseConfigurationMobile
|
||||
case SetEmitTouchEventsForMouseConfigurationDesktop:
|
||||
*t = SetEmitTouchEventsForMouseConfigurationDesktop
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown SetEmitTouchEventsForMouseConfiguration value"))
|
||||
in.AddError(fmt.Errorf("unknown SetEmitTouchEventsForMouseConfiguration value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -329,7 +336,8 @@ func (t SetEmulatedVisionDeficiencyType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *SetEmulatedVisionDeficiencyType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch SetEmulatedVisionDeficiencyType(in.String()) {
|
||||
v := in.String()
|
||||
switch SetEmulatedVisionDeficiencyType(v) {
|
||||
case SetEmulatedVisionDeficiencyTypeNone:
|
||||
*t = SetEmulatedVisionDeficiencyTypeNone
|
||||
case SetEmulatedVisionDeficiencyTypeAchromatopsia:
|
||||
@@ -344,7 +352,7 @@ func (t *SetEmulatedVisionDeficiencyType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = SetEmulatedVisionDeficiencyTypeTritanopia
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown SetEmulatedVisionDeficiencyType value"))
|
||||
in.AddError(fmt.Errorf("unknown SetEmulatedVisionDeficiencyType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
151
vendor/github.com/chromedp/cdproto/eventbreakpoints/easyjson.go
generated
vendored
Normal file
151
vendor/github.com/chromedp/cdproto/eventbreakpoints/easyjson.go
generated
vendored
Normal file
@@ -0,0 +1,151 @@
|
||||
// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
|
||||
|
||||
package eventbreakpoints
|
||||
|
||||
import (
|
||||
json "encoding/json"
|
||||
easyjson "github.com/mailru/easyjson"
|
||||
jlexer "github.com/mailru/easyjson/jlexer"
|
||||
jwriter "github.com/mailru/easyjson/jwriter"
|
||||
)
|
||||
|
||||
// suppress unused package warning
|
||||
var (
|
||||
_ *json.RawMessage
|
||||
_ *jlexer.Lexer
|
||||
_ *jwriter.Writer
|
||||
_ easyjson.Marshaler
|
||||
)
|
||||
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoEventbreakpoints(in *jlexer.Lexer, out *SetInstrumentationBreakpointParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case "eventName":
|
||||
out.EventName = string(in.String())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoEventbreakpoints(out *jwriter.Writer, in SetInstrumentationBreakpointParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
const prefix string = ",\"eventName\":"
|
||||
out.RawString(prefix[1:])
|
||||
out.String(string(in.EventName))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v SetInstrumentationBreakpointParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoEventbreakpoints(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v SetInstrumentationBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoEventbreakpoints(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *SetInstrumentationBreakpointParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoEventbreakpoints(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *SetInstrumentationBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoEventbreakpoints(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoEventbreakpoints1(in *jlexer.Lexer, out *RemoveInstrumentationBreakpointParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case "eventName":
|
||||
out.EventName = string(in.String())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoEventbreakpoints1(out *jwriter.Writer, in RemoveInstrumentationBreakpointParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
const prefix string = ",\"eventName\":"
|
||||
out.RawString(prefix[1:])
|
||||
out.String(string(in.EventName))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v RemoveInstrumentationBreakpointParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoEventbreakpoints1(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v RemoveInstrumentationBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoEventbreakpoints1(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *RemoveInstrumentationBreakpointParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoEventbreakpoints1(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *RemoveInstrumentationBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoEventbreakpoints1(l, v)
|
||||
}
|
||||
73
vendor/github.com/chromedp/cdproto/eventbreakpoints/eventbreakpoints.go
generated
vendored
Normal file
73
vendor/github.com/chromedp/cdproto/eventbreakpoints/eventbreakpoints.go
generated
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
// Package eventbreakpoints provides the Chrome DevTools Protocol
|
||||
// commands, types, and events for the EventBreakpoints domain.
|
||||
//
|
||||
// EventBreakpoints permits setting breakpoints on particular operations and
|
||||
// events in targets that run JavaScript but do not have a DOM. JavaScript
|
||||
// execution will stop on these operations as if there was a regular breakpoint
|
||||
// set.
|
||||
//
|
||||
// Generated by the cdproto-gen command.
|
||||
package eventbreakpoints
|
||||
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/chromedp/cdproto/cdp"
|
||||
)
|
||||
|
||||
// SetInstrumentationBreakpointParams sets breakpoint on particular native
|
||||
// event.
|
||||
type SetInstrumentationBreakpointParams struct {
|
||||
EventName string `json:"eventName"` // Instrumentation name to stop on.
|
||||
}
|
||||
|
||||
// SetInstrumentationBreakpoint sets breakpoint on particular native event.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/EventBreakpoints#method-setInstrumentationBreakpoint
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// eventName - Instrumentation name to stop on.
|
||||
func SetInstrumentationBreakpoint(eventName string) *SetInstrumentationBreakpointParams {
|
||||
return &SetInstrumentationBreakpointParams{
|
||||
EventName: eventName,
|
||||
}
|
||||
}
|
||||
|
||||
// Do executes EventBreakpoints.setInstrumentationBreakpoint against the provided context.
|
||||
func (p *SetInstrumentationBreakpointParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandSetInstrumentationBreakpoint, p, nil)
|
||||
}
|
||||
|
||||
// RemoveInstrumentationBreakpointParams removes breakpoint on particular
|
||||
// native event.
|
||||
type RemoveInstrumentationBreakpointParams struct {
|
||||
EventName string `json:"eventName"` // Instrumentation name to stop on.
|
||||
}
|
||||
|
||||
// RemoveInstrumentationBreakpoint removes breakpoint on particular native
|
||||
// event.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/EventBreakpoints#method-removeInstrumentationBreakpoint
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// eventName - Instrumentation name to stop on.
|
||||
func RemoveInstrumentationBreakpoint(eventName string) *RemoveInstrumentationBreakpointParams {
|
||||
return &RemoveInstrumentationBreakpointParams{
|
||||
EventName: eventName,
|
||||
}
|
||||
}
|
||||
|
||||
// Do executes EventBreakpoints.removeInstrumentationBreakpoint against the provided context.
|
||||
func (p *RemoveInstrumentationBreakpointParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandRemoveInstrumentationBreakpoint, p, nil)
|
||||
}
|
||||
|
||||
// Command names.
|
||||
const (
|
||||
CommandSetInstrumentationBreakpoint = "EventBreakpoints.setInstrumentationBreakpoint"
|
||||
CommandRemoveInstrumentationBreakpoint = "EventBreakpoints.removeInstrumentationBreakpoint"
|
||||
)
|
||||
215
vendor/github.com/chromedp/cdproto/fetch/easyjson.go
generated
vendored
215
vendor/github.com/chromedp/cdproto/fetch/easyjson.go
generated
vendored
@@ -716,6 +716,8 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch8(in *jlexer.Lexer, out
|
||||
(out.ResponseErrorReason).UnmarshalEasyJSON(in)
|
||||
case "responseStatusCode":
|
||||
out.ResponseStatusCode = int64(in.Int64())
|
||||
case "responseStatusText":
|
||||
out.ResponseStatusText = string(in.String())
|
||||
case "responseHeaders":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
@@ -748,7 +750,9 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch8(in *jlexer.Lexer, out
|
||||
in.Delim(']')
|
||||
}
|
||||
case "networkId":
|
||||
out.NetworkID = RequestID(in.String())
|
||||
out.NetworkID = network.RequestID(in.String())
|
||||
case "redirectedRequestId":
|
||||
out.RedirectedRequestID = RequestID(in.String())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
@@ -797,6 +801,11 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch8(out *jwriter.Writer, i
|
||||
out.RawString(prefix)
|
||||
out.Int64(int64(in.ResponseStatusCode))
|
||||
}
|
||||
if in.ResponseStatusText != "" {
|
||||
const prefix string = ",\"responseStatusText\":"
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.ResponseStatusText))
|
||||
}
|
||||
if len(in.ResponseHeaders) != 0 {
|
||||
const prefix string = ",\"responseHeaders\":"
|
||||
out.RawString(prefix)
|
||||
@@ -820,6 +829,11 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch8(out *jwriter.Writer, i
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.NetworkID))
|
||||
}
|
||||
if in.RedirectedRequestID != "" {
|
||||
const prefix string = ",\"redirectedRequestId\":"
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.RedirectedRequestID))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
@@ -1229,7 +1243,143 @@ func (v *ContinueWithAuthParams) UnmarshalJSON(data []byte) error {
|
||||
func (v *ContinueWithAuthParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch12(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch13(in *jlexer.Lexer, out *ContinueRequestParams) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch13(in *jlexer.Lexer, out *ContinueResponseParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case "requestId":
|
||||
out.RequestID = RequestID(in.String())
|
||||
case "responseCode":
|
||||
out.ResponseCode = int64(in.Int64())
|
||||
case "responsePhrase":
|
||||
out.ResponsePhrase = string(in.String())
|
||||
case "responseHeaders":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
out.ResponseHeaders = nil
|
||||
} else {
|
||||
in.Delim('[')
|
||||
if out.ResponseHeaders == nil {
|
||||
if !in.IsDelim(']') {
|
||||
out.ResponseHeaders = make([]*HeaderEntry, 0, 8)
|
||||
} else {
|
||||
out.ResponseHeaders = []*HeaderEntry{}
|
||||
}
|
||||
} else {
|
||||
out.ResponseHeaders = (out.ResponseHeaders)[:0]
|
||||
}
|
||||
for !in.IsDelim(']') {
|
||||
var v10 *HeaderEntry
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
v10 = nil
|
||||
} else {
|
||||
if v10 == nil {
|
||||
v10 = new(HeaderEntry)
|
||||
}
|
||||
(*v10).UnmarshalEasyJSON(in)
|
||||
}
|
||||
out.ResponseHeaders = append(out.ResponseHeaders, v10)
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim(']')
|
||||
}
|
||||
case "binaryResponseHeaders":
|
||||
out.BinaryResponseHeaders = string(in.String())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch13(out *jwriter.Writer, in ContinueResponseParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
const prefix string = ",\"requestId\":"
|
||||
out.RawString(prefix[1:])
|
||||
out.String(string(in.RequestID))
|
||||
}
|
||||
if in.ResponseCode != 0 {
|
||||
const prefix string = ",\"responseCode\":"
|
||||
out.RawString(prefix)
|
||||
out.Int64(int64(in.ResponseCode))
|
||||
}
|
||||
if in.ResponsePhrase != "" {
|
||||
const prefix string = ",\"responsePhrase\":"
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.ResponsePhrase))
|
||||
}
|
||||
if len(in.ResponseHeaders) != 0 {
|
||||
const prefix string = ",\"responseHeaders\":"
|
||||
out.RawString(prefix)
|
||||
{
|
||||
out.RawByte('[')
|
||||
for v11, v12 := range in.ResponseHeaders {
|
||||
if v11 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v12 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v12).MarshalEasyJSON(out)
|
||||
}
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
}
|
||||
if in.BinaryResponseHeaders != "" {
|
||||
const prefix string = ",\"binaryResponseHeaders\":"
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.BinaryResponseHeaders))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v ContinueResponseParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch13(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v ContinueResponseParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch13(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *ContinueResponseParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch13(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *ContinueResponseParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch13(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch14(in *jlexer.Lexer, out *ContinueRequestParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -1272,21 +1422,23 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch13(in *jlexer.Lexer, out
|
||||
out.Headers = (out.Headers)[:0]
|
||||
}
|
||||
for !in.IsDelim(']') {
|
||||
var v10 *HeaderEntry
|
||||
var v13 *HeaderEntry
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
v10 = nil
|
||||
v13 = nil
|
||||
} else {
|
||||
if v10 == nil {
|
||||
v10 = new(HeaderEntry)
|
||||
if v13 == nil {
|
||||
v13 = new(HeaderEntry)
|
||||
}
|
||||
(*v10).UnmarshalEasyJSON(in)
|
||||
(*v13).UnmarshalEasyJSON(in)
|
||||
}
|
||||
out.Headers = append(out.Headers, v10)
|
||||
out.Headers = append(out.Headers, v13)
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim(']')
|
||||
}
|
||||
case "interceptResponse":
|
||||
out.InterceptResponse = bool(in.Bool())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
@@ -1297,7 +1449,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch13(in *jlexer.Lexer, out
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch13(out *jwriter.Writer, in ContinueRequestParams) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch14(out *jwriter.Writer, in ContinueRequestParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -1326,46 +1478,51 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch13(out *jwriter.Writer,
|
||||
out.RawString(prefix)
|
||||
{
|
||||
out.RawByte('[')
|
||||
for v11, v12 := range in.Headers {
|
||||
if v11 > 0 {
|
||||
for v14, v15 := range in.Headers {
|
||||
if v14 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v12 == nil {
|
||||
if v15 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v12).MarshalEasyJSON(out)
|
||||
(*v15).MarshalEasyJSON(out)
|
||||
}
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
}
|
||||
if in.InterceptResponse {
|
||||
const prefix string = ",\"interceptResponse\":"
|
||||
out.RawString(prefix)
|
||||
out.Bool(bool(in.InterceptResponse))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v ContinueRequestParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch13(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch14(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v ContinueRequestParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch13(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch14(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *ContinueRequestParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch13(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch14(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *ContinueRequestParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch13(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch14(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch14(in *jlexer.Lexer, out *AuthChallengeResponse) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch15(in *jlexer.Lexer, out *AuthChallengeResponse) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -1400,7 +1557,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch14(in *jlexer.Lexer, out
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch14(out *jwriter.Writer, in AuthChallengeResponse) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch15(out *jwriter.Writer, in AuthChallengeResponse) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -1425,27 +1582,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch14(out *jwriter.Writer,
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v AuthChallengeResponse) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch14(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch15(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v AuthChallengeResponse) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch14(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch15(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *AuthChallengeResponse) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch14(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch15(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *AuthChallengeResponse) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch14(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch15(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch15(in *jlexer.Lexer, out *AuthChallenge) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch16(in *jlexer.Lexer, out *AuthChallenge) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -1482,7 +1639,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch15(in *jlexer.Lexer, out
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch15(out *jwriter.Writer, in AuthChallenge) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch16(out *jwriter.Writer, in AuthChallenge) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -1518,23 +1675,23 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch15(out *jwriter.Writer,
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v AuthChallenge) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch15(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch16(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v AuthChallenge) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch15(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch16(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *AuthChallenge) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch15(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch16(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *AuthChallenge) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch15(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch16(l, v)
|
||||
}
|
||||
|
||||
4
vendor/github.com/chromedp/cdproto/fetch/events.go
generated
vendored
4
vendor/github.com/chromedp/cdproto/fetch/events.go
generated
vendored
@@ -22,8 +22,10 @@ type EventRequestPaused struct {
|
||||
ResourceType network.ResourceType `json:"resourceType"` // How the requested resource will be used.
|
||||
ResponseErrorReason network.ErrorReason `json:"responseErrorReason,omitempty"` // Response error if intercepted at response stage.
|
||||
ResponseStatusCode int64 `json:"responseStatusCode,omitempty"` // Response code if intercepted at response stage.
|
||||
ResponseStatusText string `json:"responseStatusText,omitempty"` // Response status text if intercepted at response stage.
|
||||
ResponseHeaders []*HeaderEntry `json:"responseHeaders,omitempty"` // Response headers if intercepted at the response stage.
|
||||
NetworkID RequestID `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.
|
||||
NetworkID network.RequestID `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 RequestID `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.
|
||||
}
|
||||
|
||||
// EventAuthRequired issued when the domain is enabled with
|
||||
|
||||
120
vendor/github.com/chromedp/cdproto/fetch/fetch.go
generated
vendored
120
vendor/github.com/chromedp/cdproto/fetch/fetch.go
generated
vendored
@@ -83,8 +83,9 @@ type FailRequestParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Fetch#method-failRequest
|
||||
//
|
||||
// parameters:
|
||||
// requestID - An id the client received in requestPaused event.
|
||||
// errorReason - Causes the request to fail with the given reason.
|
||||
//
|
||||
// requestID - An id the client received in requestPaused event.
|
||||
// errorReason - Causes the request to fail with the given reason.
|
||||
func FailRequest(requestID RequestID, errorReason network.ErrorReason) *FailRequestParams {
|
||||
return &FailRequestParams{
|
||||
RequestID: requestID,
|
||||
@@ -103,7 +104,7 @@ type FulfillRequestParams struct {
|
||||
ResponseCode int64 `json:"responseCode"` // An HTTP response code.
|
||||
ResponseHeaders []*HeaderEntry `json:"responseHeaders,omitempty"` // Response headers.
|
||||
BinaryResponseHeaders string `json:"binaryResponseHeaders,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.
|
||||
Body string `json:"body,omitempty"` // A response body.
|
||||
Body string `json:"body,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.
|
||||
ResponsePhrase string `json:"responsePhrase,omitempty"` // A textual representation of responseCode. If absent, a standard phrase matching responseCode is used.
|
||||
}
|
||||
|
||||
@@ -112,8 +113,9 @@ type FulfillRequestParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Fetch#method-fulfillRequest
|
||||
//
|
||||
// parameters:
|
||||
// requestID - An id the client received in requestPaused event.
|
||||
// responseCode - An HTTP response code.
|
||||
//
|
||||
// requestID - An id the client received in requestPaused event.
|
||||
// responseCode - An HTTP response code.
|
||||
func FulfillRequest(requestID RequestID, responseCode int64) *FulfillRequestParams {
|
||||
return &FulfillRequestParams{
|
||||
RequestID: requestID,
|
||||
@@ -136,7 +138,9 @@ func (p FulfillRequestParams) WithBinaryResponseHeaders(binaryResponseHeaders st
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithBody a response body.
|
||||
// WithBody 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.
|
||||
func (p FulfillRequestParams) WithBody(body string) *FulfillRequestParams {
|
||||
p.Body = body
|
||||
return &p
|
||||
@@ -157,11 +161,12 @@ func (p *FulfillRequestParams) Do(ctx context.Context) (err error) {
|
||||
// ContinueRequestParams continues the request, optionally modifying some of
|
||||
// its parameters.
|
||||
type ContinueRequestParams struct {
|
||||
RequestID RequestID `json:"requestId"` // An id the client received in requestPaused event.
|
||||
URL string `json:"url,omitempty"` // If set, the request url will be modified in a way that's not observable by page.
|
||||
Method string `json:"method,omitempty"` // If set, the request method is overridden.
|
||||
PostData string `json:"postData,omitempty"` // If set, overrides the post data in the request.
|
||||
Headers []*HeaderEntry `json:"headers,omitempty"` // If set, overrides the request headers.
|
||||
RequestID RequestID `json:"requestId"` // An id the client received in requestPaused event.
|
||||
URL string `json:"url,omitempty"` // If set, the request url will be modified in a way that's not observable by page.
|
||||
Method string `json:"method,omitempty"` // If set, the request method is overridden.
|
||||
PostData string `json:"postData,omitempty"` // If set, overrides the post data in the request.
|
||||
Headers []*HeaderEntry `json:"headers,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.
|
||||
InterceptResponse bool `json:"interceptResponse,omitempty"` // If set, overrides response interception behavior for this request.
|
||||
}
|
||||
|
||||
// ContinueRequest continues the request, optionally modifying some of its
|
||||
@@ -170,7 +175,8 @@ type ContinueRequestParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Fetch#method-continueRequest
|
||||
//
|
||||
// parameters:
|
||||
// requestID - An id the client received in requestPaused event.
|
||||
//
|
||||
// requestID - An id the client received in requestPaused event.
|
||||
func ContinueRequest(requestID RequestID) *ContinueRequestParams {
|
||||
return &ContinueRequestParams{
|
||||
RequestID: requestID,
|
||||
@@ -196,12 +202,21 @@ func (p ContinueRequestParams) WithPostData(postData string) *ContinueRequestPar
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithHeaders if set, overrides the request headers.
|
||||
// WithHeaders 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.
|
||||
func (p ContinueRequestParams) WithHeaders(headers []*HeaderEntry) *ContinueRequestParams {
|
||||
p.Headers = headers
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithInterceptResponse if set, overrides response interception behavior for
|
||||
// this request.
|
||||
func (p ContinueRequestParams) WithInterceptResponse(interceptResponse bool) *ContinueRequestParams {
|
||||
p.InterceptResponse = interceptResponse
|
||||
return &p
|
||||
}
|
||||
|
||||
// Do executes Fetch.continueRequest against the provided context.
|
||||
func (p *ContinueRequestParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandContinueRequest, p, nil)
|
||||
@@ -220,8 +235,9 @@ type ContinueWithAuthParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Fetch#method-continueWithAuth
|
||||
//
|
||||
// parameters:
|
||||
// requestID - An id the client received in authRequired event.
|
||||
// authChallengeResponse - Response to with an authChallenge.
|
||||
//
|
||||
// requestID - An id the client received in authRequired event.
|
||||
// authChallengeResponse - Response to with an authChallenge.
|
||||
func ContinueWithAuth(requestID RequestID, authChallengeResponse *AuthChallengeResponse) *ContinueWithAuthParams {
|
||||
return &ContinueWithAuthParams{
|
||||
RequestID: requestID,
|
||||
@@ -234,6 +250,67 @@ func (p *ContinueWithAuthParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandContinueWithAuth, p, nil)
|
||||
}
|
||||
|
||||
// ContinueResponseParams continues loading of the paused response,
|
||||
// optionally modifying the response headers. If either responseCode or headers
|
||||
// are modified, all of them must be present.
|
||||
type ContinueResponseParams struct {
|
||||
RequestID RequestID `json:"requestId"` // An id the client received in requestPaused event.
|
||||
ResponseCode int64 `json:"responseCode,omitempty"` // An HTTP response code. If absent, original response code will be used.
|
||||
ResponsePhrase string `json:"responsePhrase,omitempty"` // A textual representation of responseCode. If absent, a standard phrase matching responseCode is used.
|
||||
ResponseHeaders []*HeaderEntry `json:"responseHeaders,omitempty"` // Response headers. If absent, original response headers will be used.
|
||||
BinaryResponseHeaders string `json:"binaryResponseHeaders,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.
|
||||
}
|
||||
|
||||
// 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.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Fetch#method-continueResponse
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// requestID - An id the client received in requestPaused event.
|
||||
func ContinueResponse(requestID RequestID) *ContinueResponseParams {
|
||||
return &ContinueResponseParams{
|
||||
RequestID: requestID,
|
||||
}
|
||||
}
|
||||
|
||||
// WithResponseCode an HTTP response code. If absent, original response code
|
||||
// will be used.
|
||||
func (p ContinueResponseParams) WithResponseCode(responseCode int64) *ContinueResponseParams {
|
||||
p.ResponseCode = responseCode
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithResponsePhrase a textual representation of responseCode. If absent, a
|
||||
// standard phrase matching responseCode is used.
|
||||
func (p ContinueResponseParams) WithResponsePhrase(responsePhrase string) *ContinueResponseParams {
|
||||
p.ResponsePhrase = responsePhrase
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithResponseHeaders response headers. If absent, original response headers
|
||||
// will be used.
|
||||
func (p ContinueResponseParams) WithResponseHeaders(responseHeaders []*HeaderEntry) *ContinueResponseParams {
|
||||
p.ResponseHeaders = responseHeaders
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithBinaryResponseHeaders 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.
|
||||
func (p ContinueResponseParams) WithBinaryResponseHeaders(binaryResponseHeaders string) *ContinueResponseParams {
|
||||
p.BinaryResponseHeaders = binaryResponseHeaders
|
||||
return &p
|
||||
}
|
||||
|
||||
// Do executes Fetch.continueResponse against the provided context.
|
||||
func (p *ContinueResponseParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandContinueResponse, p, nil)
|
||||
}
|
||||
|
||||
// GetResponseBodyParams 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
|
||||
@@ -254,7 +331,8 @@ type GetResponseBodyParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Fetch#method-getResponseBody
|
||||
//
|
||||
// parameters:
|
||||
// requestID - Identifier for the intercepted request to get body for.
|
||||
//
|
||||
// requestID - Identifier for the intercepted request to get body for.
|
||||
func GetResponseBody(requestID RequestID) *GetResponseBodyParams {
|
||||
return &GetResponseBodyParams{
|
||||
RequestID: requestID,
|
||||
@@ -270,7 +348,8 @@ type GetResponseBodyReturns struct {
|
||||
// Do executes Fetch.getResponseBody against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// body - Response body.
|
||||
//
|
||||
// body - Response body.
|
||||
func (p *GetResponseBodyParams) Do(ctx context.Context) (body []byte, err error) {
|
||||
// execute
|
||||
var res GetResponseBodyReturns
|
||||
@@ -316,7 +395,8 @@ type TakeResponseBodyAsStreamParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Fetch#method-takeResponseBodyAsStream
|
||||
//
|
||||
// parameters:
|
||||
// requestID
|
||||
//
|
||||
// requestID
|
||||
func TakeResponseBodyAsStream(requestID RequestID) *TakeResponseBodyAsStreamParams {
|
||||
return &TakeResponseBodyAsStreamParams{
|
||||
RequestID: requestID,
|
||||
@@ -331,7 +411,8 @@ type TakeResponseBodyAsStreamReturns struct {
|
||||
// Do executes Fetch.takeResponseBodyAsStream against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// stream
|
||||
//
|
||||
// stream
|
||||
func (p *TakeResponseBodyAsStreamParams) Do(ctx context.Context) (stream io.StreamHandle, err error) {
|
||||
// execute
|
||||
var res TakeResponseBodyAsStreamReturns
|
||||
@@ -351,6 +432,7 @@ const (
|
||||
CommandFulfillRequest = "Fetch.fulfillRequest"
|
||||
CommandContinueRequest = "Fetch.continueRequest"
|
||||
CommandContinueWithAuth = "Fetch.continueWithAuth"
|
||||
CommandContinueResponse = "Fetch.continueResponse"
|
||||
CommandGetResponseBody = "Fetch.getResponseBody"
|
||||
CommandTakeResponseBodyAsStream = "Fetch.takeResponseBodyAsStream"
|
||||
)
|
||||
|
||||
17
vendor/github.com/chromedp/cdproto/fetch/types.go
generated
vendored
17
vendor/github.com/chromedp/cdproto/fetch/types.go
generated
vendored
@@ -3,7 +3,7 @@ package fetch
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/chromedp/cdproto/network"
|
||||
"github.com/mailru/easyjson"
|
||||
@@ -51,14 +51,15 @@ func (t RequestStage) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *RequestStage) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch RequestStage(in.String()) {
|
||||
v := in.String()
|
||||
switch RequestStage(v) {
|
||||
case RequestStageRequest:
|
||||
*t = RequestStageRequest
|
||||
case RequestStageResponse:
|
||||
*t = RequestStageResponse
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown RequestStage value"))
|
||||
in.AddError(fmt.Errorf("unknown RequestStage value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,14 +132,15 @@ func (t AuthChallengeSource) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *AuthChallengeSource) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch AuthChallengeSource(in.String()) {
|
||||
v := in.String()
|
||||
switch AuthChallengeSource(v) {
|
||||
case AuthChallengeSourceServer:
|
||||
*t = AuthChallengeSourceServer
|
||||
case AuthChallengeSourceProxy:
|
||||
*t = AuthChallengeSourceProxy
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown AuthChallengeSource value"))
|
||||
in.AddError(fmt.Errorf("unknown AuthChallengeSource value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -179,7 +181,8 @@ func (t AuthChallengeResponseResponse) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *AuthChallengeResponseResponse) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch AuthChallengeResponseResponse(in.String()) {
|
||||
v := in.String()
|
||||
switch AuthChallengeResponseResponse(v) {
|
||||
case AuthChallengeResponseResponseDefault:
|
||||
*t = AuthChallengeResponseResponseDefault
|
||||
case AuthChallengeResponseResponseCancelAuth:
|
||||
@@ -188,7 +191,7 @@ func (t *AuthChallengeResponseResponse) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = AuthChallengeResponseResponseProvideCredentials
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown AuthChallengeResponseResponse value"))
|
||||
in.AddError(fmt.Errorf("unknown AuthChallengeResponseResponse value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
12
vendor/github.com/chromedp/cdproto/headlessexperimental/easyjson.go
generated
vendored
12
vendor/github.com/chromedp/cdproto/headlessexperimental/easyjson.go
generated
vendored
@@ -40,6 +40,8 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeadlessexperimental(in *jlex
|
||||
(out.Format).UnmarshalEasyJSON(in)
|
||||
case "quality":
|
||||
out.Quality = int64(in.Int64())
|
||||
case "optimizeForSpeed":
|
||||
out.OptimizeForSpeed = bool(in.Bool())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
@@ -70,6 +72,16 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeadlessexperimental(out *jwr
|
||||
}
|
||||
out.Int64(int64(in.Quality))
|
||||
}
|
||||
if in.OptimizeForSpeed {
|
||||
const prefix string = ",\"optimizeForSpeed\":"
|
||||
if first {
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
} else {
|
||||
out.RawString(prefix)
|
||||
}
|
||||
out.Bool(bool(in.OptimizeForSpeed))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
||||
9
vendor/github.com/chromedp/cdproto/headlessexperimental/headlessexperimental.go
generated
vendored
9
vendor/github.com/chromedp/cdproto/headlessexperimental/headlessexperimental.go
generated
vendored
@@ -20,7 +20,7 @@ import (
|
||||
// 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.gl/3zHXhB for more background.
|
||||
// https://goo.gle/chrome-headless-rendering for more background.
|
||||
type BeginFrameParams struct {
|
||||
FrameTimeTicks float64 `json:"frameTimeTicks,omitempty"` // Timestamp of this BeginFrame in Renderer TimeTicks (milliseconds of uptime). If not set, the current time will be used.
|
||||
Interval float64 `json:"interval,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.
|
||||
@@ -32,7 +32,7 @@ type BeginFrameParams struct {
|
||||
// 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.gl/3zHXhB for more background.
|
||||
// https://goo.gle/chrome-headless-rendering for more background.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/HeadlessExperimental#method-beginFrame
|
||||
//
|
||||
@@ -83,8 +83,9 @@ type BeginFrameReturns struct {
|
||||
// Do executes HeadlessExperimental.beginFrame against the provided context.
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// 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.
|
||||
func (p *BeginFrameParams) Do(ctx context.Context) (hasDamage bool, screenshotData []byte, err error) {
|
||||
// execute
|
||||
var res BeginFrameReturns
|
||||
|
||||
15
vendor/github.com/chromedp/cdproto/headlessexperimental/types.go
generated
vendored
15
vendor/github.com/chromedp/cdproto/headlessexperimental/types.go
generated
vendored
@@ -3,7 +3,7 @@ package headlessexperimental
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/mailru/easyjson"
|
||||
"github.com/mailru/easyjson/jlexer"
|
||||
@@ -14,8 +14,9 @@ import (
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/HeadlessExperimental#type-ScreenshotParams
|
||||
type ScreenshotParams struct {
|
||||
Format ScreenshotParamsFormat `json:"format,omitempty"` // Image compression format (defaults to png).
|
||||
Quality int64 `json:"quality,omitempty"` // Compression quality from range [0..100] (jpeg only).
|
||||
Format ScreenshotParamsFormat `json:"format,omitempty"` // Image compression format (defaults to png).
|
||||
Quality int64 `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)
|
||||
}
|
||||
|
||||
// ScreenshotParamsFormat image compression format (defaults to png).
|
||||
@@ -32,6 +33,7 @@ func (t ScreenshotParamsFormat) String() string {
|
||||
const (
|
||||
ScreenshotParamsFormatJpeg ScreenshotParamsFormat = "jpeg"
|
||||
ScreenshotParamsFormatPng ScreenshotParamsFormat = "png"
|
||||
ScreenshotParamsFormatWebp ScreenshotParamsFormat = "webp"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
@@ -46,14 +48,17 @@ func (t ScreenshotParamsFormat) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ScreenshotParamsFormat) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ScreenshotParamsFormat(in.String()) {
|
||||
v := in.String()
|
||||
switch ScreenshotParamsFormat(v) {
|
||||
case ScreenshotParamsFormatJpeg:
|
||||
*t = ScreenshotParamsFormatJpeg
|
||||
case ScreenshotParamsFormatPng:
|
||||
*t = ScreenshotParamsFormatPng
|
||||
case ScreenshotParamsFormatWebp:
|
||||
*t = ScreenshotParamsFormatWebp
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ScreenshotParamsFormat value"))
|
||||
in.AddError(fmt.Errorf("unknown ScreenshotParamsFormat value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
72
vendor/github.com/chromedp/cdproto/heapprofiler/easyjson.go
generated
vendored
72
vendor/github.com/chromedp/cdproto/heapprofiler/easyjson.go
generated
vendored
@@ -39,10 +39,10 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler(in *jlexer.Lexer
|
||||
switch key {
|
||||
case "reportProgress":
|
||||
out.ReportProgress = bool(in.Bool())
|
||||
case "treatGlobalObjectsAsRoots":
|
||||
out.TreatGlobalObjectsAsRoots = bool(in.Bool())
|
||||
case "captureNumericValue":
|
||||
out.CaptureNumericValue = bool(in.Bool())
|
||||
case "exposeInternals":
|
||||
out.ExposeInternals = bool(in.Bool())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
@@ -63,16 +63,6 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler(out *jwriter.Wri
|
||||
out.RawString(prefix[1:])
|
||||
out.Bool(bool(in.ReportProgress))
|
||||
}
|
||||
if in.TreatGlobalObjectsAsRoots {
|
||||
const prefix string = ",\"treatGlobalObjectsAsRoots\":"
|
||||
if first {
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
} else {
|
||||
out.RawString(prefix)
|
||||
}
|
||||
out.Bool(bool(in.TreatGlobalObjectsAsRoots))
|
||||
}
|
||||
if in.CaptureNumericValue {
|
||||
const prefix string = ",\"captureNumericValue\":"
|
||||
if first {
|
||||
@@ -83,6 +73,16 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler(out *jwriter.Wri
|
||||
}
|
||||
out.Bool(bool(in.CaptureNumericValue))
|
||||
}
|
||||
if in.ExposeInternals {
|
||||
const prefix string = ",\"exposeInternals\":"
|
||||
if first {
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
} else {
|
||||
out.RawString(prefix)
|
||||
}
|
||||
out.Bool(bool(in.ExposeInternals))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
@@ -130,10 +130,10 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler1(in *jlexer.Lexe
|
||||
switch key {
|
||||
case "reportProgress":
|
||||
out.ReportProgress = bool(in.Bool())
|
||||
case "treatGlobalObjectsAsRoots":
|
||||
out.TreatGlobalObjectsAsRoots = bool(in.Bool())
|
||||
case "captureNumericValue":
|
||||
out.CaptureNumericValue = bool(in.Bool())
|
||||
case "exposeInternals":
|
||||
out.ExposeInternals = bool(in.Bool())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
@@ -154,16 +154,6 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler1(out *jwriter.Wr
|
||||
out.RawString(prefix[1:])
|
||||
out.Bool(bool(in.ReportProgress))
|
||||
}
|
||||
if in.TreatGlobalObjectsAsRoots {
|
||||
const prefix string = ",\"treatGlobalObjectsAsRoots\":"
|
||||
if first {
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
} else {
|
||||
out.RawString(prefix)
|
||||
}
|
||||
out.Bool(bool(in.TreatGlobalObjectsAsRoots))
|
||||
}
|
||||
if in.CaptureNumericValue {
|
||||
const prefix string = ",\"captureNumericValue\":"
|
||||
if first {
|
||||
@@ -174,6 +164,16 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler1(out *jwriter.Wr
|
||||
}
|
||||
out.Bool(bool(in.CaptureNumericValue))
|
||||
}
|
||||
if in.ExposeInternals {
|
||||
const prefix string = ",\"exposeInternals\":"
|
||||
if first {
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
} else {
|
||||
out.RawString(prefix)
|
||||
}
|
||||
out.Bool(bool(in.ExposeInternals))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
@@ -422,6 +422,10 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoHeapprofiler5(in *jlexer.Lexe
|
||||
switch key {
|
||||
case "samplingInterval":
|
||||
out.SamplingInterval = float64(in.Float64())
|
||||
case "includeObjectsCollectedByMajorGC":
|
||||
out.IncludeObjectsCollectedByMajorGC = bool(in.Bool())
|
||||
case "includeObjectsCollectedByMinorGC":
|
||||
out.IncludeObjectsCollectedByMinorGC = bool(in.Bool())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
@@ -442,6 +446,26 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoHeapprofiler5(out *jwriter.Wr
|
||||
out.RawString(prefix[1:])
|
||||
out.Float64(float64(in.SamplingInterval))
|
||||
}
|
||||
if in.IncludeObjectsCollectedByMajorGC {
|
||||
const prefix string = ",\"includeObjectsCollectedByMajorGC\":"
|
||||
if first {
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
} else {
|
||||
out.RawString(prefix)
|
||||
}
|
||||
out.Bool(bool(in.IncludeObjectsCollectedByMajorGC))
|
||||
}
|
||||
if in.IncludeObjectsCollectedByMinorGC {
|
||||
const prefix string = ",\"includeObjectsCollectedByMinorGC\":"
|
||||
if first {
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
} else {
|
||||
out.RawString(prefix)
|
||||
}
|
||||
out.Bool(bool(in.IncludeObjectsCollectedByMinorGC))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
|
||||
86
vendor/github.com/chromedp/cdproto/heapprofiler/heapprofiler.go
generated
vendored
86
vendor/github.com/chromedp/cdproto/heapprofiler/heapprofiler.go
generated
vendored
@@ -25,7 +25,8 @@ type AddInspectedHeapObjectParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-addInspectedHeapObject
|
||||
//
|
||||
// parameters:
|
||||
// heapObjectID - Heap snapshot object id to be accessible by means of $x command line API.
|
||||
//
|
||||
// heapObjectID - Heap snapshot object id to be accessible by means of $x command line API.
|
||||
func AddInspectedHeapObject(heapObjectID HeapSnapshotObjectID) *AddInspectedHeapObjectParams {
|
||||
return &AddInspectedHeapObjectParams{
|
||||
HeapObjectID: heapObjectID,
|
||||
@@ -92,7 +93,8 @@ type GetHeapObjectIDParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-getHeapObjectId
|
||||
//
|
||||
// parameters:
|
||||
// objectID - Identifier of the object to get heap object id for.
|
||||
//
|
||||
// objectID - Identifier of the object to get heap object id for.
|
||||
func GetHeapObjectID(objectID runtime.RemoteObjectID) *GetHeapObjectIDParams {
|
||||
return &GetHeapObjectIDParams{
|
||||
ObjectID: objectID,
|
||||
@@ -107,7 +109,8 @@ type GetHeapObjectIDReturns struct {
|
||||
// Do executes HeapProfiler.getHeapObjectId against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// heapSnapshotObjectID - Id of the heap snapshot object corresponding to the passed remote object id.
|
||||
//
|
||||
// heapSnapshotObjectID - Id of the heap snapshot object corresponding to the passed remote object id.
|
||||
func (p *GetHeapObjectIDParams) Do(ctx context.Context) (heapSnapshotObjectID HeapSnapshotObjectID, err error) {
|
||||
// execute
|
||||
var res GetHeapObjectIDReturns
|
||||
@@ -130,7 +133,8 @@ type GetObjectByHeapObjectIDParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-getObjectByHeapObjectId
|
||||
//
|
||||
// parameters:
|
||||
// objectID
|
||||
//
|
||||
// objectID
|
||||
func GetObjectByHeapObjectID(objectID HeapSnapshotObjectID) *GetObjectByHeapObjectIDParams {
|
||||
return &GetObjectByHeapObjectIDParams{
|
||||
ObjectID: objectID,
|
||||
@@ -152,7 +156,8 @@ type GetObjectByHeapObjectIDReturns struct {
|
||||
// Do executes HeapProfiler.getObjectByHeapObjectId against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// result - Evaluation result.
|
||||
//
|
||||
// result - Evaluation result.
|
||||
func (p *GetObjectByHeapObjectIDParams) Do(ctx context.Context) (result *runtime.RemoteObject, err error) {
|
||||
// execute
|
||||
var res GetObjectByHeapObjectIDReturns
|
||||
@@ -182,7 +187,8 @@ type GetSamplingProfileReturns struct {
|
||||
// Do executes HeapProfiler.getSamplingProfile against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// profile - Return the sampling profile being collected.
|
||||
//
|
||||
// profile - Return the sampling profile being collected.
|
||||
func (p *GetSamplingProfileParams) Do(ctx context.Context) (profile *SamplingHeapProfile, err error) {
|
||||
// execute
|
||||
var res GetSamplingProfileReturns
|
||||
@@ -196,7 +202,9 @@ func (p *GetSamplingProfileParams) Do(ctx context.Context) (profile *SamplingHea
|
||||
|
||||
// StartSamplingParams [no description].
|
||||
type StartSamplingParams struct {
|
||||
SamplingInterval float64 `json:"samplingInterval,omitempty"` // Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes.
|
||||
SamplingInterval float64 `json:"samplingInterval,omitempty"` // Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes.
|
||||
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 major GC, which will show which functions cause large temporary memory usage or long GC pauses.
|
||||
IncludeObjectsCollectedByMinorGC bool `json:"includeObjectsCollectedByMinorGC,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.
|
||||
}
|
||||
|
||||
// StartSampling [no description].
|
||||
@@ -215,6 +223,30 @@ func (p StartSamplingParams) WithSamplingInterval(samplingInterval float64) *Sta
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithIncludeObjectsCollectedByMajorGC 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.
|
||||
func (p StartSamplingParams) WithIncludeObjectsCollectedByMajorGC(includeObjectsCollectedByMajorGC bool) *StartSamplingParams {
|
||||
p.IncludeObjectsCollectedByMajorGC = includeObjectsCollectedByMajorGC
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithIncludeObjectsCollectedByMinorGC 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 (p StartSamplingParams) WithIncludeObjectsCollectedByMinorGC(includeObjectsCollectedByMinorGC bool) *StartSamplingParams {
|
||||
p.IncludeObjectsCollectedByMinorGC = includeObjectsCollectedByMinorGC
|
||||
return &p
|
||||
}
|
||||
|
||||
// Do executes HeapProfiler.startSampling against the provided context.
|
||||
func (p *StartSamplingParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandStartSampling, p, nil)
|
||||
@@ -263,7 +295,8 @@ type StopSamplingReturns struct {
|
||||
// Do executes HeapProfiler.stopSampling against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// profile - Recorded sampling heap profile.
|
||||
//
|
||||
// profile - Recorded sampling heap profile.
|
||||
func (p *StopSamplingParams) Do(ctx context.Context) (profile *SamplingHeapProfile, err error) {
|
||||
// execute
|
||||
var res StopSamplingReturns
|
||||
@@ -277,9 +310,9 @@ func (p *StopSamplingParams) Do(ctx context.Context) (profile *SamplingHeapProfi
|
||||
|
||||
// StopTrackingHeapObjectsParams [no description].
|
||||
type StopTrackingHeapObjectsParams struct {
|
||||
ReportProgress bool `json:"reportProgress,omitempty"` // If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped.
|
||||
TreatGlobalObjectsAsRoots bool `json:"treatGlobalObjectsAsRoots,omitempty"`
|
||||
CaptureNumericValue bool `json:"captureNumericValue,omitempty"` // If true, numerical values are included in the snapshot
|
||||
ReportProgress bool `json:"reportProgress,omitempty"` // If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped.
|
||||
CaptureNumericValue bool `json:"captureNumericValue,omitempty"` // If true, numerical values are included in the snapshot
|
||||
ExposeInternals bool `json:"exposeInternals,omitempty"` // If true, exposes internals of the snapshot.
|
||||
}
|
||||
|
||||
// StopTrackingHeapObjects [no description].
|
||||
@@ -298,12 +331,6 @@ func (p StopTrackingHeapObjectsParams) WithReportProgress(reportProgress bool) *
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithTreatGlobalObjectsAsRoots [no description].
|
||||
func (p StopTrackingHeapObjectsParams) WithTreatGlobalObjectsAsRoots(treatGlobalObjectsAsRoots bool) *StopTrackingHeapObjectsParams {
|
||||
p.TreatGlobalObjectsAsRoots = treatGlobalObjectsAsRoots
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithCaptureNumericValue if true, numerical values are included in the
|
||||
// snapshot.
|
||||
func (p StopTrackingHeapObjectsParams) WithCaptureNumericValue(captureNumericValue bool) *StopTrackingHeapObjectsParams {
|
||||
@@ -311,6 +338,12 @@ func (p StopTrackingHeapObjectsParams) WithCaptureNumericValue(captureNumericVal
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithExposeInternals if true, exposes internals of the snapshot.
|
||||
func (p StopTrackingHeapObjectsParams) WithExposeInternals(exposeInternals bool) *StopTrackingHeapObjectsParams {
|
||||
p.ExposeInternals = exposeInternals
|
||||
return &p
|
||||
}
|
||||
|
||||
// Do executes HeapProfiler.stopTrackingHeapObjects against the provided context.
|
||||
func (p *StopTrackingHeapObjectsParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandStopTrackingHeapObjects, p, nil)
|
||||
@@ -318,9 +351,9 @@ func (p *StopTrackingHeapObjectsParams) Do(ctx context.Context) (err error) {
|
||||
|
||||
// TakeHeapSnapshotParams [no description].
|
||||
type TakeHeapSnapshotParams struct {
|
||||
ReportProgress bool `json:"reportProgress,omitempty"` // If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken.
|
||||
TreatGlobalObjectsAsRoots bool `json:"treatGlobalObjectsAsRoots,omitempty"` // If true, a raw snapshot without artificial roots will be generated
|
||||
CaptureNumericValue bool `json:"captureNumericValue,omitempty"` // If true, numerical values are included in the snapshot
|
||||
ReportProgress bool `json:"reportProgress,omitempty"` // If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken.
|
||||
CaptureNumericValue bool `json:"captureNumericValue,omitempty"` // If true, numerical values are included in the snapshot
|
||||
ExposeInternals bool `json:"exposeInternals,omitempty"` // If true, exposes internals of the snapshot.
|
||||
}
|
||||
|
||||
// TakeHeapSnapshot [no description].
|
||||
@@ -339,13 +372,6 @@ func (p TakeHeapSnapshotParams) WithReportProgress(reportProgress bool) *TakeHea
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithTreatGlobalObjectsAsRoots if true, a raw snapshot without artificial
|
||||
// roots will be generated.
|
||||
func (p TakeHeapSnapshotParams) WithTreatGlobalObjectsAsRoots(treatGlobalObjectsAsRoots bool) *TakeHeapSnapshotParams {
|
||||
p.TreatGlobalObjectsAsRoots = treatGlobalObjectsAsRoots
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithCaptureNumericValue if true, numerical values are included in the
|
||||
// snapshot.
|
||||
func (p TakeHeapSnapshotParams) WithCaptureNumericValue(captureNumericValue bool) *TakeHeapSnapshotParams {
|
||||
@@ -353,6 +379,12 @@ func (p TakeHeapSnapshotParams) WithCaptureNumericValue(captureNumericValue bool
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithExposeInternals if true, exposes internals of the snapshot.
|
||||
func (p TakeHeapSnapshotParams) WithExposeInternals(exposeInternals bool) *TakeHeapSnapshotParams {
|
||||
p.ExposeInternals = exposeInternals
|
||||
return &p
|
||||
}
|
||||
|
||||
// Do executes HeapProfiler.takeHeapSnapshot against the provided context.
|
||||
func (p *TakeHeapSnapshotParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandTakeHeapSnapshot, p, nil)
|
||||
|
||||
147
vendor/github.com/chromedp/cdproto/indexeddb/easyjson.go
generated
vendored
147
vendor/github.com/chromedp/cdproto/indexeddb/easyjson.go
generated
vendored
@@ -114,6 +114,8 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb1(in *jlexer.Lexer,
|
||||
switch key {
|
||||
case "securityOrigin":
|
||||
out.SecurityOrigin = string(in.String())
|
||||
case "storageKey":
|
||||
out.StorageKey = string(in.String())
|
||||
case "databaseName":
|
||||
out.DatabaseName = string(in.String())
|
||||
default:
|
||||
@@ -130,14 +132,30 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb1(out *jwriter.Write
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
if in.SecurityOrigin != "" {
|
||||
const prefix string = ",\"securityOrigin\":"
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
out.String(string(in.SecurityOrigin))
|
||||
}
|
||||
if in.StorageKey != "" {
|
||||
const prefix string = ",\"storageKey\":"
|
||||
if first {
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
} else {
|
||||
out.RawString(prefix)
|
||||
}
|
||||
out.String(string(in.StorageKey))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"databaseName\":"
|
||||
out.RawString(prefix)
|
||||
if first {
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
} else {
|
||||
out.RawString(prefix)
|
||||
}
|
||||
out.String(string(in.DatabaseName))
|
||||
}
|
||||
out.RawByte('}')
|
||||
@@ -284,6 +302,8 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb3(in *jlexer.Lexer,
|
||||
switch key {
|
||||
case "securityOrigin":
|
||||
out.SecurityOrigin = string(in.String())
|
||||
case "storageKey":
|
||||
out.StorageKey = string(in.String())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
@@ -298,11 +318,22 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb3(out *jwriter.Write
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
if in.SecurityOrigin != "" {
|
||||
const prefix string = ",\"securityOrigin\":"
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
out.String(string(in.SecurityOrigin))
|
||||
}
|
||||
if in.StorageKey != "" {
|
||||
const prefix string = ",\"storageKey\":"
|
||||
if first {
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
} else {
|
||||
out.RawString(prefix)
|
||||
}
|
||||
out.String(string(in.StorageKey))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
@@ -471,6 +502,8 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb5(in *jlexer.Lexer,
|
||||
switch key {
|
||||
case "securityOrigin":
|
||||
out.SecurityOrigin = string(in.String())
|
||||
case "storageKey":
|
||||
out.StorageKey = string(in.String())
|
||||
case "databaseName":
|
||||
out.DatabaseName = string(in.String())
|
||||
case "objectStoreName":
|
||||
@@ -505,14 +538,30 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb5(out *jwriter.Write
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
if in.SecurityOrigin != "" {
|
||||
const prefix string = ",\"securityOrigin\":"
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
out.String(string(in.SecurityOrigin))
|
||||
}
|
||||
if in.StorageKey != "" {
|
||||
const prefix string = ",\"storageKey\":"
|
||||
if first {
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
} else {
|
||||
out.RawString(prefix)
|
||||
}
|
||||
out.String(string(in.StorageKey))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"databaseName\":"
|
||||
out.RawString(prefix)
|
||||
if first {
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
} else {
|
||||
out.RawString(prefix)
|
||||
}
|
||||
out.String(string(in.DatabaseName))
|
||||
}
|
||||
{
|
||||
@@ -1268,6 +1317,8 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb12(in *jlexer.Lexer,
|
||||
switch key {
|
||||
case "securityOrigin":
|
||||
out.SecurityOrigin = string(in.String())
|
||||
case "storageKey":
|
||||
out.StorageKey = string(in.String())
|
||||
case "databaseName":
|
||||
out.DatabaseName = string(in.String())
|
||||
case "objectStoreName":
|
||||
@@ -1286,14 +1337,30 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb12(out *jwriter.Writ
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
if in.SecurityOrigin != "" {
|
||||
const prefix string = ",\"securityOrigin\":"
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
out.String(string(in.SecurityOrigin))
|
||||
}
|
||||
if in.StorageKey != "" {
|
||||
const prefix string = ",\"storageKey\":"
|
||||
if first {
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
} else {
|
||||
out.RawString(prefix)
|
||||
}
|
||||
out.String(string(in.StorageKey))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"databaseName\":"
|
||||
out.RawString(prefix)
|
||||
if first {
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
} else {
|
||||
out.RawString(prefix)
|
||||
}
|
||||
out.String(string(in.DatabaseName))
|
||||
}
|
||||
{
|
||||
@@ -1466,6 +1533,8 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb15(in *jlexer.Lexer,
|
||||
switch key {
|
||||
case "securityOrigin":
|
||||
out.SecurityOrigin = string(in.String())
|
||||
case "storageKey":
|
||||
out.StorageKey = string(in.String())
|
||||
case "databaseName":
|
||||
out.DatabaseName = string(in.String())
|
||||
case "objectStoreName":
|
||||
@@ -1494,14 +1563,30 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb15(out *jwriter.Writ
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
if in.SecurityOrigin != "" {
|
||||
const prefix string = ",\"securityOrigin\":"
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
out.String(string(in.SecurityOrigin))
|
||||
}
|
||||
if in.StorageKey != "" {
|
||||
const prefix string = ",\"storageKey\":"
|
||||
if first {
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
} else {
|
||||
out.RawString(prefix)
|
||||
}
|
||||
out.String(string(in.StorageKey))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"databaseName\":"
|
||||
out.RawString(prefix)
|
||||
if first {
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
} else {
|
||||
out.RawString(prefix)
|
||||
}
|
||||
out.String(string(in.DatabaseName))
|
||||
}
|
||||
{
|
||||
@@ -1565,6 +1650,8 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb16(in *jlexer.Lexer,
|
||||
switch key {
|
||||
case "securityOrigin":
|
||||
out.SecurityOrigin = string(in.String())
|
||||
case "storageKey":
|
||||
out.StorageKey = string(in.String())
|
||||
case "databaseName":
|
||||
out.DatabaseName = string(in.String())
|
||||
default:
|
||||
@@ -1581,14 +1668,30 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb16(out *jwriter.Writ
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
if in.SecurityOrigin != "" {
|
||||
const prefix string = ",\"securityOrigin\":"
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
out.String(string(in.SecurityOrigin))
|
||||
}
|
||||
if in.StorageKey != "" {
|
||||
const prefix string = ",\"storageKey\":"
|
||||
if first {
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
} else {
|
||||
out.RawString(prefix)
|
||||
}
|
||||
out.String(string(in.StorageKey))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"databaseName\":"
|
||||
out.RawString(prefix)
|
||||
if first {
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
} else {
|
||||
out.RawString(prefix)
|
||||
}
|
||||
out.String(string(in.DatabaseName))
|
||||
}
|
||||
out.RawByte('}')
|
||||
@@ -1878,6 +1981,8 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb19(in *jlexer.Lexer,
|
||||
switch key {
|
||||
case "securityOrigin":
|
||||
out.SecurityOrigin = string(in.String())
|
||||
case "storageKey":
|
||||
out.StorageKey = string(in.String())
|
||||
case "databaseName":
|
||||
out.DatabaseName = string(in.String())
|
||||
case "objectStoreName":
|
||||
@@ -1896,14 +2001,30 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb19(out *jwriter.Writ
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
if in.SecurityOrigin != "" {
|
||||
const prefix string = ",\"securityOrigin\":"
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
out.String(string(in.SecurityOrigin))
|
||||
}
|
||||
if in.StorageKey != "" {
|
||||
const prefix string = ",\"storageKey\":"
|
||||
if first {
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
} else {
|
||||
out.RawString(prefix)
|
||||
}
|
||||
out.String(string(in.StorageKey))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"databaseName\":"
|
||||
out.RawString(prefix)
|
||||
if first {
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
} else {
|
||||
out.RawString(prefix)
|
||||
}
|
||||
out.String(string(in.DatabaseName))
|
||||
}
|
||||
{
|
||||
|
||||
221
vendor/github.com/chromedp/cdproto/indexeddb/indexeddb.go
generated
vendored
221
vendor/github.com/chromedp/cdproto/indexeddb/indexeddb.go
generated
vendored
@@ -14,9 +14,10 @@ import (
|
||||
|
||||
// ClearObjectStoreParams clears all entries from an object store.
|
||||
type ClearObjectStoreParams struct {
|
||||
SecurityOrigin string `json:"securityOrigin"` // Security origin.
|
||||
DatabaseName string `json:"databaseName"` // Database name.
|
||||
ObjectStoreName string `json:"objectStoreName"` // Object store name.
|
||||
SecurityOrigin string `json:"securityOrigin,omitempty"` // At least and at most one of securityOrigin, storageKey must be specified. Security origin.
|
||||
StorageKey string `json:"storageKey,omitempty"` // Storage key.
|
||||
DatabaseName string `json:"databaseName"` // Database name.
|
||||
ObjectStoreName string `json:"objectStoreName"` // Object store name.
|
||||
}
|
||||
|
||||
// ClearObjectStore clears all entries from an object store.
|
||||
@@ -24,17 +25,29 @@ type ClearObjectStoreParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#method-clearObjectStore
|
||||
//
|
||||
// parameters:
|
||||
// securityOrigin - Security origin.
|
||||
// databaseName - Database name.
|
||||
// objectStoreName - Object store name.
|
||||
func ClearObjectStore(securityOrigin string, databaseName string, objectStoreName string) *ClearObjectStoreParams {
|
||||
//
|
||||
// databaseName - Database name.
|
||||
// objectStoreName - Object store name.
|
||||
func ClearObjectStore(databaseName string, objectStoreName string) *ClearObjectStoreParams {
|
||||
return &ClearObjectStoreParams{
|
||||
SecurityOrigin: securityOrigin,
|
||||
DatabaseName: databaseName,
|
||||
ObjectStoreName: objectStoreName,
|
||||
}
|
||||
}
|
||||
|
||||
// WithSecurityOrigin at least and at most one of securityOrigin, storageKey
|
||||
// must be specified. Security origin.
|
||||
func (p ClearObjectStoreParams) WithSecurityOrigin(securityOrigin string) *ClearObjectStoreParams {
|
||||
p.SecurityOrigin = securityOrigin
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithStorageKey storage key.
|
||||
func (p ClearObjectStoreParams) WithStorageKey(storageKey string) *ClearObjectStoreParams {
|
||||
p.StorageKey = storageKey
|
||||
return &p
|
||||
}
|
||||
|
||||
// Do executes IndexedDB.clearObjectStore against the provided context.
|
||||
func (p *ClearObjectStoreParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandClearObjectStore, p, nil)
|
||||
@@ -42,8 +55,9 @@ func (p *ClearObjectStoreParams) Do(ctx context.Context) (err error) {
|
||||
|
||||
// DeleteDatabaseParams deletes a database.
|
||||
type DeleteDatabaseParams struct {
|
||||
SecurityOrigin string `json:"securityOrigin"` // Security origin.
|
||||
DatabaseName string `json:"databaseName"` // Database name.
|
||||
SecurityOrigin string `json:"securityOrigin,omitempty"` // At least and at most one of securityOrigin, storageKey must be specified. Security origin.
|
||||
StorageKey string `json:"storageKey,omitempty"` // Storage key.
|
||||
DatabaseName string `json:"databaseName"` // Database name.
|
||||
}
|
||||
|
||||
// DeleteDatabase deletes a database.
|
||||
@@ -51,15 +65,27 @@ type DeleteDatabaseParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#method-deleteDatabase
|
||||
//
|
||||
// parameters:
|
||||
// securityOrigin - Security origin.
|
||||
// databaseName - Database name.
|
||||
func DeleteDatabase(securityOrigin string, databaseName string) *DeleteDatabaseParams {
|
||||
//
|
||||
// databaseName - Database name.
|
||||
func DeleteDatabase(databaseName string) *DeleteDatabaseParams {
|
||||
return &DeleteDatabaseParams{
|
||||
SecurityOrigin: securityOrigin,
|
||||
DatabaseName: databaseName,
|
||||
DatabaseName: databaseName,
|
||||
}
|
||||
}
|
||||
|
||||
// WithSecurityOrigin at least and at most one of securityOrigin, storageKey
|
||||
// must be specified. Security origin.
|
||||
func (p DeleteDatabaseParams) WithSecurityOrigin(securityOrigin string) *DeleteDatabaseParams {
|
||||
p.SecurityOrigin = securityOrigin
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithStorageKey storage key.
|
||||
func (p DeleteDatabaseParams) WithStorageKey(storageKey string) *DeleteDatabaseParams {
|
||||
p.StorageKey = storageKey
|
||||
return &p
|
||||
}
|
||||
|
||||
// Do executes IndexedDB.deleteDatabase against the provided context.
|
||||
func (p *DeleteDatabaseParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandDeleteDatabase, p, nil)
|
||||
@@ -68,7 +94,8 @@ func (p *DeleteDatabaseParams) Do(ctx context.Context) (err error) {
|
||||
// DeleteObjectStoreEntriesParams delete a range of entries from an object
|
||||
// store.
|
||||
type DeleteObjectStoreEntriesParams struct {
|
||||
SecurityOrigin string `json:"securityOrigin"`
|
||||
SecurityOrigin string `json:"securityOrigin,omitempty"` // At least and at most one of securityOrigin, storageKey must be specified. Security origin.
|
||||
StorageKey string `json:"storageKey,omitempty"` // Storage key.
|
||||
DatabaseName string `json:"databaseName"`
|
||||
ObjectStoreName string `json:"objectStoreName"`
|
||||
KeyRange *KeyRange `json:"keyRange"` // Range of entry keys to delete
|
||||
@@ -79,19 +106,31 @@ type DeleteObjectStoreEntriesParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#method-deleteObjectStoreEntries
|
||||
//
|
||||
// parameters:
|
||||
// securityOrigin
|
||||
// databaseName
|
||||
// objectStoreName
|
||||
// keyRange - Range of entry keys to delete
|
||||
func DeleteObjectStoreEntries(securityOrigin string, databaseName string, objectStoreName string, keyRange *KeyRange) *DeleteObjectStoreEntriesParams {
|
||||
//
|
||||
// databaseName
|
||||
// objectStoreName
|
||||
// keyRange - Range of entry keys to delete
|
||||
func DeleteObjectStoreEntries(databaseName string, objectStoreName string, keyRange *KeyRange) *DeleteObjectStoreEntriesParams {
|
||||
return &DeleteObjectStoreEntriesParams{
|
||||
SecurityOrigin: securityOrigin,
|
||||
DatabaseName: databaseName,
|
||||
ObjectStoreName: objectStoreName,
|
||||
KeyRange: keyRange,
|
||||
}
|
||||
}
|
||||
|
||||
// WithSecurityOrigin at least and at most one of securityOrigin, storageKey
|
||||
// must be specified. Security origin.
|
||||
func (p DeleteObjectStoreEntriesParams) WithSecurityOrigin(securityOrigin string) *DeleteObjectStoreEntriesParams {
|
||||
p.SecurityOrigin = securityOrigin
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithStorageKey storage key.
|
||||
func (p DeleteObjectStoreEntriesParams) WithStorageKey(storageKey string) *DeleteObjectStoreEntriesParams {
|
||||
p.StorageKey = storageKey
|
||||
return &p
|
||||
}
|
||||
|
||||
// Do executes IndexedDB.deleteObjectStoreEntries against the provided context.
|
||||
func (p *DeleteObjectStoreEntriesParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandDeleteObjectStoreEntries, p, nil)
|
||||
@@ -129,13 +168,14 @@ func (p *EnableParams) Do(ctx context.Context) (err error) {
|
||||
|
||||
// RequestDataParams requests data from object store or index.
|
||||
type RequestDataParams struct {
|
||||
SecurityOrigin string `json:"securityOrigin"` // Security origin.
|
||||
DatabaseName string `json:"databaseName"` // Database name.
|
||||
ObjectStoreName string `json:"objectStoreName"` // Object store name.
|
||||
IndexName string `json:"indexName"` // Index name, empty string for object store data requests.
|
||||
SkipCount int64 `json:"skipCount"` // Number of records to skip.
|
||||
PageSize int64 `json:"pageSize"` // Number of records to fetch.
|
||||
KeyRange *KeyRange `json:"keyRange,omitempty"` // Key range.
|
||||
SecurityOrigin string `json:"securityOrigin,omitempty"` // At least and at most one of securityOrigin, storageKey must be specified. Security origin.
|
||||
StorageKey string `json:"storageKey,omitempty"` // Storage key.
|
||||
DatabaseName string `json:"databaseName"` // Database name.
|
||||
ObjectStoreName string `json:"objectStoreName"` // Object store name.
|
||||
IndexName string `json:"indexName"` // Index name, empty string for object store data requests.
|
||||
SkipCount int64 `json:"skipCount"` // Number of records to skip.
|
||||
PageSize int64 `json:"pageSize"` // Number of records to fetch.
|
||||
KeyRange *KeyRange `json:"keyRange,omitempty"` // Key range.
|
||||
}
|
||||
|
||||
// RequestData requests data from object store or index.
|
||||
@@ -143,15 +183,14 @@ type RequestDataParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#method-requestData
|
||||
//
|
||||
// parameters:
|
||||
// securityOrigin - Security origin.
|
||||
// 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.
|
||||
func RequestData(securityOrigin string, databaseName string, objectStoreName string, indexName string, skipCount int64, pageSize int64) *RequestDataParams {
|
||||
//
|
||||
// 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.
|
||||
func RequestData(databaseName string, objectStoreName string, indexName string, skipCount int64, pageSize int64) *RequestDataParams {
|
||||
return &RequestDataParams{
|
||||
SecurityOrigin: securityOrigin,
|
||||
DatabaseName: databaseName,
|
||||
ObjectStoreName: objectStoreName,
|
||||
IndexName: indexName,
|
||||
@@ -160,6 +199,19 @@ func RequestData(securityOrigin string, databaseName string, objectStoreName str
|
||||
}
|
||||
}
|
||||
|
||||
// WithSecurityOrigin at least and at most one of securityOrigin, storageKey
|
||||
// must be specified. Security origin.
|
||||
func (p RequestDataParams) WithSecurityOrigin(securityOrigin string) *RequestDataParams {
|
||||
p.SecurityOrigin = securityOrigin
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithStorageKey storage key.
|
||||
func (p RequestDataParams) WithStorageKey(storageKey string) *RequestDataParams {
|
||||
p.StorageKey = storageKey
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithKeyRange key range.
|
||||
func (p RequestDataParams) WithKeyRange(keyRange *KeyRange) *RequestDataParams {
|
||||
p.KeyRange = keyRange
|
||||
@@ -175,8 +227,9 @@ type RequestDataReturns struct {
|
||||
// Do executes IndexedDB.requestData against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// objectStoreDataEntries - Array of object store data entries.
|
||||
// hasMore - If true, there are more entries to fetch in the given range.
|
||||
//
|
||||
// objectStoreDataEntries - Array of object store data entries.
|
||||
// hasMore - If true, there are more entries to fetch in the given range.
|
||||
func (p *RequestDataParams) Do(ctx context.Context) (objectStoreDataEntries []*DataEntry, hasMore bool, err error) {
|
||||
// execute
|
||||
var res RequestDataReturns
|
||||
@@ -190,9 +243,10 @@ func (p *RequestDataParams) Do(ctx context.Context) (objectStoreDataEntries []*D
|
||||
|
||||
// GetMetadataParams gets metadata of an object store.
|
||||
type GetMetadataParams struct {
|
||||
SecurityOrigin string `json:"securityOrigin"` // Security origin.
|
||||
DatabaseName string `json:"databaseName"` // Database name.
|
||||
ObjectStoreName string `json:"objectStoreName"` // Object store name.
|
||||
SecurityOrigin string `json:"securityOrigin,omitempty"` // At least and at most one of securityOrigin, storageKey must be specified. Security origin.
|
||||
StorageKey string `json:"storageKey,omitempty"` // Storage key.
|
||||
DatabaseName string `json:"databaseName"` // Database name.
|
||||
ObjectStoreName string `json:"objectStoreName"` // Object store name.
|
||||
}
|
||||
|
||||
// GetMetadata gets metadata of an object store.
|
||||
@@ -200,17 +254,29 @@ type GetMetadataParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#method-getMetadata
|
||||
//
|
||||
// parameters:
|
||||
// securityOrigin - Security origin.
|
||||
// databaseName - Database name.
|
||||
// objectStoreName - Object store name.
|
||||
func GetMetadata(securityOrigin string, databaseName string, objectStoreName string) *GetMetadataParams {
|
||||
//
|
||||
// databaseName - Database name.
|
||||
// objectStoreName - Object store name.
|
||||
func GetMetadata(databaseName string, objectStoreName string) *GetMetadataParams {
|
||||
return &GetMetadataParams{
|
||||
SecurityOrigin: securityOrigin,
|
||||
DatabaseName: databaseName,
|
||||
ObjectStoreName: objectStoreName,
|
||||
}
|
||||
}
|
||||
|
||||
// WithSecurityOrigin at least and at most one of securityOrigin, storageKey
|
||||
// must be specified. Security origin.
|
||||
func (p GetMetadataParams) WithSecurityOrigin(securityOrigin string) *GetMetadataParams {
|
||||
p.SecurityOrigin = securityOrigin
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithStorageKey storage key.
|
||||
func (p GetMetadataParams) WithStorageKey(storageKey string) *GetMetadataParams {
|
||||
p.StorageKey = storageKey
|
||||
return &p
|
||||
}
|
||||
|
||||
// GetMetadataReturns return values.
|
||||
type GetMetadataReturns struct {
|
||||
EntriesCount float64 `json:"entriesCount,omitempty"` // the entries count
|
||||
@@ -220,8 +286,9 @@ type GetMetadataReturns struct {
|
||||
// Do executes IndexedDB.getMetadata against the provided context.
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// 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 (p *GetMetadataParams) Do(ctx context.Context) (entriesCount float64, keyGeneratorValue float64, err error) {
|
||||
// execute
|
||||
var res GetMetadataReturns
|
||||
@@ -235,8 +302,9 @@ func (p *GetMetadataParams) Do(ctx context.Context) (entriesCount float64, keyGe
|
||||
|
||||
// RequestDatabaseParams requests database with given name in given frame.
|
||||
type RequestDatabaseParams struct {
|
||||
SecurityOrigin string `json:"securityOrigin"` // Security origin.
|
||||
DatabaseName string `json:"databaseName"` // Database name.
|
||||
SecurityOrigin string `json:"securityOrigin,omitempty"` // At least and at most one of securityOrigin, storageKey must be specified. Security origin.
|
||||
StorageKey string `json:"storageKey,omitempty"` // Storage key.
|
||||
DatabaseName string `json:"databaseName"` // Database name.
|
||||
}
|
||||
|
||||
// RequestDatabase requests database with given name in given frame.
|
||||
@@ -244,15 +312,27 @@ type RequestDatabaseParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#method-requestDatabase
|
||||
//
|
||||
// parameters:
|
||||
// securityOrigin - Security origin.
|
||||
// databaseName - Database name.
|
||||
func RequestDatabase(securityOrigin string, databaseName string) *RequestDatabaseParams {
|
||||
//
|
||||
// databaseName - Database name.
|
||||
func RequestDatabase(databaseName string) *RequestDatabaseParams {
|
||||
return &RequestDatabaseParams{
|
||||
SecurityOrigin: securityOrigin,
|
||||
DatabaseName: databaseName,
|
||||
DatabaseName: databaseName,
|
||||
}
|
||||
}
|
||||
|
||||
// WithSecurityOrigin at least and at most one of securityOrigin, storageKey
|
||||
// must be specified. Security origin.
|
||||
func (p RequestDatabaseParams) WithSecurityOrigin(securityOrigin string) *RequestDatabaseParams {
|
||||
p.SecurityOrigin = securityOrigin
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithStorageKey storage key.
|
||||
func (p RequestDatabaseParams) WithStorageKey(storageKey string) *RequestDatabaseParams {
|
||||
p.StorageKey = storageKey
|
||||
return &p
|
||||
}
|
||||
|
||||
// RequestDatabaseReturns return values.
|
||||
type RequestDatabaseReturns struct {
|
||||
DatabaseWithObjectStores *DatabaseWithObjectStores `json:"databaseWithObjectStores,omitempty"` // Database with an array of object stores.
|
||||
@@ -261,7 +341,8 @@ type RequestDatabaseReturns struct {
|
||||
// Do executes IndexedDB.requestDatabase against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// databaseWithObjectStores - Database with an array of object stores.
|
||||
//
|
||||
// databaseWithObjectStores - Database with an array of object stores.
|
||||
func (p *RequestDatabaseParams) Do(ctx context.Context) (databaseWithObjectStores *DatabaseWithObjectStores, err error) {
|
||||
// execute
|
||||
var res RequestDatabaseReturns
|
||||
@@ -276,7 +357,8 @@ func (p *RequestDatabaseParams) Do(ctx context.Context) (databaseWithObjectStore
|
||||
// RequestDatabaseNamesParams requests database names for given security
|
||||
// origin.
|
||||
type RequestDatabaseNamesParams struct {
|
||||
SecurityOrigin string `json:"securityOrigin"` // Security origin.
|
||||
SecurityOrigin string `json:"securityOrigin,omitempty"` // At least and at most one of securityOrigin, storageKey must be specified. Security origin.
|
||||
StorageKey string `json:"storageKey,omitempty"` // Storage key.
|
||||
}
|
||||
|
||||
// RequestDatabaseNames requests database names for given security origin.
|
||||
@@ -284,11 +366,21 @@ type RequestDatabaseNamesParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/IndexedDB#method-requestDatabaseNames
|
||||
//
|
||||
// parameters:
|
||||
// securityOrigin - Security origin.
|
||||
func RequestDatabaseNames(securityOrigin string) *RequestDatabaseNamesParams {
|
||||
return &RequestDatabaseNamesParams{
|
||||
SecurityOrigin: securityOrigin,
|
||||
}
|
||||
func RequestDatabaseNames() *RequestDatabaseNamesParams {
|
||||
return &RequestDatabaseNamesParams{}
|
||||
}
|
||||
|
||||
// WithSecurityOrigin at least and at most one of securityOrigin, storageKey
|
||||
// must be specified. Security origin.
|
||||
func (p RequestDatabaseNamesParams) WithSecurityOrigin(securityOrigin string) *RequestDatabaseNamesParams {
|
||||
p.SecurityOrigin = securityOrigin
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithStorageKey storage key.
|
||||
func (p RequestDatabaseNamesParams) WithStorageKey(storageKey string) *RequestDatabaseNamesParams {
|
||||
p.StorageKey = storageKey
|
||||
return &p
|
||||
}
|
||||
|
||||
// RequestDatabaseNamesReturns return values.
|
||||
@@ -299,7 +391,8 @@ type RequestDatabaseNamesReturns struct {
|
||||
// Do executes IndexedDB.requestDatabaseNames against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// databaseNames - Database names for origin.
|
||||
//
|
||||
// databaseNames - Database names for origin.
|
||||
func (p *RequestDatabaseNamesParams) Do(ctx context.Context) (databaseNames []string, err error) {
|
||||
// execute
|
||||
var res RequestDatabaseNamesReturns
|
||||
|
||||
12
vendor/github.com/chromedp/cdproto/indexeddb/types.go
generated
vendored
12
vendor/github.com/chromedp/cdproto/indexeddb/types.go
generated
vendored
@@ -3,7 +3,7 @@ package indexeddb
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/chromedp/cdproto/runtime"
|
||||
"github.com/mailru/easyjson"
|
||||
@@ -109,7 +109,8 @@ func (t KeyType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *KeyType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch KeyType(in.String()) {
|
||||
v := in.String()
|
||||
switch KeyType(v) {
|
||||
case KeyTypeNumber:
|
||||
*t = KeyTypeNumber
|
||||
case KeyTypeString:
|
||||
@@ -120,7 +121,7 @@ func (t *KeyType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = KeyTypeArray
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown KeyType value"))
|
||||
in.AddError(fmt.Errorf("unknown KeyType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,7 +159,8 @@ func (t KeyPathType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *KeyPathType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch KeyPathType(in.String()) {
|
||||
v := in.String()
|
||||
switch KeyPathType(v) {
|
||||
case KeyPathTypeNull:
|
||||
*t = KeyPathTypeNull
|
||||
case KeyPathTypeString:
|
||||
@@ -167,7 +169,7 @@ func (t *KeyPathType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = KeyPathTypeArray
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown KeyPathType value"))
|
||||
in.AddError(fmt.Errorf("unknown KeyPathType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
271
vendor/github.com/chromedp/cdproto/input/easyjson.go
generated
vendored
271
vendor/github.com/chromedp/cdproto/input/easyjson.go
generated
vendored
@@ -682,7 +682,101 @@ func (v *InsertTextParams) UnmarshalJSON(data []byte) error {
|
||||
func (v *InsertTextParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput6(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput7(in *jlexer.Lexer, out *EventDragIntercepted) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput7(in *jlexer.Lexer, out *ImeSetCompositionParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case "text":
|
||||
out.Text = string(in.String())
|
||||
case "selectionStart":
|
||||
out.SelectionStart = int64(in.Int64())
|
||||
case "selectionEnd":
|
||||
out.SelectionEnd = int64(in.Int64())
|
||||
case "replacementStart":
|
||||
out.ReplacementStart = int64(in.Int64())
|
||||
case "replacementEnd":
|
||||
out.ReplacementEnd = int64(in.Int64())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput7(out *jwriter.Writer, in ImeSetCompositionParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
const prefix string = ",\"text\":"
|
||||
out.RawString(prefix[1:])
|
||||
out.String(string(in.Text))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"selectionStart\":"
|
||||
out.RawString(prefix)
|
||||
out.Int64(int64(in.SelectionStart))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"selectionEnd\":"
|
||||
out.RawString(prefix)
|
||||
out.Int64(int64(in.SelectionEnd))
|
||||
}
|
||||
if in.ReplacementStart != 0 {
|
||||
const prefix string = ",\"replacementStart\":"
|
||||
out.RawString(prefix)
|
||||
out.Int64(int64(in.ReplacementStart))
|
||||
}
|
||||
if in.ReplacementEnd != 0 {
|
||||
const prefix string = ",\"replacementEnd\":"
|
||||
out.RawString(prefix)
|
||||
out.Int64(int64(in.ReplacementEnd))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v ImeSetCompositionParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput7(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v ImeSetCompositionParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput7(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *ImeSetCompositionParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput7(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *ImeSetCompositionParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput7(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput8(in *jlexer.Lexer, out *EventDragIntercepted) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -721,7 +815,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput7(in *jlexer.Lexer, out
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput7(out *jwriter.Writer, in EventDragIntercepted) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput8(out *jwriter.Writer, in EventDragIntercepted) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -740,27 +834,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput7(out *jwriter.Writer, i
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v EventDragIntercepted) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput7(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput8(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v EventDragIntercepted) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput7(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput8(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *EventDragIntercepted) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput7(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput8(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *EventDragIntercepted) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput7(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput8(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput8(in *jlexer.Lexer, out *EmulateTouchFromMouseEventParams) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput9(in *jlexer.Lexer, out *EmulateTouchFromMouseEventParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -815,7 +909,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput8(in *jlexer.Lexer, out
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput8(out *jwriter.Writer, in EmulateTouchFromMouseEventParams) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput9(out *jwriter.Writer, in EmulateTouchFromMouseEventParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -844,12 +938,12 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput8(out *jwriter.Writer, i
|
||||
out.RawString(prefix)
|
||||
(*in.Timestamp).MarshalEasyJSON(out)
|
||||
}
|
||||
if in.DeltaX != 0 {
|
||||
{
|
||||
const prefix string = ",\"deltaX\":"
|
||||
out.RawString(prefix)
|
||||
out.Float64(float64(in.DeltaX))
|
||||
}
|
||||
if in.DeltaY != 0 {
|
||||
{
|
||||
const prefix string = ",\"deltaY\":"
|
||||
out.RawString(prefix)
|
||||
out.Float64(float64(in.DeltaY))
|
||||
@@ -870,27 +964,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput8(out *jwriter.Writer, i
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v EmulateTouchFromMouseEventParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput8(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput9(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v EmulateTouchFromMouseEventParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput8(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput9(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *EmulateTouchFromMouseEventParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput8(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput9(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *EmulateTouchFromMouseEventParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput8(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput9(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput9(in *jlexer.Lexer, out *DragDataItem) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput10(in *jlexer.Lexer, out *DragDataItem) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -927,7 +1021,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput9(in *jlexer.Lexer, out
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput9(out *jwriter.Writer, in DragDataItem) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput10(out *jwriter.Writer, in DragDataItem) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -957,27 +1051,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput9(out *jwriter.Writer, i
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v DragDataItem) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput9(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput10(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v DragDataItem) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput9(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput10(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *DragDataItem) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput9(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput10(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *DragDataItem) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput9(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput10(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput10(in *jlexer.Lexer, out *DragData) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput11(in *jlexer.Lexer, out *DragData) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -1027,6 +1121,29 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput10(in *jlexer.Lexer, out
|
||||
}
|
||||
in.Delim(']')
|
||||
}
|
||||
case "files":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
out.Files = nil
|
||||
} else {
|
||||
in.Delim('[')
|
||||
if out.Files == nil {
|
||||
if !in.IsDelim(']') {
|
||||
out.Files = make([]string, 0, 4)
|
||||
} else {
|
||||
out.Files = []string{}
|
||||
}
|
||||
} else {
|
||||
out.Files = (out.Files)[:0]
|
||||
}
|
||||
for !in.IsDelim(']') {
|
||||
var v2 string
|
||||
v2 = string(in.String())
|
||||
out.Files = append(out.Files, v2)
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim(']')
|
||||
}
|
||||
case "dragOperationsMask":
|
||||
out.DragOperationsMask = int64(in.Int64())
|
||||
default:
|
||||
@@ -1039,7 +1156,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput10(in *jlexer.Lexer, out
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput10(out *jwriter.Writer, in DragData) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput11(out *jwriter.Writer, in DragData) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -1050,19 +1167,33 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput10(out *jwriter.Writer,
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v2, v3 := range in.Items {
|
||||
if v2 > 0 {
|
||||
for v3, v4 := range in.Items {
|
||||
if v3 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v3 == nil {
|
||||
if v4 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v3).MarshalEasyJSON(out)
|
||||
(*v4).MarshalEasyJSON(out)
|
||||
}
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
}
|
||||
if len(in.Files) != 0 {
|
||||
const prefix string = ",\"files\":"
|
||||
out.RawString(prefix)
|
||||
{
|
||||
out.RawByte('[')
|
||||
for v5, v6 := range in.Files {
|
||||
if v5 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
out.String(string(v6))
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"dragOperationsMask\":"
|
||||
out.RawString(prefix)
|
||||
@@ -1074,27 +1205,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput10(out *jwriter.Writer,
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v DragData) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput10(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput11(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v DragData) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput10(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput11(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *DragData) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput10(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput11(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *DragData) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput10(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput11(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput11(in *jlexer.Lexer, out *DispatchTouchEventParams) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput12(in *jlexer.Lexer, out *DispatchTouchEventParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -1131,17 +1262,17 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput11(in *jlexer.Lexer, out
|
||||
out.TouchPoints = (out.TouchPoints)[:0]
|
||||
}
|
||||
for !in.IsDelim(']') {
|
||||
var v4 *TouchPoint
|
||||
var v7 *TouchPoint
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
v4 = nil
|
||||
v7 = nil
|
||||
} else {
|
||||
if v4 == nil {
|
||||
v4 = new(TouchPoint)
|
||||
if v7 == nil {
|
||||
v7 = new(TouchPoint)
|
||||
}
|
||||
(*v4).UnmarshalEasyJSON(in)
|
||||
(*v7).UnmarshalEasyJSON(in)
|
||||
}
|
||||
out.TouchPoints = append(out.TouchPoints, v4)
|
||||
out.TouchPoints = append(out.TouchPoints, v7)
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim(']')
|
||||
@@ -1168,7 +1299,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput11(in *jlexer.Lexer, out
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput11(out *jwriter.Writer, in DispatchTouchEventParams) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput12(out *jwriter.Writer, in DispatchTouchEventParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -1184,14 +1315,14 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput11(out *jwriter.Writer,
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v5, v6 := range in.TouchPoints {
|
||||
if v5 > 0 {
|
||||
for v8, v9 := range in.TouchPoints {
|
||||
if v8 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v6 == nil {
|
||||
if v9 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v6).MarshalEasyJSON(out)
|
||||
(*v9).MarshalEasyJSON(out)
|
||||
}
|
||||
}
|
||||
out.RawByte(']')
|
||||
@@ -1213,27 +1344,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput11(out *jwriter.Writer,
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v DispatchTouchEventParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput11(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput12(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v DispatchTouchEventParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput11(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput12(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *DispatchTouchEventParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput11(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput12(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *DispatchTouchEventParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput11(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput12(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput12(in *jlexer.Lexer, out *DispatchMouseEventParams) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput13(in *jlexer.Lexer, out *DispatchMouseEventParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -1302,7 +1433,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput12(in *jlexer.Lexer, out
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput12(out *jwriter.Writer, in DispatchMouseEventParams) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput13(out *jwriter.Writer, in DispatchMouseEventParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -1392,27 +1523,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput12(out *jwriter.Writer,
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v DispatchMouseEventParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput12(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput13(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v DispatchMouseEventParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput12(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput13(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *DispatchMouseEventParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput12(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput13(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *DispatchMouseEventParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput12(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput13(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput13(in *jlexer.Lexer, out *DispatchKeyEventParams) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput14(in *jlexer.Lexer, out *DispatchKeyEventParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -1483,9 +1614,9 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput13(in *jlexer.Lexer, out
|
||||
out.Commands = (out.Commands)[:0]
|
||||
}
|
||||
for !in.IsDelim(']') {
|
||||
var v7 string
|
||||
v7 = string(in.String())
|
||||
out.Commands = append(out.Commands, v7)
|
||||
var v10 string
|
||||
v10 = string(in.String())
|
||||
out.Commands = append(out.Commands, v10)
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim(']')
|
||||
@@ -1500,7 +1631,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput13(in *jlexer.Lexer, out
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput13(out *jwriter.Writer, in DispatchKeyEventParams) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput14(out *jwriter.Writer, in DispatchKeyEventParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -1579,11 +1710,11 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput13(out *jwriter.Writer,
|
||||
out.RawString(prefix)
|
||||
{
|
||||
out.RawByte('[')
|
||||
for v8, v9 := range in.Commands {
|
||||
if v8 > 0 {
|
||||
for v11, v12 := range in.Commands {
|
||||
if v11 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
out.String(string(v9))
|
||||
out.String(string(v12))
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
@@ -1594,27 +1725,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput13(out *jwriter.Writer,
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v DispatchKeyEventParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput13(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput14(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v DispatchKeyEventParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput13(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput14(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *DispatchKeyEventParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput13(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput14(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *DispatchKeyEventParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput13(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput14(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput14(in *jlexer.Lexer, out *DispatchDragEventParams) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput15(in *jlexer.Lexer, out *DispatchDragEventParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -1661,7 +1792,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput14(in *jlexer.Lexer, out
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput14(out *jwriter.Writer, in DispatchDragEventParams) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput15(out *jwriter.Writer, in DispatchDragEventParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -1700,23 +1831,23 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput14(out *jwriter.Writer,
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v DispatchDragEventParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput14(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput15(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v DispatchDragEventParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput14(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoInput15(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *DispatchDragEventParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput14(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput15(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *DispatchDragEventParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput14(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoInput15(l, v)
|
||||
}
|
||||
|
||||
115
vendor/github.com/chromedp/cdproto/input/input.go
generated
vendored
115
vendor/github.com/chromedp/cdproto/input/input.go
generated
vendored
@@ -26,10 +26,11 @@ type DispatchDragEventParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-dispatchDragEvent
|
||||
//
|
||||
// parameters:
|
||||
// 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
|
||||
//
|
||||
// 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
|
||||
func DispatchDragEvent(typeVal DispatchDragEventType, x float64, y float64, data *DragData) *DispatchDragEventParams {
|
||||
return &DispatchDragEventParams{
|
||||
Type: typeVal,
|
||||
@@ -67,7 +68,7 @@ type DispatchKeyEventParams struct {
|
||||
IsKeypad bool `json:"isKeypad"` // Whether the event was generated from the keypad (default: false).
|
||||
IsSystemKey bool `json:"isSystemKey"` // Whether the event was a system key event (default: false).
|
||||
Location int64 `json:"location,omitempty"` // Whether the event was from the left or right side of the keyboard. 1=Left, 2=Right (default: 0).
|
||||
Commands []string `json:"commands,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/+/master:third_party/blink/renderer/core/editing/commands/editor_command_names.h for valid command names.
|
||||
Commands []string `json:"commands,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.
|
||||
}
|
||||
|
||||
// DispatchKeyEvent dispatches a key event to the page.
|
||||
@@ -75,7 +76,8 @@ type DispatchKeyEventParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-dispatchKeyEvent
|
||||
//
|
||||
// parameters:
|
||||
// type - Type of the key event.
|
||||
//
|
||||
// type - Type of the key event.
|
||||
func DispatchKeyEvent(typeVal KeyType) *DispatchKeyEventParams {
|
||||
return &DispatchKeyEventParams{
|
||||
Type: typeVal,
|
||||
@@ -174,7 +176,7 @@ func (p DispatchKeyEventParams) WithLocation(location int64) *DispatchKeyEventPa
|
||||
// WithCommands 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/+/master:third_party/blink/renderer/core/editing/commands/editor_command_names.h
|
||||
// https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/editing/commands/editor_command_names.h
|
||||
// for valid command names.
|
||||
func (p DispatchKeyEventParams) WithCommands(commands []string) *DispatchKeyEventParams {
|
||||
p.Commands = commands
|
||||
@@ -198,7 +200,8 @@ type InsertTextParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-insertText
|
||||
//
|
||||
// parameters:
|
||||
// text - The text to insert.
|
||||
//
|
||||
// text - The text to insert.
|
||||
func InsertText(text string) *InsertTextParams {
|
||||
return &InsertTextParams{
|
||||
Text: text,
|
||||
@@ -210,6 +213,53 @@ func (p *InsertTextParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandInsertText, p, nil)
|
||||
}
|
||||
|
||||
// ImeSetCompositionParams 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.
|
||||
type ImeSetCompositionParams struct {
|
||||
Text string `json:"text"` // The text to insert
|
||||
SelectionStart int64 `json:"selectionStart"` // selection start
|
||||
SelectionEnd int64 `json:"selectionEnd"` // selection end
|
||||
ReplacementStart int64 `json:"replacementStart,omitempty"` // replacement start
|
||||
ReplacementEnd int64 `json:"replacementEnd,omitempty"` // replacement end
|
||||
}
|
||||
|
||||
// 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.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-imeSetComposition
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// text - The text to insert
|
||||
// selectionStart - selection start
|
||||
// selectionEnd - selection end
|
||||
func ImeSetComposition(text string, selectionStart int64, selectionEnd int64) *ImeSetCompositionParams {
|
||||
return &ImeSetCompositionParams{
|
||||
Text: text,
|
||||
SelectionStart: selectionStart,
|
||||
SelectionEnd: selectionEnd,
|
||||
}
|
||||
}
|
||||
|
||||
// WithReplacementStart replacement start.
|
||||
func (p ImeSetCompositionParams) WithReplacementStart(replacementStart int64) *ImeSetCompositionParams {
|
||||
p.ReplacementStart = replacementStart
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithReplacementEnd replacement end.
|
||||
func (p ImeSetCompositionParams) WithReplacementEnd(replacementEnd int64) *ImeSetCompositionParams {
|
||||
p.ReplacementEnd = replacementEnd
|
||||
return &p
|
||||
}
|
||||
|
||||
// Do executes Input.imeSetComposition against the provided context.
|
||||
func (p *ImeSetCompositionParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandImeSetComposition, p, nil)
|
||||
}
|
||||
|
||||
// DispatchMouseEventParams dispatches a mouse event to the page.
|
||||
type DispatchMouseEventParams struct {
|
||||
Type MouseType `json:"type"` // Type of the mouse event.
|
||||
@@ -235,9 +285,10 @@ type DispatchMouseEventParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-dispatchMouseEvent
|
||||
//
|
||||
// parameters:
|
||||
// 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.
|
||||
//
|
||||
// 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.
|
||||
func DispatchMouseEvent(typeVal MouseType, x float64, y float64) *DispatchMouseEventParams {
|
||||
return &DispatchMouseEventParams{
|
||||
Type: typeVal,
|
||||
@@ -352,8 +403,9 @@ type DispatchTouchEventParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-dispatchTouchEvent
|
||||
//
|
||||
// parameters:
|
||||
// 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.
|
||||
//
|
||||
// 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.
|
||||
func DispatchTouchEvent(typeVal TouchType, touchPoints []*TouchPoint) *DispatchTouchEventParams {
|
||||
return &DispatchTouchEventParams{
|
||||
Type: typeVal,
|
||||
@@ -387,8 +439,8 @@ type EmulateTouchFromMouseEventParams struct {
|
||||
Y int64 `json:"y"` // Y coordinate of the mouse pointer in DIP.
|
||||
Button MouseButton `json:"button"` // Mouse button. Only "none", "left", "right" are supported.
|
||||
Timestamp *TimeSinceEpoch `json:"timestamp,omitempty"` // Time at which the event occurred (default: current time).
|
||||
DeltaX float64 `json:"deltaX,omitempty"` // X delta in DIP for mouse wheel event (default: 0).
|
||||
DeltaY float64 `json:"deltaY,omitempty"` // Y delta in DIP for mouse wheel event (default: 0).
|
||||
DeltaX float64 `json:"deltaX"` // X delta in DIP for mouse wheel event (default: 0).
|
||||
DeltaY float64 `json:"deltaY"` // Y delta in DIP for mouse wheel event (default: 0).
|
||||
Modifiers Modifier `json:"modifiers"` // Bit field representing pressed modifier keys. Alt=1, Ctrl=2, Meta/Command=4, Shift=8 (default: 0).
|
||||
ClickCount int64 `json:"clickCount,omitempty"` // Number of times the mouse button was clicked (default: 0).
|
||||
}
|
||||
@@ -399,10 +451,11 @@ type EmulateTouchFromMouseEventParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-emulateTouchFromMouseEvent
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// 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.
|
||||
func EmulateTouchFromMouseEvent(typeVal MouseType, x int64, y int64, button MouseButton) *EmulateTouchFromMouseEventParams {
|
||||
return &EmulateTouchFromMouseEventParams{
|
||||
Type: typeVal,
|
||||
@@ -459,7 +512,8 @@ type SetIgnoreInputEventsParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-setIgnoreInputEvents
|
||||
//
|
||||
// parameters:
|
||||
// ignore - Ignores input events processing when set to true.
|
||||
//
|
||||
// ignore - Ignores input events processing when set to true.
|
||||
func SetIgnoreInputEvents(ignore bool) *SetIgnoreInputEventsParams {
|
||||
return &SetIgnoreInputEventsParams{
|
||||
Ignore: ignore,
|
||||
@@ -485,7 +539,8 @@ type SetInterceptDragsParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-setInterceptDrags
|
||||
//
|
||||
// parameters:
|
||||
// enabled
|
||||
//
|
||||
// enabled
|
||||
func SetInterceptDrags(enabled bool) *SetInterceptDragsParams {
|
||||
return &SetInterceptDragsParams{
|
||||
Enabled: enabled,
|
||||
@@ -513,9 +568,10 @@ type SynthesizePinchGestureParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-synthesizePinchGesture
|
||||
//
|
||||
// parameters:
|
||||
// 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).
|
||||
//
|
||||
// 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).
|
||||
func SynthesizePinchGesture(x float64, y float64, scaleFactor float64) *SynthesizePinchGestureParams {
|
||||
return &SynthesizePinchGestureParams{
|
||||
X: x,
|
||||
@@ -566,8 +622,9 @@ type SynthesizeScrollGestureParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-synthesizeScrollGesture
|
||||
//
|
||||
// parameters:
|
||||
// x - X coordinate of the start of the gesture in CSS pixels.
|
||||
// y - Y coordinate of the start of the gesture in CSS pixels.
|
||||
//
|
||||
// x - X coordinate of the start of the gesture in CSS pixels.
|
||||
// y - Y coordinate of the start of the gesture in CSS pixels.
|
||||
func SynthesizeScrollGesture(x float64, y float64) *SynthesizeScrollGestureParams {
|
||||
return &SynthesizeScrollGestureParams{
|
||||
X: x,
|
||||
@@ -663,8 +720,9 @@ type SynthesizeTapGestureParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#method-synthesizeTapGesture
|
||||
//
|
||||
// parameters:
|
||||
// x - X coordinate of the start of the gesture in CSS pixels.
|
||||
// y - Y coordinate of the start of the gesture in CSS pixels.
|
||||
//
|
||||
// x - X coordinate of the start of the gesture in CSS pixels.
|
||||
// y - Y coordinate of the start of the gesture in CSS pixels.
|
||||
func SynthesizeTapGesture(x float64, y float64) *SynthesizeTapGestureParams {
|
||||
return &SynthesizeTapGestureParams{
|
||||
X: x,
|
||||
@@ -703,6 +761,7 @@ const (
|
||||
CommandDispatchDragEvent = "Input.dispatchDragEvent"
|
||||
CommandDispatchKeyEvent = "Input.dispatchKeyEvent"
|
||||
CommandInsertText = "Input.insertText"
|
||||
CommandImeSetComposition = "Input.imeSetComposition"
|
||||
CommandDispatchMouseEvent = "Input.dispatchMouseEvent"
|
||||
CommandDispatchTouchEvent = "Input.dispatchTouchEvent"
|
||||
CommandEmulateTouchFromMouseEvent = "Input.emulateTouchFromMouseEvent"
|
||||
|
||||
42
vendor/github.com/chromedp/cdproto/input/types.go
generated
vendored
42
vendor/github.com/chromedp/cdproto/input/types.go
generated
vendored
@@ -3,7 +3,6 @@ package input
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"strconv"
|
||||
"time"
|
||||
@@ -59,7 +58,8 @@ func (t GestureSourceType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *GestureSourceType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch GestureSourceType(in.String()) {
|
||||
v := in.String()
|
||||
switch GestureSourceType(v) {
|
||||
case GestureDefault:
|
||||
*t = GestureDefault
|
||||
case GestureTouch:
|
||||
@@ -68,7 +68,7 @@ func (t *GestureSourceType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = GestureMouse
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown GestureSourceType value"))
|
||||
in.AddError(fmt.Errorf("unknown GestureSourceType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,7 +109,8 @@ func (t MouseButton) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *MouseButton) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch MouseButton(in.String()) {
|
||||
v := in.String()
|
||||
switch MouseButton(v) {
|
||||
case None:
|
||||
*t = None
|
||||
case Left:
|
||||
@@ -124,7 +125,7 @@ func (t *MouseButton) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = Forward
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown MouseButton value"))
|
||||
in.AddError(fmt.Errorf("unknown MouseButton value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -181,6 +182,7 @@ type DragDataItem struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Input#type-DragData
|
||||
type DragData struct {
|
||||
Items []*DragDataItem `json:"items"`
|
||||
Files []string `json:"files,omitempty"` // List of filenames that should be included when dropping
|
||||
DragOperationsMask int64 `json:"dragOperationsMask"` // Bit field representing allowed drag operations. Copy = 1, Link = 2, Move = 16
|
||||
}
|
||||
|
||||
@@ -233,7 +235,8 @@ func (t Modifier) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *Modifier) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch Modifier(in.Int64()) {
|
||||
v := in.Int64()
|
||||
switch Modifier(v) {
|
||||
case ModifierNone:
|
||||
*t = ModifierNone
|
||||
case ModifierAlt:
|
||||
@@ -246,7 +249,7 @@ func (t *Modifier) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = ModifierShift
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown Modifier value"))
|
||||
in.AddError(fmt.Errorf("unknown Modifier value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -288,7 +291,8 @@ func (t DispatchDragEventType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *DispatchDragEventType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch DispatchDragEventType(in.String()) {
|
||||
v := in.String()
|
||||
switch DispatchDragEventType(v) {
|
||||
case DragEnter:
|
||||
*t = DragEnter
|
||||
case DragOver:
|
||||
@@ -299,7 +303,7 @@ func (t *DispatchDragEventType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = DragCancel
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown DispatchDragEventType value"))
|
||||
in.AddError(fmt.Errorf("unknown DispatchDragEventType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -338,7 +342,8 @@ func (t KeyType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *KeyType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch KeyType(in.String()) {
|
||||
v := in.String()
|
||||
switch KeyType(v) {
|
||||
case KeyDown:
|
||||
*t = KeyDown
|
||||
case KeyUp:
|
||||
@@ -349,7 +354,7 @@ func (t *KeyType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = KeyChar
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown KeyType value"))
|
||||
in.AddError(fmt.Errorf("unknown KeyType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -388,7 +393,8 @@ func (t MouseType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *MouseType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch MouseType(in.String()) {
|
||||
v := in.String()
|
||||
switch MouseType(v) {
|
||||
case MousePressed:
|
||||
*t = MousePressed
|
||||
case MouseReleased:
|
||||
@@ -399,7 +405,7 @@ func (t *MouseType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = MouseWheel
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown MouseType value"))
|
||||
in.AddError(fmt.Errorf("unknown MouseType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -436,14 +442,15 @@ func (t DispatchMouseEventPointerType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *DispatchMouseEventPointerType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch DispatchMouseEventPointerType(in.String()) {
|
||||
v := in.String()
|
||||
switch DispatchMouseEventPointerType(v) {
|
||||
case Mouse:
|
||||
*t = Mouse
|
||||
case Pen:
|
||||
*t = Pen
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown DispatchMouseEventPointerType value"))
|
||||
in.AddError(fmt.Errorf("unknown DispatchMouseEventPointerType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -484,7 +491,8 @@ func (t TouchType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *TouchType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch TouchType(in.String()) {
|
||||
v := in.String()
|
||||
switch TouchType(v) {
|
||||
case TouchStart:
|
||||
*t = TouchStart
|
||||
case TouchEnd:
|
||||
@@ -495,7 +503,7 @@ func (t *TouchType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = TouchCancel
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown TouchType value"))
|
||||
in.AddError(fmt.Errorf("unknown TouchType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
7
vendor/github.com/chromedp/cdproto/inspector/types.go
generated
vendored
7
vendor/github.com/chromedp/cdproto/inspector/types.go
generated
vendored
@@ -3,7 +3,7 @@ package inspector
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/mailru/easyjson"
|
||||
"github.com/mailru/easyjson/jlexer"
|
||||
@@ -40,7 +40,8 @@ func (t DetachReason) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *DetachReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch DetachReason(in.String()) {
|
||||
v := in.String()
|
||||
switch DetachReason(v) {
|
||||
case DetachReasonTargetClosed:
|
||||
*t = DetachReasonTargetClosed
|
||||
case DetachReasonCanceledByUser:
|
||||
@@ -51,7 +52,7 @@ func (t *DetachReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = DetachReasonRenderProcessGone
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown DetachReason value"))
|
||||
in.AddError(fmt.Errorf("unknown DetachReason value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
17
vendor/github.com/chromedp/cdproto/io/io.go
generated
vendored
17
vendor/github.com/chromedp/cdproto/io/io.go
generated
vendored
@@ -25,7 +25,8 @@ type CloseParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/IO#method-close
|
||||
//
|
||||
// parameters:
|
||||
// handle - Handle of the stream to close.
|
||||
//
|
||||
// handle - Handle of the stream to close.
|
||||
func Close(handle StreamHandle) *CloseParams {
|
||||
return &CloseParams{
|
||||
Handle: handle,
|
||||
@@ -49,7 +50,8 @@ type ReadParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/IO#method-read
|
||||
//
|
||||
// parameters:
|
||||
// handle - Handle of the stream to read.
|
||||
//
|
||||
// handle - Handle of the stream to read.
|
||||
func Read(handle StreamHandle) *ReadParams {
|
||||
return &ReadParams{
|
||||
Handle: handle,
|
||||
@@ -81,8 +83,9 @@ type ReadReturns struct {
|
||||
// Do executes IO.read against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// data - Data that were read.
|
||||
// eof - Set if the end-of-file condition occurred while reading.
|
||||
//
|
||||
// data - Data that were read.
|
||||
// eof - Set if the end-of-file condition occurred while reading.
|
||||
func (p *ReadParams) Do(ctx context.Context) (data string, eof bool, err error) {
|
||||
// execute
|
||||
var res ReadReturns
|
||||
@@ -105,7 +108,8 @@ type ResolveBlobParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/IO#method-resolveBlob
|
||||
//
|
||||
// parameters:
|
||||
// objectID - Object id of a Blob object wrapper.
|
||||
//
|
||||
// objectID - Object id of a Blob object wrapper.
|
||||
func ResolveBlob(objectID runtime.RemoteObjectID) *ResolveBlobParams {
|
||||
return &ResolveBlobParams{
|
||||
ObjectID: objectID,
|
||||
@@ -120,7 +124,8 @@ type ResolveBlobReturns struct {
|
||||
// Do executes IO.resolveBlob against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// uuid - UUID of the specified Blob.
|
||||
//
|
||||
// uuid - UUID of the specified Blob.
|
||||
func (p *ResolveBlobParams) Do(ctx context.Context) (uuid string, err error) {
|
||||
// execute
|
||||
var res ResolveBlobReturns
|
||||
|
||||
16
vendor/github.com/chromedp/cdproto/layertree/easyjson.go
generated
vendored
16
vendor/github.com/chromedp/cdproto/layertree/easyjson.go
generated
vendored
@@ -1796,22 +1796,22 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree19(in *jlexer.Lexer,
|
||||
case "compositingReasonIds":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
out.CompositingReasonIds = nil
|
||||
out.CompositingReasonIDs = nil
|
||||
} else {
|
||||
in.Delim('[')
|
||||
if out.CompositingReasonIds == nil {
|
||||
if out.CompositingReasonIDs == nil {
|
||||
if !in.IsDelim(']') {
|
||||
out.CompositingReasonIds = make([]string, 0, 4)
|
||||
out.CompositingReasonIDs = make([]string, 0, 4)
|
||||
} else {
|
||||
out.CompositingReasonIds = []string{}
|
||||
out.CompositingReasonIDs = []string{}
|
||||
}
|
||||
} else {
|
||||
out.CompositingReasonIds = (out.CompositingReasonIds)[:0]
|
||||
out.CompositingReasonIDs = (out.CompositingReasonIDs)[:0]
|
||||
}
|
||||
for !in.IsDelim(']') {
|
||||
var v22 string
|
||||
v22 = string(in.String())
|
||||
out.CompositingReasonIds = append(out.CompositingReasonIds, v22)
|
||||
out.CompositingReasonIDs = append(out.CompositingReasonIDs, v22)
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim(']')
|
||||
@@ -1830,13 +1830,13 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree19(out *jwriter.Writ
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
if len(in.CompositingReasonIds) != 0 {
|
||||
if len(in.CompositingReasonIDs) != 0 {
|
||||
const prefix string = ",\"compositingReasonIds\":"
|
||||
first = false
|
||||
out.RawString(prefix[1:])
|
||||
{
|
||||
out.RawByte('[')
|
||||
for v23, v24 := range in.CompositingReasonIds {
|
||||
for v23, v24 := range in.CompositingReasonIDs {
|
||||
if v23 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
|
||||
45
vendor/github.com/chromedp/cdproto/layertree/layertree.go
generated
vendored
45
vendor/github.com/chromedp/cdproto/layertree/layertree.go
generated
vendored
@@ -26,7 +26,8 @@ type CompositingReasonsParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/LayerTree#method-compositingReasons
|
||||
//
|
||||
// parameters:
|
||||
// layerID - The id of the layer for which we want to get the reasons it was composited.
|
||||
//
|
||||
// layerID - The id of the layer for which we want to get the reasons it was composited.
|
||||
func CompositingReasons(layerID LayerID) *CompositingReasonsParams {
|
||||
return &CompositingReasonsParams{
|
||||
LayerID: layerID,
|
||||
@@ -35,14 +36,15 @@ func CompositingReasons(layerID LayerID) *CompositingReasonsParams {
|
||||
|
||||
// CompositingReasonsReturns return values.
|
||||
type CompositingReasonsReturns struct {
|
||||
CompositingReasonIds []string `json:"compositingReasonIds,omitempty"` // A list of strings specifying reason IDs for the given layer to become composited.
|
||||
CompositingReasonIDs []string `json:"compositingReasonIds,omitempty"` // A list of strings specifying reason IDs for the given layer to become composited.
|
||||
}
|
||||
|
||||
// Do executes LayerTree.compositingReasons against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// compositingReasonIds - A list of strings specifying reason IDs for the given layer to become composited.
|
||||
func (p *CompositingReasonsParams) Do(ctx context.Context) (compositingReasonIds []string, err error) {
|
||||
//
|
||||
// compositingReasonIDs - A list of strings specifying reason IDs for the given layer to become composited.
|
||||
func (p *CompositingReasonsParams) Do(ctx context.Context) (compositingReasonIDs []string, err error) {
|
||||
// execute
|
||||
var res CompositingReasonsReturns
|
||||
err = cdp.Execute(ctx, CommandCompositingReasons, p, &res)
|
||||
@@ -50,7 +52,7 @@ func (p *CompositingReasonsParams) Do(ctx context.Context) (compositingReasonIds
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return res.CompositingReasonIds, nil
|
||||
return res.CompositingReasonIDs, nil
|
||||
}
|
||||
|
||||
// DisableParams disables compositing tree inspection.
|
||||
@@ -93,7 +95,8 @@ type LoadSnapshotParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/LayerTree#method-loadSnapshot
|
||||
//
|
||||
// parameters:
|
||||
// tiles - An array of tiles composing the snapshot.
|
||||
//
|
||||
// tiles - An array of tiles composing the snapshot.
|
||||
func LoadSnapshot(tiles []*PictureTile) *LoadSnapshotParams {
|
||||
return &LoadSnapshotParams{
|
||||
Tiles: tiles,
|
||||
@@ -108,7 +111,8 @@ type LoadSnapshotReturns struct {
|
||||
// Do executes LayerTree.loadSnapshot against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// snapshotID - The id of the snapshot.
|
||||
//
|
||||
// snapshotID - The id of the snapshot.
|
||||
func (p *LoadSnapshotParams) Do(ctx context.Context) (snapshotID SnapshotID, err error) {
|
||||
// execute
|
||||
var res LoadSnapshotReturns
|
||||
@@ -130,7 +134,8 @@ type MakeSnapshotParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/LayerTree#method-makeSnapshot
|
||||
//
|
||||
// parameters:
|
||||
// layerID - The id of the layer.
|
||||
//
|
||||
// layerID - The id of the layer.
|
||||
func MakeSnapshot(layerID LayerID) *MakeSnapshotParams {
|
||||
return &MakeSnapshotParams{
|
||||
LayerID: layerID,
|
||||
@@ -145,7 +150,8 @@ type MakeSnapshotReturns struct {
|
||||
// Do executes LayerTree.makeSnapshot against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// snapshotID - The id of the layer snapshot.
|
||||
//
|
||||
// snapshotID - The id of the layer snapshot.
|
||||
func (p *MakeSnapshotParams) Do(ctx context.Context) (snapshotID SnapshotID, err error) {
|
||||
// execute
|
||||
var res MakeSnapshotReturns
|
||||
@@ -170,7 +176,8 @@ type ProfileSnapshotParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/LayerTree#method-profileSnapshot
|
||||
//
|
||||
// parameters:
|
||||
// snapshotID - The id of the layer snapshot.
|
||||
//
|
||||
// snapshotID - The id of the layer snapshot.
|
||||
func ProfileSnapshot(snapshotID SnapshotID) *ProfileSnapshotParams {
|
||||
return &ProfileSnapshotParams{
|
||||
SnapshotID: snapshotID,
|
||||
@@ -204,7 +211,8 @@ type ProfileSnapshotReturns struct {
|
||||
// Do executes LayerTree.profileSnapshot against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// timings - The array of paint profiles, one per run.
|
||||
//
|
||||
// timings - The array of paint profiles, one per run.
|
||||
func (p *ProfileSnapshotParams) Do(ctx context.Context) (timings []PaintProfile, err error) {
|
||||
// execute
|
||||
var res ProfileSnapshotReturns
|
||||
@@ -226,7 +234,8 @@ type ReleaseSnapshotParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/LayerTree#method-releaseSnapshot
|
||||
//
|
||||
// parameters:
|
||||
// snapshotID - The id of the layer snapshot.
|
||||
//
|
||||
// snapshotID - The id of the layer snapshot.
|
||||
func ReleaseSnapshot(snapshotID SnapshotID) *ReleaseSnapshotParams {
|
||||
return &ReleaseSnapshotParams{
|
||||
SnapshotID: snapshotID,
|
||||
@@ -253,7 +262,8 @@ type ReplaySnapshotParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/LayerTree#method-replaySnapshot
|
||||
//
|
||||
// parameters:
|
||||
// snapshotID - The id of the layer snapshot.
|
||||
//
|
||||
// snapshotID - The id of the layer snapshot.
|
||||
func ReplaySnapshot(snapshotID SnapshotID) *ReplaySnapshotParams {
|
||||
return &ReplaySnapshotParams{
|
||||
SnapshotID: snapshotID,
|
||||
@@ -288,7 +298,8 @@ type ReplaySnapshotReturns struct {
|
||||
// Do executes LayerTree.replaySnapshot against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// dataURL - A data: URL for resulting image.
|
||||
//
|
||||
// dataURL - A data: URL for resulting image.
|
||||
func (p *ReplaySnapshotParams) Do(ctx context.Context) (dataURL string, err error) {
|
||||
// execute
|
||||
var res ReplaySnapshotReturns
|
||||
@@ -311,7 +322,8 @@ type SnapshotCommandLogParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/LayerTree#method-snapshotCommandLog
|
||||
//
|
||||
// parameters:
|
||||
// snapshotID - The id of the layer snapshot.
|
||||
//
|
||||
// snapshotID - The id of the layer snapshot.
|
||||
func SnapshotCommandLog(snapshotID SnapshotID) *SnapshotCommandLogParams {
|
||||
return &SnapshotCommandLogParams{
|
||||
SnapshotID: snapshotID,
|
||||
@@ -326,7 +338,8 @@ type SnapshotCommandLogReturns struct {
|
||||
// Do executes LayerTree.snapshotCommandLog against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// commandLog - The array of canvas function calls.
|
||||
//
|
||||
// commandLog - The array of canvas function calls.
|
||||
func (p *SnapshotCommandLogParams) Do(ctx context.Context) (commandLog []easyjson.RawMessage, err error) {
|
||||
// execute
|
||||
var res SnapshotCommandLogReturns
|
||||
|
||||
7
vendor/github.com/chromedp/cdproto/layertree/types.go
generated
vendored
7
vendor/github.com/chromedp/cdproto/layertree/types.go
generated
vendored
@@ -3,7 +3,7 @@ package layertree
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/chromedp/cdproto/cdp"
|
||||
"github.com/chromedp/cdproto/dom"
|
||||
@@ -116,7 +116,8 @@ func (t ScrollRectType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ScrollRectType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ScrollRectType(in.String()) {
|
||||
v := in.String()
|
||||
switch ScrollRectType(v) {
|
||||
case ScrollRectTypeRepaintsOnScroll:
|
||||
*t = ScrollRectTypeRepaintsOnScroll
|
||||
case ScrollRectTypeTouchEventHandler:
|
||||
@@ -125,7 +126,7 @@ func (t *ScrollRectType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = ScrollRectTypeWheelEventHandler
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ScrollRectType value"))
|
||||
in.AddError(fmt.Errorf("unknown ScrollRectType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
7
vendor/github.com/chromedp/cdproto/log/easyjson.go
generated
vendored
7
vendor/github.com/chromedp/cdproto/log/easyjson.go
generated
vendored
@@ -364,6 +364,8 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLog4(in *jlexer.Lexer, out *E
|
||||
(out.Level).UnmarshalEasyJSON(in)
|
||||
case "text":
|
||||
out.Text = string(in.String())
|
||||
case "category":
|
||||
(out.Category).UnmarshalEasyJSON(in)
|
||||
case "timestamp":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
@@ -452,6 +454,11 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLog4(out *jwriter.Writer, in
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.Text))
|
||||
}
|
||||
if in.Category != "" {
|
||||
const prefix string = ",\"category\":"
|
||||
out.RawString(prefix)
|
||||
(in.Category).MarshalEasyJSON(out)
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"timestamp\":"
|
||||
out.RawString(prefix)
|
||||
|
||||
3
vendor/github.com/chromedp/cdproto/log/log.go
generated
vendored
3
vendor/github.com/chromedp/cdproto/log/log.go
generated
vendored
@@ -73,7 +73,8 @@ type StartViolationsReportParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Log#method-startViolationsReport
|
||||
//
|
||||
// parameters:
|
||||
// config - Configuration for violations.
|
||||
//
|
||||
// config - Configuration for violations.
|
||||
func StartViolationsReport(config []*ViolationSetting) *StartViolationsReportParams {
|
||||
return &StartViolationsReportParams{
|
||||
Config: config,
|
||||
|
||||
66
vendor/github.com/chromedp/cdproto/log/types.go
generated
vendored
66
vendor/github.com/chromedp/cdproto/log/types.go
generated
vendored
@@ -3,7 +3,7 @@ package log
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/chromedp/cdproto/network"
|
||||
"github.com/chromedp/cdproto/runtime"
|
||||
@@ -16,9 +16,10 @@ import (
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Log#type-LogEntry
|
||||
type Entry struct {
|
||||
Source Source `json:"source"` // Log entry source.
|
||||
Level Level `json:"level"` // Log entry severity.
|
||||
Text string `json:"text"` // Logged text.
|
||||
Source Source `json:"source"` // Log entry source.
|
||||
Level Level `json:"level"` // Log entry severity.
|
||||
Text string `json:"text"` // Logged text.
|
||||
Category EntryCategory `json:"category,omitempty"`
|
||||
Timestamp *runtime.Timestamp `json:"timestamp"` // Timestamp when this entry was added.
|
||||
URL string `json:"url,omitempty"` // URL of the resource if known.
|
||||
LineNumber int64 `json:"lineNumber,omitempty"` // Line number in the resource.
|
||||
@@ -75,7 +76,8 @@ func (t Source) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *Source) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch Source(in.String()) {
|
||||
v := in.String()
|
||||
switch Source(v) {
|
||||
case SourceXML:
|
||||
*t = SourceXML
|
||||
case SourceJavascript:
|
||||
@@ -104,7 +106,7 @@ func (t *Source) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = SourceOther
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown Source value"))
|
||||
in.AddError(fmt.Errorf("unknown Source value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,7 +145,8 @@ func (t Level) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *Level) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch Level(in.String()) {
|
||||
v := in.String()
|
||||
switch Level(v) {
|
||||
case LevelVerbose:
|
||||
*t = LevelVerbose
|
||||
case LevelInfo:
|
||||
@@ -154,7 +157,7 @@ func (t *Level) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = LevelError
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown Level value"))
|
||||
in.AddError(fmt.Errorf("unknown Level value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -163,6 +166,48 @@ func (t *Level) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
// EntryCategory [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Log#type-LogEntry
|
||||
type EntryCategory string
|
||||
|
||||
// String returns the EntryCategory as string value.
|
||||
func (t EntryCategory) String() string {
|
||||
return string(t)
|
||||
}
|
||||
|
||||
// EntryCategory values.
|
||||
const (
|
||||
EntryCategoryCors EntryCategory = "cors"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
func (t EntryCategory) MarshalEasyJSON(out *jwriter.Writer) {
|
||||
out.String(string(t))
|
||||
}
|
||||
|
||||
// MarshalJSON satisfies json.Marshaler.
|
||||
func (t EntryCategory) MarshalJSON() ([]byte, error) {
|
||||
return easyjson.Marshal(t)
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *EntryCategory) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
v := in.String()
|
||||
switch EntryCategory(v) {
|
||||
case EntryCategoryCors:
|
||||
*t = EntryCategoryCors
|
||||
|
||||
default:
|
||||
in.AddError(fmt.Errorf("unknown EntryCategory value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
// UnmarshalJSON satisfies json.Unmarshaler.
|
||||
func (t *EntryCategory) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
// Violation violation type.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Log#type-ViolationSetting
|
||||
@@ -196,7 +241,8 @@ func (t Violation) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *Violation) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch Violation(in.String()) {
|
||||
v := in.String()
|
||||
switch Violation(v) {
|
||||
case ViolationLongTask:
|
||||
*t = ViolationLongTask
|
||||
case ViolationLongLayout:
|
||||
@@ -213,7 +259,7 @@ func (t *Violation) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = ViolationRecurringHandler
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown Violation value"))
|
||||
in.AddError(fmt.Errorf("unknown Violation value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
386
vendor/github.com/chromedp/cdproto/media/easyjson.go
generated
vendored
386
vendor/github.com/chromedp/cdproto/media/easyjson.go
generated
vendored
@@ -236,7 +236,7 @@ func (v *PlayerEvent) UnmarshalJSON(data []byte) error {
|
||||
func (v *PlayerEvent) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia2(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia3(in *jlexer.Lexer, out *PlayerError) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia3(in *jlexer.Lexer, out *PlayerErrorSourceLocation) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -255,10 +255,10 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia3(in *jlexer.Lexer, out
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case "type":
|
||||
(out.Type).UnmarshalEasyJSON(in)
|
||||
case "errorCode":
|
||||
out.ErrorCode = string(in.String())
|
||||
case "file":
|
||||
out.File = string(in.String())
|
||||
case "line":
|
||||
out.Line = int64(in.Int64())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
@@ -269,19 +269,201 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia3(in *jlexer.Lexer, out
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia3(out *jwriter.Writer, in PlayerError) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia3(out *jwriter.Writer, in PlayerErrorSourceLocation) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
const prefix string = ",\"type\":"
|
||||
const prefix string = ",\"file\":"
|
||||
out.RawString(prefix[1:])
|
||||
(in.Type).MarshalEasyJSON(out)
|
||||
out.String(string(in.File))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"errorCode\":"
|
||||
const prefix string = ",\"line\":"
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.ErrorCode))
|
||||
out.Int64(int64(in.Line))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v PlayerErrorSourceLocation) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia3(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v PlayerErrorSourceLocation) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia3(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *PlayerErrorSourceLocation) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia3(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *PlayerErrorSourceLocation) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia3(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia4(in *jlexer.Lexer, out *PlayerError) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case "errorType":
|
||||
out.ErrorType = string(in.String())
|
||||
case "code":
|
||||
out.Code = int64(in.Int64())
|
||||
case "stack":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
out.Stack = nil
|
||||
} else {
|
||||
in.Delim('[')
|
||||
if out.Stack == nil {
|
||||
if !in.IsDelim(']') {
|
||||
out.Stack = make([]*PlayerErrorSourceLocation, 0, 8)
|
||||
} else {
|
||||
out.Stack = []*PlayerErrorSourceLocation{}
|
||||
}
|
||||
} else {
|
||||
out.Stack = (out.Stack)[:0]
|
||||
}
|
||||
for !in.IsDelim(']') {
|
||||
var v1 *PlayerErrorSourceLocation
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
v1 = nil
|
||||
} else {
|
||||
if v1 == nil {
|
||||
v1 = new(PlayerErrorSourceLocation)
|
||||
}
|
||||
(*v1).UnmarshalEasyJSON(in)
|
||||
}
|
||||
out.Stack = append(out.Stack, v1)
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim(']')
|
||||
}
|
||||
case "cause":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
out.Cause = nil
|
||||
} else {
|
||||
in.Delim('[')
|
||||
if out.Cause == nil {
|
||||
if !in.IsDelim(']') {
|
||||
out.Cause = make([]*PlayerError, 0, 8)
|
||||
} else {
|
||||
out.Cause = []*PlayerError{}
|
||||
}
|
||||
} else {
|
||||
out.Cause = (out.Cause)[:0]
|
||||
}
|
||||
for !in.IsDelim(']') {
|
||||
var v2 *PlayerError
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
v2 = nil
|
||||
} else {
|
||||
if v2 == nil {
|
||||
v2 = new(PlayerError)
|
||||
}
|
||||
(*v2).UnmarshalEasyJSON(in)
|
||||
}
|
||||
out.Cause = append(out.Cause, v2)
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim(']')
|
||||
}
|
||||
case "data":
|
||||
(out.Data).UnmarshalEasyJSON(in)
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia4(out *jwriter.Writer, in PlayerError) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
const prefix string = ",\"errorType\":"
|
||||
out.RawString(prefix[1:])
|
||||
out.String(string(in.ErrorType))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"code\":"
|
||||
out.RawString(prefix)
|
||||
out.Int64(int64(in.Code))
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"stack\":"
|
||||
out.RawString(prefix)
|
||||
if in.Stack == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v3, v4 := range in.Stack {
|
||||
if v3 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v4 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v4).MarshalEasyJSON(out)
|
||||
}
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"cause\":"
|
||||
out.RawString(prefix)
|
||||
if in.Cause == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v5, v6 := range in.Cause {
|
||||
if v5 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v6 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v6).MarshalEasyJSON(out)
|
||||
}
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"data\":"
|
||||
out.RawString(prefix)
|
||||
(in.Data).MarshalEasyJSON(out)
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
@@ -289,27 +471,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia3(out *jwriter.Writer, i
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v PlayerError) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia3(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia4(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v PlayerError) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia3(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia4(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *PlayerError) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia3(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia4(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *PlayerError) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia3(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia4(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia4(in *jlexer.Lexer, out *EventPlayersCreated) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia5(in *jlexer.Lexer, out *EventPlayersCreated) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -344,9 +526,9 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia4(in *jlexer.Lexer, out
|
||||
out.Players = (out.Players)[:0]
|
||||
}
|
||||
for !in.IsDelim(']') {
|
||||
var v1 PlayerID
|
||||
v1 = PlayerID(in.String())
|
||||
out.Players = append(out.Players, v1)
|
||||
var v7 PlayerID
|
||||
v7 = PlayerID(in.String())
|
||||
out.Players = append(out.Players, v7)
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim(']')
|
||||
@@ -361,7 +543,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia4(in *jlexer.Lexer, out
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia4(out *jwriter.Writer, in EventPlayersCreated) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia5(out *jwriter.Writer, in EventPlayersCreated) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -372,11 +554,11 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia4(out *jwriter.Writer, i
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v2, v3 := range in.Players {
|
||||
if v2 > 0 {
|
||||
for v8, v9 := range in.Players {
|
||||
if v8 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
out.String(string(v3))
|
||||
out.String(string(v9))
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
@@ -387,27 +569,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia4(out *jwriter.Writer, i
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v EventPlayersCreated) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia4(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia5(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v EventPlayersCreated) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia4(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia5(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *EventPlayersCreated) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia4(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia5(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *EventPlayersCreated) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia4(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia5(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia5(in *jlexer.Lexer, out *EventPlayerPropertiesChanged) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia6(in *jlexer.Lexer, out *EventPlayerPropertiesChanged) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -444,17 +626,17 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia5(in *jlexer.Lexer, out
|
||||
out.Properties = (out.Properties)[:0]
|
||||
}
|
||||
for !in.IsDelim(']') {
|
||||
var v4 *PlayerProperty
|
||||
var v10 *PlayerProperty
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
v4 = nil
|
||||
v10 = nil
|
||||
} else {
|
||||
if v4 == nil {
|
||||
v4 = new(PlayerProperty)
|
||||
if v10 == nil {
|
||||
v10 = new(PlayerProperty)
|
||||
}
|
||||
(*v4).UnmarshalEasyJSON(in)
|
||||
(*v10).UnmarshalEasyJSON(in)
|
||||
}
|
||||
out.Properties = append(out.Properties, v4)
|
||||
out.Properties = append(out.Properties, v10)
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim(']')
|
||||
@@ -469,7 +651,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia5(in *jlexer.Lexer, out
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia5(out *jwriter.Writer, in EventPlayerPropertiesChanged) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia6(out *jwriter.Writer, in EventPlayerPropertiesChanged) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -485,14 +667,14 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia5(out *jwriter.Writer, i
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v5, v6 := range in.Properties {
|
||||
if v5 > 0 {
|
||||
for v11, v12 := range in.Properties {
|
||||
if v11 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v6 == nil {
|
||||
if v12 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v6).MarshalEasyJSON(out)
|
||||
(*v12).MarshalEasyJSON(out)
|
||||
}
|
||||
}
|
||||
out.RawByte(']')
|
||||
@@ -504,27 +686,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia5(out *jwriter.Writer, i
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v EventPlayerPropertiesChanged) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia5(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia6(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v EventPlayerPropertiesChanged) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia5(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia6(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *EventPlayerPropertiesChanged) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia5(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia6(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *EventPlayerPropertiesChanged) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia5(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia6(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia6(in *jlexer.Lexer, out *EventPlayerMessagesLogged) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia7(in *jlexer.Lexer, out *EventPlayerMessagesLogged) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -561,17 +743,17 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia6(in *jlexer.Lexer, out
|
||||
out.Messages = (out.Messages)[:0]
|
||||
}
|
||||
for !in.IsDelim(']') {
|
||||
var v7 *PlayerMessage
|
||||
var v13 *PlayerMessage
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
v7 = nil
|
||||
v13 = nil
|
||||
} else {
|
||||
if v7 == nil {
|
||||
v7 = new(PlayerMessage)
|
||||
if v13 == nil {
|
||||
v13 = new(PlayerMessage)
|
||||
}
|
||||
(*v7).UnmarshalEasyJSON(in)
|
||||
(*v13).UnmarshalEasyJSON(in)
|
||||
}
|
||||
out.Messages = append(out.Messages, v7)
|
||||
out.Messages = append(out.Messages, v13)
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim(']')
|
||||
@@ -586,7 +768,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia6(in *jlexer.Lexer, out
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia6(out *jwriter.Writer, in EventPlayerMessagesLogged) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia7(out *jwriter.Writer, in EventPlayerMessagesLogged) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -602,14 +784,14 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia6(out *jwriter.Writer, i
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v8, v9 := range in.Messages {
|
||||
if v8 > 0 {
|
||||
for v14, v15 := range in.Messages {
|
||||
if v14 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v9 == nil {
|
||||
if v15 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v9).MarshalEasyJSON(out)
|
||||
(*v15).MarshalEasyJSON(out)
|
||||
}
|
||||
}
|
||||
out.RawByte(']')
|
||||
@@ -621,27 +803,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia6(out *jwriter.Writer, i
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v EventPlayerMessagesLogged) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia6(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia7(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v EventPlayerMessagesLogged) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia6(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia7(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *EventPlayerMessagesLogged) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia6(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia7(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *EventPlayerMessagesLogged) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia6(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia7(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia7(in *jlexer.Lexer, out *EventPlayerEventsAdded) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia8(in *jlexer.Lexer, out *EventPlayerEventsAdded) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -678,17 +860,17 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia7(in *jlexer.Lexer, out
|
||||
out.Events = (out.Events)[:0]
|
||||
}
|
||||
for !in.IsDelim(']') {
|
||||
var v10 *PlayerEvent
|
||||
var v16 *PlayerEvent
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
v10 = nil
|
||||
v16 = nil
|
||||
} else {
|
||||
if v10 == nil {
|
||||
v10 = new(PlayerEvent)
|
||||
if v16 == nil {
|
||||
v16 = new(PlayerEvent)
|
||||
}
|
||||
(*v10).UnmarshalEasyJSON(in)
|
||||
(*v16).UnmarshalEasyJSON(in)
|
||||
}
|
||||
out.Events = append(out.Events, v10)
|
||||
out.Events = append(out.Events, v16)
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim(']')
|
||||
@@ -703,7 +885,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia7(in *jlexer.Lexer, out
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia7(out *jwriter.Writer, in EventPlayerEventsAdded) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia8(out *jwriter.Writer, in EventPlayerEventsAdded) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -719,14 +901,14 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia7(out *jwriter.Writer, i
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v11, v12 := range in.Events {
|
||||
if v11 > 0 {
|
||||
for v17, v18 := range in.Events {
|
||||
if v17 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v12 == nil {
|
||||
if v18 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v12).MarshalEasyJSON(out)
|
||||
(*v18).MarshalEasyJSON(out)
|
||||
}
|
||||
}
|
||||
out.RawByte(']')
|
||||
@@ -738,27 +920,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia7(out *jwriter.Writer, i
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v EventPlayerEventsAdded) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia7(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia8(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v EventPlayerEventsAdded) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia7(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia8(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *EventPlayerEventsAdded) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia7(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia8(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *EventPlayerEventsAdded) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia7(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia8(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia8(in *jlexer.Lexer, out *EventPlayerErrorsRaised) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia9(in *jlexer.Lexer, out *EventPlayerErrorsRaised) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -795,17 +977,17 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia8(in *jlexer.Lexer, out
|
||||
out.Errors = (out.Errors)[:0]
|
||||
}
|
||||
for !in.IsDelim(']') {
|
||||
var v13 *PlayerError
|
||||
var v19 *PlayerError
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
v13 = nil
|
||||
v19 = nil
|
||||
} else {
|
||||
if v13 == nil {
|
||||
v13 = new(PlayerError)
|
||||
if v19 == nil {
|
||||
v19 = new(PlayerError)
|
||||
}
|
||||
(*v13).UnmarshalEasyJSON(in)
|
||||
(*v19).UnmarshalEasyJSON(in)
|
||||
}
|
||||
out.Errors = append(out.Errors, v13)
|
||||
out.Errors = append(out.Errors, v19)
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim(']')
|
||||
@@ -820,7 +1002,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia8(in *jlexer.Lexer, out
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia8(out *jwriter.Writer, in EventPlayerErrorsRaised) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia9(out *jwriter.Writer, in EventPlayerErrorsRaised) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -836,14 +1018,14 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia8(out *jwriter.Writer, i
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v14, v15 := range in.Errors {
|
||||
if v14 > 0 {
|
||||
for v20, v21 := range in.Errors {
|
||||
if v20 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v15 == nil {
|
||||
if v21 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v15).MarshalEasyJSON(out)
|
||||
(*v21).MarshalEasyJSON(out)
|
||||
}
|
||||
}
|
||||
out.RawByte(']')
|
||||
@@ -855,27 +1037,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia8(out *jwriter.Writer, i
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v EventPlayerErrorsRaised) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia8(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia9(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v EventPlayerErrorsRaised) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia8(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia9(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *EventPlayerErrorsRaised) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia8(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia9(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *EventPlayerErrorsRaised) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia8(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia9(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia9(in *jlexer.Lexer, out *EnableParams) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia10(in *jlexer.Lexer, out *EnableParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -904,7 +1086,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia9(in *jlexer.Lexer, out
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia9(out *jwriter.Writer, in EnableParams) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia10(out *jwriter.Writer, in EnableParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -914,27 +1096,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia9(out *jwriter.Writer, i
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v EnableParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia9(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia10(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia9(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia10(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *EnableParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia9(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia10(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia9(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia10(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia10(in *jlexer.Lexer, out *DisableParams) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia11(in *jlexer.Lexer, out *DisableParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -963,7 +1145,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia10(in *jlexer.Lexer, out
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia10(out *jwriter.Writer, in DisableParams) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia11(out *jwriter.Writer, in DisableParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -973,23 +1155,23 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia10(out *jwriter.Writer,
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v DisableParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia10(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia11(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia10(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia11(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *DisableParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia10(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia11(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia10(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia11(l, v)
|
||||
}
|
||||
|
||||
68
vendor/github.com/chromedp/cdproto/media/types.go
generated
vendored
68
vendor/github.com/chromedp/cdproto/media/types.go
generated
vendored
@@ -3,7 +3,7 @@ package media
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/mailru/easyjson"
|
||||
"github.com/mailru/easyjson/jlexer"
|
||||
@@ -55,12 +55,25 @@ type PlayerEvent struct {
|
||||
Value string `json:"value"`
|
||||
}
|
||||
|
||||
// PlayerErrorSourceLocation represents logged source line numbers reported
|
||||
// in an error. NOTE: file and line are from chromium c++ implementation code,
|
||||
// not js.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Media#type-PlayerErrorSourceLocation
|
||||
type PlayerErrorSourceLocation struct {
|
||||
File string `json:"file"`
|
||||
Line int64 `json:"line"`
|
||||
}
|
||||
|
||||
// PlayerError corresponds to kMediaError.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Media#type-PlayerError
|
||||
type PlayerError struct {
|
||||
Type PlayerErrorType `json:"type"`
|
||||
ErrorCode string `json:"errorCode"` // When this switches to using media::Status instead of PipelineStatus we can remove "errorCode" and replace it with the fields from a Status instance. This also seems like a duplicate of the error level enum - there is a todo bug to have that level removed and use this instead. (crbug.com/1068454)
|
||||
ErrorType string `json:"errorType"`
|
||||
Code int64 `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 []*PlayerErrorSourceLocation `json:"stack"` // A trace of where this error was caused / where it passed through.
|
||||
Cause []*PlayerError `json:"cause"` // Errors potentially have a root cause error, ie, a DecoderError might be caused by an WindowsError
|
||||
Data easyjson.RawMessage `json:"data"`
|
||||
}
|
||||
|
||||
// PlayerMessageLevel keep in sync with MediaLogMessageLevel We are currently
|
||||
@@ -100,7 +113,8 @@ func (t PlayerMessageLevel) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *PlayerMessageLevel) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch PlayerMessageLevel(in.String()) {
|
||||
v := in.String()
|
||||
switch PlayerMessageLevel(v) {
|
||||
case PlayerMessageLevelError:
|
||||
*t = PlayerMessageLevelError
|
||||
case PlayerMessageLevelWarning:
|
||||
@@ -111,7 +125,7 @@ func (t *PlayerMessageLevel) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = PlayerMessageLevelDebug
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown PlayerMessageLevel value"))
|
||||
in.AddError(fmt.Errorf("unknown PlayerMessageLevel value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,47 +133,3 @@ func (t *PlayerMessageLevel) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
func (t *PlayerMessageLevel) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
// PlayerErrorType [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Media#type-PlayerError
|
||||
type PlayerErrorType string
|
||||
|
||||
// String returns the PlayerErrorType as string value.
|
||||
func (t PlayerErrorType) String() string {
|
||||
return string(t)
|
||||
}
|
||||
|
||||
// PlayerErrorType values.
|
||||
const (
|
||||
PlayerErrorTypePipelineError PlayerErrorType = "pipeline_error"
|
||||
PlayerErrorTypeMediaError PlayerErrorType = "media_error"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
func (t PlayerErrorType) MarshalEasyJSON(out *jwriter.Writer) {
|
||||
out.String(string(t))
|
||||
}
|
||||
|
||||
// MarshalJSON satisfies json.Marshaler.
|
||||
func (t PlayerErrorType) MarshalJSON() ([]byte, error) {
|
||||
return easyjson.Marshal(t)
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *PlayerErrorType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch PlayerErrorType(in.String()) {
|
||||
case PlayerErrorTypePipelineError:
|
||||
*t = PlayerErrorTypePipelineError
|
||||
case PlayerErrorTypeMediaError:
|
||||
*t = PlayerErrorTypeMediaError
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown PlayerErrorType value"))
|
||||
}
|
||||
}
|
||||
|
||||
// UnmarshalJSON satisfies json.Unmarshaler.
|
||||
func (t *PlayerErrorType) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
22
vendor/github.com/chromedp/cdproto/memory/memory.go
generated
vendored
22
vendor/github.com/chromedp/cdproto/memory/memory.go
generated
vendored
@@ -32,9 +32,10 @@ type GetDOMCountersReturns struct {
|
||||
// Do executes Memory.getDOMCounters against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// documents
|
||||
// nodes
|
||||
// jsEventListeners
|
||||
//
|
||||
// documents
|
||||
// nodes
|
||||
// jsEventListeners
|
||||
func (p *GetDOMCountersParams) Do(ctx context.Context) (documents int64, nodes int64, jsEventListeners int64, err error) {
|
||||
// execute
|
||||
var res GetDOMCountersReturns
|
||||
@@ -90,7 +91,8 @@ type SetPressureNotificationsSuppressedParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Memory#method-setPressureNotificationsSuppressed
|
||||
//
|
||||
// parameters:
|
||||
// suppressed - If true, memory pressure notifications will be suppressed.
|
||||
//
|
||||
// suppressed - If true, memory pressure notifications will be suppressed.
|
||||
func SetPressureNotificationsSuppressed(suppressed bool) *SetPressureNotificationsSuppressedParams {
|
||||
return &SetPressureNotificationsSuppressedParams{
|
||||
Suppressed: suppressed,
|
||||
@@ -114,7 +116,8 @@ type SimulatePressureNotificationParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Memory#method-simulatePressureNotification
|
||||
//
|
||||
// parameters:
|
||||
// level - Memory pressure level of the notification.
|
||||
//
|
||||
// level - Memory pressure level of the notification.
|
||||
func SimulatePressureNotification(level PressureLevel) *SimulatePressureNotificationParams {
|
||||
return &SimulatePressureNotificationParams{
|
||||
Level: level,
|
||||
@@ -193,7 +196,8 @@ type GetAllTimeSamplingProfileReturns struct {
|
||||
// Do executes Memory.getAllTimeSamplingProfile against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// profile
|
||||
//
|
||||
// profile
|
||||
func (p *GetAllTimeSamplingProfileParams) Do(ctx context.Context) (profile *SamplingProfile, err error) {
|
||||
// execute
|
||||
var res GetAllTimeSamplingProfileReturns
|
||||
@@ -225,7 +229,8 @@ type GetBrowserSamplingProfileReturns struct {
|
||||
// Do executes Memory.getBrowserSamplingProfile against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// profile
|
||||
//
|
||||
// profile
|
||||
func (p *GetBrowserSamplingProfileParams) Do(ctx context.Context) (profile *SamplingProfile, err error) {
|
||||
// execute
|
||||
var res GetBrowserSamplingProfileReturns
|
||||
@@ -257,7 +262,8 @@ type GetSamplingProfileReturns struct {
|
||||
// Do executes Memory.getSamplingProfile against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// profile
|
||||
//
|
||||
// profile
|
||||
func (p *GetSamplingProfileParams) Do(ctx context.Context) (profile *SamplingProfile, err error) {
|
||||
// execute
|
||||
var res GetSamplingProfileReturns
|
||||
|
||||
7
vendor/github.com/chromedp/cdproto/memory/types.go
generated
vendored
7
vendor/github.com/chromedp/cdproto/memory/types.go
generated
vendored
@@ -3,7 +3,7 @@ package memory
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/mailru/easyjson"
|
||||
"github.com/mailru/easyjson/jlexer"
|
||||
@@ -38,14 +38,15 @@ func (t PressureLevel) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *PressureLevel) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch PressureLevel(in.String()) {
|
||||
v := in.String()
|
||||
switch PressureLevel(v) {
|
||||
case PressureLevelModerate:
|
||||
*t = PressureLevelModerate
|
||||
case PressureLevelCritical:
|
||||
*t = PressureLevelCritical
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown PressureLevel value"))
|
||||
in.AddError(fmt.Errorf("unknown PressureLevel value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
1552
vendor/github.com/chromedp/cdproto/network/easyjson.go
generated
vendored
1552
vendor/github.com/chromedp/cdproto/network/easyjson.go
generated
vendored
File diff suppressed because it is too large
Load Diff
61
vendor/github.com/chromedp/cdproto/network/events.go
generated
vendored
61
vendor/github.com/chromedp/cdproto/network/events.go
generated
vendored
@@ -62,17 +62,18 @@ type EventRequestServedFromCache struct {
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#event-requestWillBeSent
|
||||
type EventRequestWillBeSent struct {
|
||||
RequestID RequestID `json:"requestId"` // Request identifier.
|
||||
LoaderID cdp.LoaderID `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 *Request `json:"request"` // Request data.
|
||||
Timestamp *cdp.MonotonicTime `json:"timestamp"` // Timestamp.
|
||||
WallTime *cdp.TimeSinceEpoch `json:"wallTime"` // Timestamp.
|
||||
Initiator *Initiator `json:"initiator"` // Request initiator.
|
||||
RedirectResponse *Response `json:"redirectResponse,omitempty"` // Redirect response data.
|
||||
Type ResourceType `json:"type,omitempty"` // Type of this resource.
|
||||
FrameID cdp.FrameID `json:"frameId,omitempty"` // Frame identifier.
|
||||
HasUserGesture bool `json:"hasUserGesture,omitempty"` // Whether the request is initiated by a user gesture. Defaults to false.
|
||||
RequestID RequestID `json:"requestId"` // Request identifier.
|
||||
LoaderID cdp.LoaderID `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 *Request `json:"request"` // Request data.
|
||||
Timestamp *cdp.MonotonicTime `json:"timestamp"` // Timestamp.
|
||||
WallTime *cdp.TimeSinceEpoch `json:"wallTime"` // Timestamp.
|
||||
Initiator *Initiator `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 *Response `json:"redirectResponse,omitempty"` // Redirect response data.
|
||||
Type ResourceType `json:"type,omitempty"` // Type of this resource.
|
||||
FrameID cdp.FrameID `json:"frameId,omitempty"` // Frame identifier.
|
||||
HasUserGesture bool `json:"hasUserGesture,omitempty"` // Whether the request is initiated by a user gesture. Defaults to false.
|
||||
}
|
||||
|
||||
// EventResourceChangedPriority fired when resource loading priority is
|
||||
@@ -98,12 +99,13 @@ type EventSignedExchangeReceived struct {
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#event-responseReceived
|
||||
type EventResponseReceived struct {
|
||||
RequestID RequestID `json:"requestId"` // Request identifier.
|
||||
LoaderID cdp.LoaderID `json:"loaderId"` // Loader identifier. Empty string if the request is fetched from worker.
|
||||
Timestamp *cdp.MonotonicTime `json:"timestamp"` // Timestamp.
|
||||
Type ResourceType `json:"type"` // Resource type.
|
||||
Response *Response `json:"response"` // Response data.
|
||||
FrameID cdp.FrameID `json:"frameId,omitempty"` // Frame identifier.
|
||||
RequestID RequestID `json:"requestId"` // Request identifier.
|
||||
LoaderID cdp.LoaderID `json:"loaderId"` // Loader identifier. Empty string if the request is fetched from worker.
|
||||
Timestamp *cdp.MonotonicTime `json:"timestamp"` // Timestamp.
|
||||
Type ResourceType `json:"type"` // Resource type.
|
||||
Response *Response `json:"response"` // Response data.
|
||||
HasExtraInfo bool `json:"hasExtraInfo"` // Indicates whether requestWillBeSentExtraInfo and responseReceivedExtraInfo events will be or were emitted for this request.
|
||||
FrameID cdp.FrameID `json:"frameId,omitempty"` // Frame identifier.
|
||||
}
|
||||
|
||||
// EventWebSocketClosed fired when WebSocket is closed.
|
||||
@@ -209,6 +211,7 @@ type EventRequestWillBeSentExtraInfo struct {
|
||||
RequestID RequestID `json:"requestId"` // Request identifier. Used to match this information to an existing requestWillBeSent event.
|
||||
AssociatedCookies []*BlockedCookieWithReason `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 Headers `json:"headers"` // Raw request headers as they will be sent over the wire.
|
||||
ConnectTiming *ConnectTiming `json:"connectTiming"` // Connection timing information for the request.
|
||||
ClientSecurityState *ClientSecurityState `json:"clientSecurityState,omitempty"` // The client security state set for the request.
|
||||
}
|
||||
|
||||
@@ -224,6 +227,7 @@ type EventResponseReceivedExtraInfo struct {
|
||||
BlockedCookies []*BlockedSetCookieWithReason `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 Headers `json:"headers"` // Raw response headers as they were received over the wire.
|
||||
ResourceIPAddressSpace IPAddressSpace `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.
|
||||
StatusCode int64 `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.
|
||||
}
|
||||
|
||||
@@ -282,3 +286,26 @@ type EventSubresourceWebBundleInnerResponseError struct {
|
||||
ErrorMessage string `json:"errorMessage"` // Error message
|
||||
BundleRequestID RequestID `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.
|
||||
}
|
||||
|
||||
// EventReportingAPIReportAdded is sent whenever a new report is added. And
|
||||
// after 'enableReportingApi' for all existing reports.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#event-reportingApiReportAdded
|
||||
type EventReportingAPIReportAdded struct {
|
||||
Report *ReportingAPIReport `json:"report"`
|
||||
}
|
||||
|
||||
// EventReportingAPIReportUpdated [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#event-reportingApiReportUpdated
|
||||
type EventReportingAPIReportUpdated struct {
|
||||
Report *ReportingAPIReport `json:"report"`
|
||||
}
|
||||
|
||||
// EventReportingAPIEndpointsChangedForOrigin [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#event-reportingApiEndpointsChangedForOrigin
|
||||
type EventReportingAPIEndpointsChangedForOrigin struct {
|
||||
Origin string `json:"origin"` // Origin of the document(s) which configured the endpoints.
|
||||
Endpoints []*ReportingAPIEndpoint `json:"endpoints"`
|
||||
}
|
||||
|
||||
150
vendor/github.com/chromedp/cdproto/network/network.go
generated
vendored
150
vendor/github.com/chromedp/cdproto/network/network.go
generated
vendored
@@ -31,7 +31,8 @@ type SetAcceptedEncodingsParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-setAcceptedEncodings
|
||||
//
|
||||
// parameters:
|
||||
// encodings - List of accepted content encodings.
|
||||
//
|
||||
// encodings - List of accepted content encodings.
|
||||
func SetAcceptedEncodings(encodings []ContentEncoding) *SetAcceptedEncodingsParams {
|
||||
return &SetAcceptedEncodingsParams{
|
||||
Encodings: encodings,
|
||||
@@ -105,7 +106,8 @@ type DeleteCookiesParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-deleteCookies
|
||||
//
|
||||
// parameters:
|
||||
// name - Name of the cookies to remove.
|
||||
//
|
||||
// name - Name of the cookies to remove.
|
||||
func DeleteCookies(name string) *DeleteCookiesParams {
|
||||
return &DeleteCookiesParams{
|
||||
Name: name,
|
||||
@@ -167,10 +169,11 @@ type EmulateNetworkConditionsParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-emulateNetworkConditions
|
||||
//
|
||||
// parameters:
|
||||
// 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.
|
||||
//
|
||||
// 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.
|
||||
func EmulateNetworkConditions(offline bool, latency float64, downloadThroughput float64, uploadThroughput float64) *EmulateNetworkConditionsParams {
|
||||
return &EmulateNetworkConditionsParams{
|
||||
Offline: offline,
|
||||
@@ -255,7 +258,8 @@ type GetAllCookiesReturns struct {
|
||||
// Do executes Network.getAllCookies against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// cookies - Array of cookie objects.
|
||||
//
|
||||
// cookies - Array of cookie objects.
|
||||
func (p *GetAllCookiesParams) Do(ctx context.Context) (cookies []*Cookie, err error) {
|
||||
// execute
|
||||
var res GetAllCookiesReturns
|
||||
@@ -277,7 +281,8 @@ type GetCertificateParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-getCertificate
|
||||
//
|
||||
// parameters:
|
||||
// origin - Origin to get certificate for.
|
||||
//
|
||||
// origin - Origin to get certificate for.
|
||||
func GetCertificate(origin string) *GetCertificateParams {
|
||||
return &GetCertificateParams{
|
||||
Origin: origin,
|
||||
@@ -292,7 +297,8 @@ type GetCertificateReturns struct {
|
||||
// Do executes Network.getCertificate against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// tableNames
|
||||
//
|
||||
// tableNames
|
||||
func (p *GetCertificateParams) Do(ctx context.Context) (tableNames []string, err error) {
|
||||
// execute
|
||||
var res GetCertificateReturns
|
||||
@@ -338,7 +344,8 @@ type GetCookiesReturns struct {
|
||||
// Do executes Network.getCookies against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// cookies - Array of cookie objects.
|
||||
//
|
||||
// cookies - Array of cookie objects.
|
||||
func (p *GetCookiesParams) Do(ctx context.Context) (cookies []*Cookie, err error) {
|
||||
// execute
|
||||
var res GetCookiesReturns
|
||||
@@ -360,7 +367,8 @@ type GetResponseBodyParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-getResponseBody
|
||||
//
|
||||
// parameters:
|
||||
// requestID - Identifier of the network request to get content for.
|
||||
//
|
||||
// requestID - Identifier of the network request to get content for.
|
||||
func GetResponseBody(requestID RequestID) *GetResponseBodyParams {
|
||||
return &GetResponseBodyParams{
|
||||
RequestID: requestID,
|
||||
@@ -376,7 +384,8 @@ type GetResponseBodyReturns struct {
|
||||
// Do executes Network.getResponseBody against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// body - Response body.
|
||||
//
|
||||
// body - Response body.
|
||||
func (p *GetResponseBodyParams) Do(ctx context.Context) (body []byte, err error) {
|
||||
// execute
|
||||
var res GetResponseBodyReturns
|
||||
@@ -410,7 +419,8 @@ type GetRequestPostDataParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-getRequestPostData
|
||||
//
|
||||
// parameters:
|
||||
// requestID - Identifier of the network request to get content for.
|
||||
//
|
||||
// requestID - Identifier of the network request to get content for.
|
||||
func GetRequestPostData(requestID RequestID) *GetRequestPostDataParams {
|
||||
return &GetRequestPostDataParams{
|
||||
RequestID: requestID,
|
||||
@@ -425,7 +435,8 @@ type GetRequestPostDataReturns struct {
|
||||
// Do executes Network.getRequestPostData against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// postData - Request body string, omitting files from multipart requests
|
||||
//
|
||||
// postData - Request body string, omitting files from multipart requests
|
||||
func (p *GetRequestPostDataParams) Do(ctx context.Context) (postData string, err error) {
|
||||
// execute
|
||||
var res GetRequestPostDataReturns
|
||||
@@ -449,7 +460,8 @@ type GetResponseBodyForInterceptionParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-getResponseBodyForInterception
|
||||
//
|
||||
// parameters:
|
||||
// interceptionID - Identifier for the intercepted request to get body for.
|
||||
//
|
||||
// interceptionID - Identifier for the intercepted request to get body for.
|
||||
func GetResponseBodyForInterception(interceptionID InterceptionID) *GetResponseBodyForInterceptionParams {
|
||||
return &GetResponseBodyForInterceptionParams{
|
||||
InterceptionID: interceptionID,
|
||||
@@ -465,7 +477,8 @@ type GetResponseBodyForInterceptionReturns struct {
|
||||
// Do executes Network.getResponseBodyForInterception against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// body - Response body.
|
||||
//
|
||||
// body - Response body.
|
||||
func (p *GetResponseBodyForInterceptionParams) Do(ctx context.Context) (body []byte, err error) {
|
||||
// execute
|
||||
var res GetResponseBodyForInterceptionReturns
|
||||
@@ -505,7 +518,8 @@ type TakeResponseBodyForInterceptionAsStreamParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-takeResponseBodyForInterceptionAsStream
|
||||
//
|
||||
// parameters:
|
||||
// interceptionID
|
||||
//
|
||||
// interceptionID
|
||||
func TakeResponseBodyForInterceptionAsStream(interceptionID InterceptionID) *TakeResponseBodyForInterceptionAsStreamParams {
|
||||
return &TakeResponseBodyForInterceptionAsStreamParams{
|
||||
InterceptionID: interceptionID,
|
||||
@@ -520,7 +534,8 @@ type TakeResponseBodyForInterceptionAsStreamReturns struct {
|
||||
// Do executes Network.takeResponseBodyForInterceptionAsStream against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// stream
|
||||
//
|
||||
// stream
|
||||
func (p *TakeResponseBodyForInterceptionAsStreamParams) Do(ctx context.Context) (stream io.StreamHandle, err error) {
|
||||
// execute
|
||||
var res TakeResponseBodyForInterceptionAsStreamReturns
|
||||
@@ -548,7 +563,8 @@ type ReplayXHRParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-replayXHR
|
||||
//
|
||||
// parameters:
|
||||
// requestID - Identifier of XHR to replay.
|
||||
//
|
||||
// requestID - Identifier of XHR to replay.
|
||||
func ReplayXHR(requestID RequestID) *ReplayXHRParams {
|
||||
return &ReplayXHRParams{
|
||||
RequestID: requestID,
|
||||
@@ -573,8 +589,9 @@ type SearchInResponseBodyParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-searchInResponseBody
|
||||
//
|
||||
// parameters:
|
||||
// requestID - Identifier of the network response to search.
|
||||
// query - String to search for.
|
||||
//
|
||||
// requestID - Identifier of the network response to search.
|
||||
// query - String to search for.
|
||||
func SearchInResponseBody(requestID RequestID, query string) *SearchInResponseBodyParams {
|
||||
return &SearchInResponseBodyParams{
|
||||
RequestID: requestID,
|
||||
@@ -602,7 +619,8 @@ type SearchInResponseBodyReturns struct {
|
||||
// Do executes Network.searchInResponseBody against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// result - List of search matches.
|
||||
//
|
||||
// result - List of search matches.
|
||||
func (p *SearchInResponseBodyParams) Do(ctx context.Context) (result []*debugger.SearchMatch, err error) {
|
||||
// execute
|
||||
var res SearchInResponseBodyReturns
|
||||
@@ -624,7 +642,8 @@ type SetBlockedURLSParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-setBlockedURLs
|
||||
//
|
||||
// parameters:
|
||||
// urls - URL patterns to block. Wildcards ('*') are allowed.
|
||||
//
|
||||
// urls - URL patterns to block. Wildcards ('*') are allowed.
|
||||
func SetBlockedURLS(urls []string) *SetBlockedURLSParams {
|
||||
return &SetBlockedURLSParams{
|
||||
Urls: urls,
|
||||
@@ -648,7 +667,8 @@ type SetBypassServiceWorkerParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-setBypassServiceWorker
|
||||
//
|
||||
// parameters:
|
||||
// bypass - Bypass service worker and load from network.
|
||||
//
|
||||
// bypass - Bypass service worker and load from network.
|
||||
func SetBypassServiceWorker(bypass bool) *SetBypassServiceWorkerParams {
|
||||
return &SetBypassServiceWorkerParams{
|
||||
Bypass: bypass,
|
||||
@@ -672,7 +692,8 @@ type SetCacheDisabledParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-setCacheDisabled
|
||||
//
|
||||
// parameters:
|
||||
// cacheDisabled - Cache disabled state.
|
||||
//
|
||||
// cacheDisabled - Cache disabled state.
|
||||
func SetCacheDisabled(cacheDisabled bool) *SetCacheDisabledParams {
|
||||
return &SetCacheDisabledParams{
|
||||
CacheDisabled: cacheDisabled,
|
||||
@@ -700,6 +721,7 @@ type SetCookieParams struct {
|
||||
SameParty bool `json:"sameParty,omitempty"` // True if cookie is SameParty.
|
||||
SourceScheme CookieSourceScheme `json:"sourceScheme,omitempty"` // Cookie source scheme type.
|
||||
SourcePort int64 `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.
|
||||
}
|
||||
|
||||
// SetCookie sets a cookie with the given cookie data; may overwrite
|
||||
@@ -708,8 +730,9 @@ type SetCookieParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-setCookie
|
||||
//
|
||||
// parameters:
|
||||
// name - Cookie name.
|
||||
// value - Cookie value.
|
||||
//
|
||||
// name - Cookie name.
|
||||
// value - Cookie value.
|
||||
func SetCookie(name string, value string) *SetCookieParams {
|
||||
return &SetCookieParams{
|
||||
Name: name,
|
||||
@@ -788,6 +811,14 @@ func (p SetCookieParams) WithSourcePort(sourcePort int64) *SetCookieParams {
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithPartitionKey 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.
|
||||
func (p SetCookieParams) WithPartitionKey(partitionKey string) *SetCookieParams {
|
||||
p.PartitionKey = partitionKey
|
||||
return &p
|
||||
}
|
||||
|
||||
// Do executes Network.setCookie against the provided context.
|
||||
func (p *SetCookieParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandSetCookie, p, nil)
|
||||
@@ -803,7 +834,8 @@ type SetCookiesParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-setCookies
|
||||
//
|
||||
// parameters:
|
||||
// cookies - Cookies to be set.
|
||||
//
|
||||
// cookies - Cookies to be set.
|
||||
func SetCookies(cookies []*CookieParam) *SetCookiesParams {
|
||||
return &SetCookiesParams{
|
||||
Cookies: cookies,
|
||||
@@ -827,7 +859,8 @@ type SetExtraHTTPHeadersParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-setExtraHTTPHeaders
|
||||
//
|
||||
// parameters:
|
||||
// headers - Map with extra HTTP headers.
|
||||
//
|
||||
// headers - Map with extra HTTP headers.
|
||||
func SetExtraHTTPHeaders(headers Headers) *SetExtraHTTPHeadersParams {
|
||||
return &SetExtraHTTPHeadersParams{
|
||||
Headers: headers,
|
||||
@@ -851,7 +884,8 @@ type SetAttachDebugStackParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-setAttachDebugStack
|
||||
//
|
||||
// parameters:
|
||||
// enabled - Whether to attach a page script stack for debugging purpose.
|
||||
//
|
||||
// enabled - Whether to attach a page script stack for debugging purpose.
|
||||
func SetAttachDebugStack(enabled bool) *SetAttachDebugStackParams {
|
||||
return &SetAttachDebugStackParams{
|
||||
Enabled: enabled,
|
||||
@@ -894,7 +928,8 @@ type GetSecurityIsolationStatusReturns struct {
|
||||
// Do executes Network.getSecurityIsolationStatus against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// status
|
||||
//
|
||||
// status
|
||||
func (p *GetSecurityIsolationStatusParams) Do(ctx context.Context) (status *SecurityIsolationStatus, err error) {
|
||||
// execute
|
||||
var res GetSecurityIsolationStatusReturns
|
||||
@@ -906,11 +941,38 @@ func (p *GetSecurityIsolationStatusParams) Do(ctx context.Context) (status *Secu
|
||||
return res.Status, nil
|
||||
}
|
||||
|
||||
// EnableReportingAPIParams 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.
|
||||
type EnableReportingAPIParams struct {
|
||||
Enable bool `json:"enable"` // Whether to enable or disable events for the Reporting API
|
||||
}
|
||||
|
||||
// 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.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-enableReportingApi
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// enable - Whether to enable or disable events for the Reporting API
|
||||
func EnableReportingAPI(enable bool) *EnableReportingAPIParams {
|
||||
return &EnableReportingAPIParams{
|
||||
Enable: enable,
|
||||
}
|
||||
}
|
||||
|
||||
// Do executes Network.enableReportingApi against the provided context.
|
||||
func (p *EnableReportingAPIParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandEnableReportingAPI, p, nil)
|
||||
}
|
||||
|
||||
// LoadNetworkResourceParams fetches the resource and returns the content.
|
||||
type LoadNetworkResourceParams struct {
|
||||
FrameID cdp.FrameID `json:"frameId"` // Frame id to get the resource for.
|
||||
URL string `json:"url"` // URL of the resource to get content for.
|
||||
Options *LoadNetworkResourceOptions `json:"options"` // Options for the request.
|
||||
FrameID cdp.FrameID `json:"frameId,omitempty"` // Frame id to get the resource for. Mandatory for frame targets, and should be omitted for worker targets.
|
||||
URL string `json:"url"` // URL of the resource to get content for.
|
||||
Options *LoadNetworkResourceOptions `json:"options"` // Options for the request.
|
||||
}
|
||||
|
||||
// LoadNetworkResource fetches the resource and returns the content.
|
||||
@@ -918,17 +980,23 @@ type LoadNetworkResourceParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-loadNetworkResource
|
||||
//
|
||||
// parameters:
|
||||
// frameID - Frame id to get the resource for.
|
||||
// url - URL of the resource to get content for.
|
||||
// options - Options for the request.
|
||||
func LoadNetworkResource(frameID cdp.FrameID, url string, options *LoadNetworkResourceOptions) *LoadNetworkResourceParams {
|
||||
//
|
||||
// url - URL of the resource to get content for.
|
||||
// options - Options for the request.
|
||||
func LoadNetworkResource(url string, options *LoadNetworkResourceOptions) *LoadNetworkResourceParams {
|
||||
return &LoadNetworkResourceParams{
|
||||
FrameID: frameID,
|
||||
URL: url,
|
||||
Options: options,
|
||||
}
|
||||
}
|
||||
|
||||
// WithFrameID frame id to get the resource for. Mandatory for frame targets,
|
||||
// and should be omitted for worker targets.
|
||||
func (p LoadNetworkResourceParams) WithFrameID(frameID cdp.FrameID) *LoadNetworkResourceParams {
|
||||
p.FrameID = frameID
|
||||
return &p
|
||||
}
|
||||
|
||||
// LoadNetworkResourceReturns return values.
|
||||
type LoadNetworkResourceReturns struct {
|
||||
Resource *LoadNetworkResourcePageResult `json:"resource,omitempty"`
|
||||
@@ -937,7 +1005,8 @@ type LoadNetworkResourceReturns struct {
|
||||
// Do executes Network.loadNetworkResource against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// resource
|
||||
//
|
||||
// resource
|
||||
func (p *LoadNetworkResourceParams) Do(ctx context.Context) (resource *LoadNetworkResourcePageResult, err error) {
|
||||
// execute
|
||||
var res LoadNetworkResourceReturns
|
||||
@@ -976,5 +1045,6 @@ const (
|
||||
CommandSetExtraHTTPHeaders = "Network.setExtraHTTPHeaders"
|
||||
CommandSetAttachDebugStack = "Network.setAttachDebugStack"
|
||||
CommandGetSecurityIsolationStatus = "Network.getSecurityIsolationStatus"
|
||||
CommandEnableReportingAPI = "Network.enableReportingApi"
|
||||
CommandLoadNetworkResource = "Network.loadNetworkResource"
|
||||
)
|
||||
|
||||
413
vendor/github.com/chromedp/cdproto/network/types.go
generated
vendored
413
vendor/github.com/chromedp/cdproto/network/types.go
generated
vendored
@@ -3,7 +3,7 @@ package network
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/chromedp/cdproto/cdp"
|
||||
"github.com/chromedp/cdproto/io"
|
||||
@@ -35,6 +35,7 @@ const (
|
||||
ResourceTypeTextTrack ResourceType = "TextTrack"
|
||||
ResourceTypeXHR ResourceType = "XHR"
|
||||
ResourceTypeFetch ResourceType = "Fetch"
|
||||
ResourceTypePrefetch ResourceType = "Prefetch"
|
||||
ResourceTypeEventSource ResourceType = "EventSource"
|
||||
ResourceTypeWebSocket ResourceType = "WebSocket"
|
||||
ResourceTypeManifest ResourceType = "Manifest"
|
||||
@@ -57,7 +58,8 @@ func (t ResourceType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ResourceType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ResourceType(in.String()) {
|
||||
v := in.String()
|
||||
switch ResourceType(v) {
|
||||
case ResourceTypeDocument:
|
||||
*t = ResourceTypeDocument
|
||||
case ResourceTypeStylesheet:
|
||||
@@ -76,6 +78,8 @@ func (t *ResourceType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = ResourceTypeXHR
|
||||
case ResourceTypeFetch:
|
||||
*t = ResourceTypeFetch
|
||||
case ResourceTypePrefetch:
|
||||
*t = ResourceTypePrefetch
|
||||
case ResourceTypeEventSource:
|
||||
*t = ResourceTypeEventSource
|
||||
case ResourceTypeWebSocket:
|
||||
@@ -94,7 +98,7 @@ func (t *ResourceType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = ResourceTypeOther
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ResourceType value"))
|
||||
in.AddError(fmt.Errorf("unknown ResourceType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -163,7 +167,8 @@ func (t ErrorReason) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ErrorReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ErrorReason(in.String()) {
|
||||
v := in.String()
|
||||
switch ErrorReason(v) {
|
||||
case ErrorReasonFailed:
|
||||
*t = ErrorReasonFailed
|
||||
case ErrorReasonAborted:
|
||||
@@ -194,7 +199,7 @@ func (t *ErrorReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = ErrorReasonBlockedByResponse
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ErrorReason value"))
|
||||
in.AddError(fmt.Errorf("unknown ErrorReason value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -244,7 +249,8 @@ func (t ConnectionType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ConnectionType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ConnectionType(in.String()) {
|
||||
v := in.String()
|
||||
switch ConnectionType(v) {
|
||||
case ConnectionTypeNone:
|
||||
*t = ConnectionTypeNone
|
||||
case ConnectionTypeCellular2g:
|
||||
@@ -265,7 +271,7 @@ func (t *ConnectionType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = ConnectionTypeOther
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ConnectionType value"))
|
||||
in.AddError(fmt.Errorf("unknown ConnectionType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -304,7 +310,8 @@ func (t CookieSameSite) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *CookieSameSite) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch CookieSameSite(in.String()) {
|
||||
v := in.String()
|
||||
switch CookieSameSite(v) {
|
||||
case CookieSameSiteStrict:
|
||||
*t = CookieSameSiteStrict
|
||||
case CookieSameSiteLax:
|
||||
@@ -313,7 +320,7 @@ func (t *CookieSameSite) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = CookieSameSiteNone
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown CookieSameSite value"))
|
||||
in.AddError(fmt.Errorf("unknown CookieSameSite value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -352,7 +359,8 @@ func (t CookiePriority) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *CookiePriority) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch CookiePriority(in.String()) {
|
||||
v := in.String()
|
||||
switch CookiePriority(v) {
|
||||
case CookiePriorityLow:
|
||||
*t = CookiePriorityLow
|
||||
case CookiePriorityMedium:
|
||||
@@ -361,7 +369,7 @@ func (t *CookiePriority) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = CookiePriorityHigh
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown CookiePriority value"))
|
||||
in.AddError(fmt.Errorf("unknown CookiePriority value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -402,7 +410,8 @@ func (t CookieSourceScheme) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *CookieSourceScheme) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch CookieSourceScheme(in.String()) {
|
||||
v := in.String()
|
||||
switch CookieSourceScheme(v) {
|
||||
case CookieSourceSchemeUnset:
|
||||
*t = CookieSourceSchemeUnset
|
||||
case CookieSourceSchemeNonSecure:
|
||||
@@ -411,7 +420,7 @@ func (t *CookieSourceScheme) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = CookieSourceSchemeSecure
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown CookieSourceScheme value"))
|
||||
in.AddError(fmt.Errorf("unknown CookieSourceScheme value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -475,7 +484,8 @@ func (t ResourcePriority) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ResourcePriority) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ResourcePriority(in.String()) {
|
||||
v := in.String()
|
||||
switch ResourcePriority(v) {
|
||||
case ResourcePriorityVeryLow:
|
||||
*t = ResourcePriorityVeryLow
|
||||
case ResourcePriorityLow:
|
||||
@@ -488,7 +498,7 @@ func (t *ResourcePriority) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = ResourcePriorityVeryHigh
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ResourcePriority value"))
|
||||
in.AddError(fmt.Errorf("unknown ResourcePriority value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -520,6 +530,7 @@ type Request struct {
|
||||
ReferrerPolicy ReferrerPolicy `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 *TrustTokenParams `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.
|
||||
}
|
||||
|
||||
// SignedCertificateTimestamp details of a signed certificate timestamp
|
||||
@@ -527,33 +538,35 @@ type Request struct {
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-SignedCertificateTimestamp
|
||||
type SignedCertificateTimestamp 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 *cdp.TimeSinceEpoch `json:"timestamp"` // Issuance date.
|
||||
HashAlgorithm string `json:"hashAlgorithm"` // Hash algorithm.
|
||||
SignatureAlgorithm string `json:"signatureAlgorithm"` // Signature algorithm.
|
||||
SignatureData string `json:"signatureData"` // Signature data.
|
||||
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.
|
||||
}
|
||||
|
||||
// SecurityDetails security details about a request.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-SecurityDetails
|
||||
type SecurityDetails 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 security.CertificateID `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 *cdp.TimeSinceEpoch `json:"validFrom"` // Certificate valid from date.
|
||||
ValidTo *cdp.TimeSinceEpoch `json:"validTo"` // Certificate valid to (expiration) date
|
||||
SignedCertificateTimestampList []*SignedCertificateTimestamp `json:"signedCertificateTimestampList"` // List of signed certificate timestamps (SCTs).
|
||||
CertificateTransparencyCompliance CertificateTransparencyCompliance `json:"certificateTransparencyCompliance"` // Whether the request complied with Certificate Transparency policy
|
||||
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 security.CertificateID `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 *cdp.TimeSinceEpoch `json:"validFrom"` // Certificate valid from date.
|
||||
ValidTo *cdp.TimeSinceEpoch `json:"validTo"` // Certificate valid to (expiration) date
|
||||
SignedCertificateTimestampList []*SignedCertificateTimestamp `json:"signedCertificateTimestampList"` // List of signed certificate timestamps (SCTs).
|
||||
CertificateTransparencyCompliance CertificateTransparencyCompliance `json:"certificateTransparencyCompliance"` // Whether the request complied with Certificate Transparency policy
|
||||
ServerSignatureAlgorithm int64 `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
|
||||
}
|
||||
|
||||
// CertificateTransparencyCompliance whether the request complied with
|
||||
@@ -586,7 +599,8 @@ func (t CertificateTransparencyCompliance) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *CertificateTransparencyCompliance) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch CertificateTransparencyCompliance(in.String()) {
|
||||
v := in.String()
|
||||
switch CertificateTransparencyCompliance(v) {
|
||||
case CertificateTransparencyComplianceUnknown:
|
||||
*t = CertificateTransparencyComplianceUnknown
|
||||
case CertificateTransparencyComplianceNotCompliant:
|
||||
@@ -595,7 +609,7 @@ func (t *CertificateTransparencyCompliance) UnmarshalEasyJSON(in *jlexer.Lexer)
|
||||
*t = CertificateTransparencyComplianceCompliant
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown CertificateTransparencyCompliance value"))
|
||||
in.AddError(fmt.Errorf("unknown CertificateTransparencyCompliance value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -642,7 +656,8 @@ func (t BlockedReason) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *BlockedReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch BlockedReason(in.String()) {
|
||||
v := in.String()
|
||||
switch BlockedReason(v) {
|
||||
case BlockedReasonOther:
|
||||
*t = BlockedReasonOther
|
||||
case BlockedReasonCsp:
|
||||
@@ -669,7 +684,7 @@ func (t *BlockedReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = BlockedReasonCorpNotSameSite
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown BlockedReason value"))
|
||||
in.AddError(fmt.Errorf("unknown BlockedReason value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -709,12 +724,16 @@ const (
|
||||
CorsErrorPreflightInvalidAllowCredentials CorsError = "PreflightInvalidAllowCredentials"
|
||||
CorsErrorPreflightMissingAllowExternal CorsError = "PreflightMissingAllowExternal"
|
||||
CorsErrorPreflightInvalidAllowExternal CorsError = "PreflightInvalidAllowExternal"
|
||||
CorsErrorPreflightMissingAllowPrivateNetwork CorsError = "PreflightMissingAllowPrivateNetwork"
|
||||
CorsErrorPreflightInvalidAllowPrivateNetwork CorsError = "PreflightInvalidAllowPrivateNetwork"
|
||||
CorsErrorInvalidAllowMethodsPreflightResponse CorsError = "InvalidAllowMethodsPreflightResponse"
|
||||
CorsErrorInvalidAllowHeadersPreflightResponse CorsError = "InvalidAllowHeadersPreflightResponse"
|
||||
CorsErrorMethodDisallowedByPreflightResponse CorsError = "MethodDisallowedByPreflightResponse"
|
||||
CorsErrorHeaderDisallowedByPreflightResponse CorsError = "HeaderDisallowedByPreflightResponse"
|
||||
CorsErrorRedirectContainsCredentials CorsError = "RedirectContainsCredentials"
|
||||
CorsErrorInsecurePrivateNetwork CorsError = "InsecurePrivateNetwork"
|
||||
CorsErrorInvalidPrivateNetworkAccess CorsError = "InvalidPrivateNetworkAccess"
|
||||
CorsErrorUnexpectedPrivateNetworkAccess CorsError = "UnexpectedPrivateNetworkAccess"
|
||||
CorsErrorNoCorsRedirectModeNotFollow CorsError = "NoCorsRedirectModeNotFollow"
|
||||
)
|
||||
|
||||
@@ -730,7 +749,8 @@ func (t CorsError) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *CorsError) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch CorsError(in.String()) {
|
||||
v := in.String()
|
||||
switch CorsError(v) {
|
||||
case CorsErrorDisallowedByMode:
|
||||
*t = CorsErrorDisallowedByMode
|
||||
case CorsErrorInvalidResponse:
|
||||
@@ -769,6 +789,10 @@ func (t *CorsError) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = CorsErrorPreflightMissingAllowExternal
|
||||
case CorsErrorPreflightInvalidAllowExternal:
|
||||
*t = CorsErrorPreflightInvalidAllowExternal
|
||||
case CorsErrorPreflightMissingAllowPrivateNetwork:
|
||||
*t = CorsErrorPreflightMissingAllowPrivateNetwork
|
||||
case CorsErrorPreflightInvalidAllowPrivateNetwork:
|
||||
*t = CorsErrorPreflightInvalidAllowPrivateNetwork
|
||||
case CorsErrorInvalidAllowMethodsPreflightResponse:
|
||||
*t = CorsErrorInvalidAllowMethodsPreflightResponse
|
||||
case CorsErrorInvalidAllowHeadersPreflightResponse:
|
||||
@@ -781,11 +805,15 @@ func (t *CorsError) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = CorsErrorRedirectContainsCredentials
|
||||
case CorsErrorInsecurePrivateNetwork:
|
||||
*t = CorsErrorInsecurePrivateNetwork
|
||||
case CorsErrorInvalidPrivateNetworkAccess:
|
||||
*t = CorsErrorInvalidPrivateNetworkAccess
|
||||
case CorsErrorUnexpectedPrivateNetworkAccess:
|
||||
*t = CorsErrorUnexpectedPrivateNetworkAccess
|
||||
case CorsErrorNoCorsRedirectModeNotFollow:
|
||||
*t = CorsErrorNoCorsRedirectModeNotFollow
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown CorsError value"))
|
||||
in.AddError(fmt.Errorf("unknown CorsError value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -832,7 +860,8 @@ func (t ServiceWorkerResponseSource) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ServiceWorkerResponseSource) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ServiceWorkerResponseSource(in.String()) {
|
||||
v := in.String()
|
||||
switch ServiceWorkerResponseSource(v) {
|
||||
case ServiceWorkerResponseSourceCacheStorage:
|
||||
*t = ServiceWorkerResponseSourceCacheStorage
|
||||
case ServiceWorkerResponseSourceHTTPCache:
|
||||
@@ -843,7 +872,7 @@ func (t *ServiceWorkerResponseSource) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = ServiceWorkerResponseSourceNetwork
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ServiceWorkerResponseSource value"))
|
||||
in.AddError(fmt.Errorf("unknown ServiceWorkerResponseSource value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -892,7 +921,8 @@ func (t TrustTokenOperationType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *TrustTokenOperationType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch TrustTokenOperationType(in.String()) {
|
||||
v := in.String()
|
||||
switch TrustTokenOperationType(v) {
|
||||
case TrustTokenOperationTypeIssuance:
|
||||
*t = TrustTokenOperationTypeIssuance
|
||||
case TrustTokenOperationTypeRedemption:
|
||||
@@ -901,7 +931,7 @@ func (t *TrustTokenOperationType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = TrustTokenOperationTypeSigning
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown TrustTokenOperationType value"))
|
||||
in.AddError(fmt.Errorf("unknown TrustTokenOperationType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -910,6 +940,70 @@ func (t *TrustTokenOperationType) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
// AlternateProtocolUsage the reason why Chrome uses a specific transport
|
||||
// protocol for HTTP semantics.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-AlternateProtocolUsage
|
||||
type AlternateProtocolUsage string
|
||||
|
||||
// String returns the AlternateProtocolUsage as string value.
|
||||
func (t AlternateProtocolUsage) String() string {
|
||||
return string(t)
|
||||
}
|
||||
|
||||
// AlternateProtocolUsage values.
|
||||
const (
|
||||
AlternateProtocolUsageAlternativeJobWonWithoutRace AlternateProtocolUsage = "alternativeJobWonWithoutRace"
|
||||
AlternateProtocolUsageAlternativeJobWonRace AlternateProtocolUsage = "alternativeJobWonRace"
|
||||
AlternateProtocolUsageMainJobWonRace AlternateProtocolUsage = "mainJobWonRace"
|
||||
AlternateProtocolUsageMappingMissing AlternateProtocolUsage = "mappingMissing"
|
||||
AlternateProtocolUsageBroken AlternateProtocolUsage = "broken"
|
||||
AlternateProtocolUsageDNSAlpnH3jobWonWithoutRace AlternateProtocolUsage = "dnsAlpnH3JobWonWithoutRace"
|
||||
AlternateProtocolUsageDNSAlpnH3jobWonRace AlternateProtocolUsage = "dnsAlpnH3JobWonRace"
|
||||
AlternateProtocolUsageUnspecifiedReason AlternateProtocolUsage = "unspecifiedReason"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
func (t AlternateProtocolUsage) MarshalEasyJSON(out *jwriter.Writer) {
|
||||
out.String(string(t))
|
||||
}
|
||||
|
||||
// MarshalJSON satisfies json.Marshaler.
|
||||
func (t AlternateProtocolUsage) MarshalJSON() ([]byte, error) {
|
||||
return easyjson.Marshal(t)
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *AlternateProtocolUsage) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
v := in.String()
|
||||
switch AlternateProtocolUsage(v) {
|
||||
case AlternateProtocolUsageAlternativeJobWonWithoutRace:
|
||||
*t = AlternateProtocolUsageAlternativeJobWonWithoutRace
|
||||
case AlternateProtocolUsageAlternativeJobWonRace:
|
||||
*t = AlternateProtocolUsageAlternativeJobWonRace
|
||||
case AlternateProtocolUsageMainJobWonRace:
|
||||
*t = AlternateProtocolUsageMainJobWonRace
|
||||
case AlternateProtocolUsageMappingMissing:
|
||||
*t = AlternateProtocolUsageMappingMissing
|
||||
case AlternateProtocolUsageBroken:
|
||||
*t = AlternateProtocolUsageBroken
|
||||
case AlternateProtocolUsageDNSAlpnH3jobWonWithoutRace:
|
||||
*t = AlternateProtocolUsageDNSAlpnH3jobWonWithoutRace
|
||||
case AlternateProtocolUsageDNSAlpnH3jobWonRace:
|
||||
*t = AlternateProtocolUsageDNSAlpnH3jobWonRace
|
||||
case AlternateProtocolUsageUnspecifiedReason:
|
||||
*t = AlternateProtocolUsageUnspecifiedReason
|
||||
|
||||
default:
|
||||
in.AddError(fmt.Errorf("unknown AlternateProtocolUsage value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
// UnmarshalJSON satisfies json.Unmarshaler.
|
||||
func (t *AlternateProtocolUsage) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
// Response HTTP response data.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-Response
|
||||
@@ -918,10 +1012,8 @@ type Response struct {
|
||||
Status int64 `json:"status"` // HTTP response status code.
|
||||
StatusText string `json:"statusText"` // HTTP response status text.
|
||||
Headers Headers `json:"headers"` // HTTP response headers.
|
||||
HeadersText string `json:"headersText,omitempty"` // HTTP response headers text.
|
||||
MimeType string `json:"mimeType"` // Resource mimeType as determined by the browser.
|
||||
RequestHeaders Headers `json:"requestHeaders,omitempty"` // Refined HTTP request headers that were actually transmitted over the network.
|
||||
RequestHeadersText string `json:"requestHeadersText,omitempty"` // HTTP request headers text.
|
||||
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.
|
||||
@@ -935,6 +1027,7 @@ type Response struct {
|
||||
ResponseTime *cdp.TimeSinceEpoch `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 AlternateProtocolUsage `json:"alternateProtocolUsage,omitempty"` // The reason why Chrome uses a specific transport protocol for HTTP semantics.
|
||||
SecurityState security.State `json:"securityState"` // Security state of the request resource.
|
||||
SecurityDetails *SecurityDetails `json:"securityDetails,omitempty"` // Security details for the request.
|
||||
}
|
||||
@@ -994,20 +1087,22 @@ type Initiator struct {
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-Cookie
|
||||
type Cookie 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 int64 `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 CookieSameSite `json:"sameSite,omitempty"` // Cookie SameSite type.
|
||||
Priority CookiePriority `json:"priority"` // Cookie Priority
|
||||
SameParty bool `json:"sameParty"` // True if cookie is SameParty.
|
||||
SourceScheme CookieSourceScheme `json:"sourceScheme"` // Cookie source scheme type.
|
||||
SourcePort int64 `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.
|
||||
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 int64 `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 CookieSameSite `json:"sameSite,omitempty"` // Cookie SameSite type.
|
||||
Priority CookiePriority `json:"priority"` // Cookie Priority
|
||||
SameParty bool `json:"sameParty"` // True if cookie is SameParty.
|
||||
SourceScheme CookieSourceScheme `json:"sourceScheme"` // Cookie source scheme type.
|
||||
SourcePort int64 `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.
|
||||
}
|
||||
|
||||
// SetCookieBlockedReason types of reasons why a cookie may not be stored
|
||||
@@ -1040,6 +1135,7 @@ const (
|
||||
SetCookieBlockedReasonSchemefulSameSiteUnspecifiedTreatedAsLax SetCookieBlockedReason = "SchemefulSameSiteUnspecifiedTreatedAsLax"
|
||||
SetCookieBlockedReasonSamePartyFromCrossPartyContext SetCookieBlockedReason = "SamePartyFromCrossPartyContext"
|
||||
SetCookieBlockedReasonSamePartyConflictsWithOtherAttributes SetCookieBlockedReason = "SamePartyConflictsWithOtherAttributes"
|
||||
SetCookieBlockedReasonNameValuePairExceedsMaxSize SetCookieBlockedReason = "NameValuePairExceedsMaxSize"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
@@ -1054,7 +1150,8 @@ func (t SetCookieBlockedReason) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *SetCookieBlockedReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch SetCookieBlockedReason(in.String()) {
|
||||
v := in.String()
|
||||
switch SetCookieBlockedReason(v) {
|
||||
case SetCookieBlockedReasonSecureOnly:
|
||||
*t = SetCookieBlockedReasonSecureOnly
|
||||
case SetCookieBlockedReasonSameSiteStrict:
|
||||
@@ -1089,9 +1186,11 @@ func (t *SetCookieBlockedReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = SetCookieBlockedReasonSamePartyFromCrossPartyContext
|
||||
case SetCookieBlockedReasonSamePartyConflictsWithOtherAttributes:
|
||||
*t = SetCookieBlockedReasonSamePartyConflictsWithOtherAttributes
|
||||
case SetCookieBlockedReasonNameValuePairExceedsMaxSize:
|
||||
*t = SetCookieBlockedReasonNameValuePairExceedsMaxSize
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown SetCookieBlockedReason value"))
|
||||
in.AddError(fmt.Errorf("unknown SetCookieBlockedReason value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1126,6 +1225,7 @@ const (
|
||||
CookieBlockedReasonSchemefulSameSiteLax CookieBlockedReason = "SchemefulSameSiteLax"
|
||||
CookieBlockedReasonSchemefulSameSiteUnspecifiedTreatedAsLax CookieBlockedReason = "SchemefulSameSiteUnspecifiedTreatedAsLax"
|
||||
CookieBlockedReasonSamePartyFromCrossPartyContext CookieBlockedReason = "SamePartyFromCrossPartyContext"
|
||||
CookieBlockedReasonNameValuePairExceedsMaxSize CookieBlockedReason = "NameValuePairExceedsMaxSize"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
@@ -1140,7 +1240,8 @@ func (t CookieBlockedReason) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *CookieBlockedReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch CookieBlockedReason(in.String()) {
|
||||
v := in.String()
|
||||
switch CookieBlockedReason(v) {
|
||||
case CookieBlockedReasonSecureOnly:
|
||||
*t = CookieBlockedReasonSecureOnly
|
||||
case CookieBlockedReasonNotOnPath:
|
||||
@@ -1167,9 +1268,11 @@ func (t *CookieBlockedReason) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = CookieBlockedReasonSchemefulSameSiteUnspecifiedTreatedAsLax
|
||||
case CookieBlockedReasonSamePartyFromCrossPartyContext:
|
||||
*t = CookieBlockedReasonSamePartyFromCrossPartyContext
|
||||
case CookieBlockedReasonNameValuePairExceedsMaxSize:
|
||||
*t = CookieBlockedReasonNameValuePairExceedsMaxSize
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown CookieBlockedReason value"))
|
||||
in.AddError(fmt.Errorf("unknown CookieBlockedReason value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1214,6 +1317,7 @@ type CookieParam struct {
|
||||
SameParty bool `json:"sameParty,omitempty"` // True if cookie is SameParty.
|
||||
SourceScheme CookieSourceScheme `json:"sourceScheme,omitempty"` // Cookie source scheme type.
|
||||
SourcePort int64 `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.
|
||||
}
|
||||
|
||||
// AuthChallenge authorization challenge for HTTP status code 401 or 407.
|
||||
@@ -1265,14 +1369,15 @@ func (t InterceptionStage) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *InterceptionStage) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch InterceptionStage(in.String()) {
|
||||
v := in.String()
|
||||
switch InterceptionStage(v) {
|
||||
case InterceptionStageRequest:
|
||||
*t = InterceptionStageRequest
|
||||
case InterceptionStageHeadersReceived:
|
||||
*t = InterceptionStageHeadersReceived
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown InterceptionStage value"))
|
||||
in.AddError(fmt.Errorf("unknown InterceptionStage value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1350,7 +1455,8 @@ func (t SignedExchangeErrorField) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *SignedExchangeErrorField) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch SignedExchangeErrorField(in.String()) {
|
||||
v := in.String()
|
||||
switch SignedExchangeErrorField(v) {
|
||||
case SignedExchangeErrorFieldSignatureSig:
|
||||
*t = SignedExchangeErrorFieldSignatureSig
|
||||
case SignedExchangeErrorFieldSignatureIntegrity:
|
||||
@@ -1365,7 +1471,7 @@ func (t *SignedExchangeErrorField) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = SignedExchangeErrorFieldSignatureTimestamps
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown SignedExchangeErrorField value"))
|
||||
in.AddError(fmt.Errorf("unknown SignedExchangeErrorField value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1422,7 +1528,8 @@ func (t ContentEncoding) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ContentEncoding) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ContentEncoding(in.String()) {
|
||||
v := in.String()
|
||||
switch ContentEncoding(v) {
|
||||
case ContentEncodingDeflate:
|
||||
*t = ContentEncodingDeflate
|
||||
case ContentEncodingGzip:
|
||||
@@ -1431,7 +1538,7 @@ func (t *ContentEncoding) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = ContentEncodingBr
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ContentEncoding value"))
|
||||
in.AddError(fmt.Errorf("unknown ContentEncoding value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1455,6 +1562,8 @@ const (
|
||||
PrivateNetworkRequestPolicyAllow PrivateNetworkRequestPolicy = "Allow"
|
||||
PrivateNetworkRequestPolicyBlockFromInsecureToMorePrivate PrivateNetworkRequestPolicy = "BlockFromInsecureToMorePrivate"
|
||||
PrivateNetworkRequestPolicyWarnFromInsecureToMorePrivate PrivateNetworkRequestPolicy = "WarnFromInsecureToMorePrivate"
|
||||
PrivateNetworkRequestPolicyPreflightBlock PrivateNetworkRequestPolicy = "PreflightBlock"
|
||||
PrivateNetworkRequestPolicyPreflightWarn PrivateNetworkRequestPolicy = "PreflightWarn"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
@@ -1469,16 +1578,21 @@ func (t PrivateNetworkRequestPolicy) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *PrivateNetworkRequestPolicy) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch PrivateNetworkRequestPolicy(in.String()) {
|
||||
v := in.String()
|
||||
switch PrivateNetworkRequestPolicy(v) {
|
||||
case PrivateNetworkRequestPolicyAllow:
|
||||
*t = PrivateNetworkRequestPolicyAllow
|
||||
case PrivateNetworkRequestPolicyBlockFromInsecureToMorePrivate:
|
||||
*t = PrivateNetworkRequestPolicyBlockFromInsecureToMorePrivate
|
||||
case PrivateNetworkRequestPolicyWarnFromInsecureToMorePrivate:
|
||||
*t = PrivateNetworkRequestPolicyWarnFromInsecureToMorePrivate
|
||||
case PrivateNetworkRequestPolicyPreflightBlock:
|
||||
*t = PrivateNetworkRequestPolicyPreflightBlock
|
||||
case PrivateNetworkRequestPolicyPreflightWarn:
|
||||
*t = PrivateNetworkRequestPolicyPreflightWarn
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown PrivateNetworkRequestPolicy value"))
|
||||
in.AddError(fmt.Errorf("unknown PrivateNetworkRequestPolicy value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1517,7 +1631,8 @@ func (t IPAddressSpace) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *IPAddressSpace) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch IPAddressSpace(in.String()) {
|
||||
v := in.String()
|
||||
switch IPAddressSpace(v) {
|
||||
case IPAddressSpaceLocal:
|
||||
*t = IPAddressSpaceLocal
|
||||
case IPAddressSpacePrivate:
|
||||
@@ -1528,7 +1643,7 @@ func (t *IPAddressSpace) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = IPAddressSpaceUnknown
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown IPAddressSpace value"))
|
||||
in.AddError(fmt.Errorf("unknown IPAddressSpace value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1537,6 +1652,13 @@ func (t *IPAddressSpace) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
// ConnectTiming [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-ConnectTiming
|
||||
type ConnectTiming 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).
|
||||
}
|
||||
|
||||
// ClientSecurityState [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-ClientSecurityState
|
||||
@@ -1558,10 +1680,12 @@ func (t CrossOriginOpenerPolicyValue) String() string {
|
||||
|
||||
// CrossOriginOpenerPolicyValue values.
|
||||
const (
|
||||
CrossOriginOpenerPolicyValueSameOrigin CrossOriginOpenerPolicyValue = "SameOrigin"
|
||||
CrossOriginOpenerPolicyValueSameOriginAllowPopups CrossOriginOpenerPolicyValue = "SameOriginAllowPopups"
|
||||
CrossOriginOpenerPolicyValueUnsafeNone CrossOriginOpenerPolicyValue = "UnsafeNone"
|
||||
CrossOriginOpenerPolicyValueSameOriginPlusCoep CrossOriginOpenerPolicyValue = "SameOriginPlusCoep"
|
||||
CrossOriginOpenerPolicyValueSameOrigin CrossOriginOpenerPolicyValue = "SameOrigin"
|
||||
CrossOriginOpenerPolicyValueSameOriginAllowPopups CrossOriginOpenerPolicyValue = "SameOriginAllowPopups"
|
||||
CrossOriginOpenerPolicyValueRestrictProperties CrossOriginOpenerPolicyValue = "RestrictProperties"
|
||||
CrossOriginOpenerPolicyValueUnsafeNone CrossOriginOpenerPolicyValue = "UnsafeNone"
|
||||
CrossOriginOpenerPolicyValueSameOriginPlusCoep CrossOriginOpenerPolicyValue = "SameOriginPlusCoep"
|
||||
CrossOriginOpenerPolicyValueRestrictPropertiesPlusCoep CrossOriginOpenerPolicyValue = "RestrictPropertiesPlusCoep"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
@@ -1576,18 +1700,23 @@ func (t CrossOriginOpenerPolicyValue) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *CrossOriginOpenerPolicyValue) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch CrossOriginOpenerPolicyValue(in.String()) {
|
||||
v := in.String()
|
||||
switch CrossOriginOpenerPolicyValue(v) {
|
||||
case CrossOriginOpenerPolicyValueSameOrigin:
|
||||
*t = CrossOriginOpenerPolicyValueSameOrigin
|
||||
case CrossOriginOpenerPolicyValueSameOriginAllowPopups:
|
||||
*t = CrossOriginOpenerPolicyValueSameOriginAllowPopups
|
||||
case CrossOriginOpenerPolicyValueRestrictProperties:
|
||||
*t = CrossOriginOpenerPolicyValueRestrictProperties
|
||||
case CrossOriginOpenerPolicyValueUnsafeNone:
|
||||
*t = CrossOriginOpenerPolicyValueUnsafeNone
|
||||
case CrossOriginOpenerPolicyValueSameOriginPlusCoep:
|
||||
*t = CrossOriginOpenerPolicyValueSameOriginPlusCoep
|
||||
case CrossOriginOpenerPolicyValueRestrictPropertiesPlusCoep:
|
||||
*t = CrossOriginOpenerPolicyValueRestrictPropertiesPlusCoep
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown CrossOriginOpenerPolicyValue value"))
|
||||
in.AddError(fmt.Errorf("unknown CrossOriginOpenerPolicyValue value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1635,7 +1764,8 @@ func (t CrossOriginEmbedderPolicyValue) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *CrossOriginEmbedderPolicyValue) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch CrossOriginEmbedderPolicyValue(in.String()) {
|
||||
v := in.String()
|
||||
switch CrossOriginEmbedderPolicyValue(v) {
|
||||
case CrossOriginEmbedderPolicyValueNone:
|
||||
*t = CrossOriginEmbedderPolicyValueNone
|
||||
case CrossOriginEmbedderPolicyValueCredentialless:
|
||||
@@ -1644,7 +1774,7 @@ func (t *CrossOriginEmbedderPolicyValue) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = CrossOriginEmbedderPolicyValueRequireCorp
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown CrossOriginEmbedderPolicyValue value"))
|
||||
in.AddError(fmt.Errorf("unknown CrossOriginEmbedderPolicyValue value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1671,6 +1801,91 @@ type SecurityIsolationStatus struct {
|
||||
Coep *CrossOriginEmbedderPolicyStatus `json:"coep,omitempty"`
|
||||
}
|
||||
|
||||
// ReportStatus the status of a Reporting API report.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-ReportStatus
|
||||
type ReportStatus string
|
||||
|
||||
// String returns the ReportStatus as string value.
|
||||
func (t ReportStatus) String() string {
|
||||
return string(t)
|
||||
}
|
||||
|
||||
// ReportStatus values.
|
||||
const (
|
||||
ReportStatusQueued ReportStatus = "Queued"
|
||||
ReportStatusPending ReportStatus = "Pending"
|
||||
ReportStatusMarkedForRemoval ReportStatus = "MarkedForRemoval"
|
||||
ReportStatusSuccess ReportStatus = "Success"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
func (t ReportStatus) MarshalEasyJSON(out *jwriter.Writer) {
|
||||
out.String(string(t))
|
||||
}
|
||||
|
||||
// MarshalJSON satisfies json.Marshaler.
|
||||
func (t ReportStatus) MarshalJSON() ([]byte, error) {
|
||||
return easyjson.Marshal(t)
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ReportStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
v := in.String()
|
||||
switch ReportStatus(v) {
|
||||
case ReportStatusQueued:
|
||||
*t = ReportStatusQueued
|
||||
case ReportStatusPending:
|
||||
*t = ReportStatusPending
|
||||
case ReportStatusMarkedForRemoval:
|
||||
*t = ReportStatusMarkedForRemoval
|
||||
case ReportStatusSuccess:
|
||||
*t = ReportStatusSuccess
|
||||
|
||||
default:
|
||||
in.AddError(fmt.Errorf("unknown ReportStatus value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
// UnmarshalJSON satisfies json.Unmarshaler.
|
||||
func (t *ReportStatus) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
// ReportID [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-ReportId
|
||||
type ReportID string
|
||||
|
||||
// String returns the ReportID as string value.
|
||||
func (t ReportID) String() string {
|
||||
return string(t)
|
||||
}
|
||||
|
||||
// ReportingAPIReport an object representing a report generated by the
|
||||
// Reporting API.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-ReportingApiReport
|
||||
type ReportingAPIReport struct {
|
||||
ID ReportID `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 *cdp.TimeSinceEpoch `json:"timestamp"` // When the report was generated.
|
||||
Depth int64 `json:"depth"` // How many uploads deep the related request was.
|
||||
CompletedAttempts int64 `json:"completedAttempts"` // The number of delivery attempts made so far, not including an active attempt.
|
||||
Body easyjson.RawMessage `json:"body"`
|
||||
Status ReportStatus `json:"status"`
|
||||
}
|
||||
|
||||
// ReportingAPIEndpoint [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Network#type-ReportingApiEndpoint
|
||||
type ReportingAPIEndpoint 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.
|
||||
}
|
||||
|
||||
// LoadNetworkResourcePageResult an object providing the result of a network
|
||||
// resource load.
|
||||
//
|
||||
@@ -1728,7 +1943,8 @@ func (t ReferrerPolicy) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ReferrerPolicy) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ReferrerPolicy(in.String()) {
|
||||
v := in.String()
|
||||
switch ReferrerPolicy(v) {
|
||||
case ReferrerPolicyUnsafeURL:
|
||||
*t = ReferrerPolicyUnsafeURL
|
||||
case ReferrerPolicyNoReferrerWhenDowngrade:
|
||||
@@ -1747,7 +1963,7 @@ func (t *ReferrerPolicy) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = ReferrerPolicyStrictOriginWhenCrossOrigin
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ReferrerPolicy value"))
|
||||
in.AddError(fmt.Errorf("unknown ReferrerPolicy value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1785,14 +2001,15 @@ func (t TrustTokenParamsRefreshPolicy) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *TrustTokenParamsRefreshPolicy) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch TrustTokenParamsRefreshPolicy(in.String()) {
|
||||
v := in.String()
|
||||
switch TrustTokenParamsRefreshPolicy(v) {
|
||||
case TrustTokenParamsRefreshPolicyUseCached:
|
||||
*t = TrustTokenParamsRefreshPolicyUseCached
|
||||
case TrustTokenParamsRefreshPolicyRefresh:
|
||||
*t = TrustTokenParamsRefreshPolicyRefresh
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown TrustTokenParamsRefreshPolicy value"))
|
||||
in.AddError(fmt.Errorf("unknown TrustTokenParamsRefreshPolicy value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1833,7 +2050,8 @@ func (t InitiatorType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *InitiatorType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch InitiatorType(in.String()) {
|
||||
v := in.String()
|
||||
switch InitiatorType(v) {
|
||||
case InitiatorTypeParser:
|
||||
*t = InitiatorTypeParser
|
||||
case InitiatorTypeScript:
|
||||
@@ -1848,7 +2066,7 @@ func (t *InitiatorType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = InitiatorTypeOther
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown InitiatorType value"))
|
||||
in.AddError(fmt.Errorf("unknown InitiatorType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1885,14 +2103,15 @@ func (t AuthChallengeSource) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *AuthChallengeSource) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch AuthChallengeSource(in.String()) {
|
||||
v := in.String()
|
||||
switch AuthChallengeSource(v) {
|
||||
case AuthChallengeSourceServer:
|
||||
*t = AuthChallengeSourceServer
|
||||
case AuthChallengeSourceProxy:
|
||||
*t = AuthChallengeSourceProxy
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown AuthChallengeSource value"))
|
||||
in.AddError(fmt.Errorf("unknown AuthChallengeSource value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1933,7 +2152,8 @@ func (t AuthChallengeResponseResponse) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *AuthChallengeResponseResponse) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch AuthChallengeResponseResponse(in.String()) {
|
||||
v := in.String()
|
||||
switch AuthChallengeResponseResponse(v) {
|
||||
case AuthChallengeResponseResponseDefault:
|
||||
*t = AuthChallengeResponseResponseDefault
|
||||
case AuthChallengeResponseResponseCancelAuth:
|
||||
@@ -1942,7 +2162,7 @@ func (t *AuthChallengeResponseResponse) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = AuthChallengeResponseResponseProvideCredentials
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown AuthChallengeResponseResponse value"))
|
||||
in.AddError(fmt.Errorf("unknown AuthChallengeResponseResponse value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1990,7 +2210,8 @@ func (t TrustTokenOperationDoneStatus) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *TrustTokenOperationDoneStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch TrustTokenOperationDoneStatus(in.String()) {
|
||||
v := in.String()
|
||||
switch TrustTokenOperationDoneStatus(v) {
|
||||
case TrustTokenOperationDoneStatusOk:
|
||||
*t = TrustTokenOperationDoneStatusOk
|
||||
case TrustTokenOperationDoneStatusInvalidArgument:
|
||||
@@ -2013,7 +2234,7 @@ func (t *TrustTokenOperationDoneStatus) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = TrustTokenOperationDoneStatusFulfilledLocally
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown TrustTokenOperationDoneStatus value"))
|
||||
in.AddError(fmt.Errorf("unknown TrustTokenOperationDoneStatus value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
1118
vendor/github.com/chromedp/cdproto/overlay/easyjson.go
generated
vendored
1118
vendor/github.com/chromedp/cdproto/overlay/easyjson.go
generated
vendored
File diff suppressed because it is too large
Load Diff
191
vendor/github.com/chromedp/cdproto/overlay/overlay.go
generated
vendored
191
vendor/github.com/chromedp/cdproto/overlay/overlay.go
generated
vendored
@@ -62,7 +62,8 @@ type GetHighlightObjectForTestParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-getHighlightObjectForTest
|
||||
//
|
||||
// parameters:
|
||||
// nodeID - Id of the node to get highlight object for.
|
||||
//
|
||||
// nodeID - Id of the node to get highlight object for.
|
||||
func GetHighlightObjectForTest(nodeID cdp.NodeID) *GetHighlightObjectForTestParams {
|
||||
return &GetHighlightObjectForTestParams{
|
||||
NodeID: nodeID,
|
||||
@@ -102,7 +103,8 @@ type GetHighlightObjectForTestReturns struct {
|
||||
// Do executes Overlay.getHighlightObjectForTest against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// highlight - Highlight data for the node.
|
||||
//
|
||||
// highlight - Highlight data for the node.
|
||||
func (p *GetHighlightObjectForTestParams) Do(ctx context.Context) (highlight easyjson.RawMessage, err error) {
|
||||
// execute
|
||||
var res GetHighlightObjectForTestReturns
|
||||
@@ -116,7 +118,7 @@ func (p *GetHighlightObjectForTestParams) Do(ctx context.Context) (highlight eas
|
||||
|
||||
// GetGridHighlightObjectsForTestParams for Persistent Grid testing.
|
||||
type GetGridHighlightObjectsForTestParams struct {
|
||||
NodeIds []cdp.NodeID `json:"nodeIds"` // Ids of the node to get highlight object for.
|
||||
NodeIDs []cdp.NodeID `json:"nodeIds"` // Ids of the node to get highlight object for.
|
||||
}
|
||||
|
||||
// GetGridHighlightObjectsForTest for Persistent Grid testing.
|
||||
@@ -124,10 +126,11 @@ type GetGridHighlightObjectsForTestParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-getGridHighlightObjectsForTest
|
||||
//
|
||||
// parameters:
|
||||
// nodeIds - Ids of the node to get highlight object for.
|
||||
func GetGridHighlightObjectsForTest(nodeIds []cdp.NodeID) *GetGridHighlightObjectsForTestParams {
|
||||
//
|
||||
// nodeIDs - Ids of the node to get highlight object for.
|
||||
func GetGridHighlightObjectsForTest(nodeIDs []cdp.NodeID) *GetGridHighlightObjectsForTestParams {
|
||||
return &GetGridHighlightObjectsForTestParams{
|
||||
NodeIds: nodeIds,
|
||||
NodeIDs: nodeIDs,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,7 +142,8 @@ type GetGridHighlightObjectsForTestReturns struct {
|
||||
// Do executes Overlay.getGridHighlightObjectsForTest against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// highlights - Grid Highlight data for the node ids provided.
|
||||
//
|
||||
// highlights - Grid Highlight data for the node ids provided.
|
||||
func (p *GetGridHighlightObjectsForTestParams) Do(ctx context.Context) (highlights easyjson.RawMessage, err error) {
|
||||
// execute
|
||||
var res GetGridHighlightObjectsForTestReturns
|
||||
@@ -162,7 +166,8 @@ type GetSourceOrderHighlightObjectForTestParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-getSourceOrderHighlightObjectForTest
|
||||
//
|
||||
// parameters:
|
||||
// nodeID - Id of the node to highlight.
|
||||
//
|
||||
// nodeID - Id of the node to highlight.
|
||||
func GetSourceOrderHighlightObjectForTest(nodeID cdp.NodeID) *GetSourceOrderHighlightObjectForTestParams {
|
||||
return &GetSourceOrderHighlightObjectForTestParams{
|
||||
NodeID: nodeID,
|
||||
@@ -177,7 +182,8 @@ type GetSourceOrderHighlightObjectForTestReturns struct {
|
||||
// Do executes Overlay.getSourceOrderHighlightObjectForTest against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// highlight - Source order highlight data for the node id provided.
|
||||
//
|
||||
// highlight - Source order highlight data for the node id provided.
|
||||
func (p *GetSourceOrderHighlightObjectForTestParams) Do(ctx context.Context) (highlight easyjson.RawMessage, err error) {
|
||||
// execute
|
||||
var res GetSourceOrderHighlightObjectForTestReturns
|
||||
@@ -204,44 +210,6 @@ func (p *HideHighlightParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandHideHighlight, nil, nil)
|
||||
}
|
||||
|
||||
// HighlightFrameParams highlights owner element of the frame with given id.
|
||||
type HighlightFrameParams struct {
|
||||
FrameID cdp.FrameID `json:"frameId"` // Identifier of the frame to highlight.
|
||||
ContentColor *cdp.RGBA `json:"contentColor,omitempty"` // The content box highlight fill color (default: transparent).
|
||||
ContentOutlineColor *cdp.RGBA `json:"contentOutlineColor,omitempty"` // The content box highlight outline color (default: transparent).
|
||||
}
|
||||
|
||||
// HighlightFrame highlights owner element of the frame with given id.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-highlightFrame
|
||||
//
|
||||
// parameters:
|
||||
// frameID - Identifier of the frame to highlight.
|
||||
func HighlightFrame(frameID cdp.FrameID) *HighlightFrameParams {
|
||||
return &HighlightFrameParams{
|
||||
FrameID: frameID,
|
||||
}
|
||||
}
|
||||
|
||||
// WithContentColor the content box highlight fill color (default:
|
||||
// transparent).
|
||||
func (p HighlightFrameParams) WithContentColor(contentColor *cdp.RGBA) *HighlightFrameParams {
|
||||
p.ContentColor = contentColor
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithContentOutlineColor the content box highlight outline color (default:
|
||||
// transparent).
|
||||
func (p HighlightFrameParams) WithContentOutlineColor(contentOutlineColor *cdp.RGBA) *HighlightFrameParams {
|
||||
p.ContentOutlineColor = contentOutlineColor
|
||||
return &p
|
||||
}
|
||||
|
||||
// Do executes Overlay.highlightFrame against the provided context.
|
||||
func (p *HighlightFrameParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandHighlightFrame, p, nil)
|
||||
}
|
||||
|
||||
// HighlightNodeParams highlights DOM node with given id or with the given
|
||||
// JavaScript object wrapper. Either nodeId or objectId must be specified.
|
||||
type HighlightNodeParams struct {
|
||||
@@ -258,7 +226,8 @@ type HighlightNodeParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-highlightNode
|
||||
//
|
||||
// parameters:
|
||||
// highlightConfig - A descriptor for the highlight appearance.
|
||||
//
|
||||
// highlightConfig - A descriptor for the highlight appearance.
|
||||
func HighlightNode(highlightConfig *HighlightConfig) *HighlightNodeParams {
|
||||
return &HighlightNodeParams{
|
||||
HighlightConfig: highlightConfig,
|
||||
@@ -308,7 +277,8 @@ type HighlightQuadParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-highlightQuad
|
||||
//
|
||||
// parameters:
|
||||
// quad - Quad to highlight
|
||||
//
|
||||
// quad - Quad to highlight
|
||||
func HighlightQuad(quad dom.Quad) *HighlightQuadParams {
|
||||
return &HighlightQuadParams{
|
||||
Quad: quad,
|
||||
@@ -349,10 +319,11 @@ type HighlightRectParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-highlightRect
|
||||
//
|
||||
// parameters:
|
||||
// x - X coordinate
|
||||
// y - Y coordinate
|
||||
// width - Rectangle width
|
||||
// height - Rectangle height
|
||||
//
|
||||
// x - X coordinate
|
||||
// y - Y coordinate
|
||||
// width - Rectangle width
|
||||
// height - Rectangle height
|
||||
func HighlightRect(x int64, y int64, width int64, height int64) *HighlightRectParams {
|
||||
return &HighlightRectParams{
|
||||
X: x,
|
||||
@@ -396,7 +367,8 @@ type HighlightSourceOrderParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-highlightSourceOrder
|
||||
//
|
||||
// parameters:
|
||||
// sourceOrderConfig - A descriptor for the appearance of the overlay drawing.
|
||||
//
|
||||
// sourceOrderConfig - A descriptor for the appearance of the overlay drawing.
|
||||
func HighlightSourceOrder(sourceOrderConfig *SourceOrderConfig) *HighlightSourceOrderParams {
|
||||
return &HighlightSourceOrderParams{
|
||||
SourceOrderConfig: sourceOrderConfig,
|
||||
@@ -441,7 +413,8 @@ type SetInspectModeParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-setInspectMode
|
||||
//
|
||||
// parameters:
|
||||
// mode - Set an inspection mode.
|
||||
//
|
||||
// mode - Set an inspection mode.
|
||||
func SetInspectMode(mode InspectMode) *SetInspectModeParams {
|
||||
return &SetInspectModeParams{
|
||||
Mode: mode,
|
||||
@@ -472,7 +445,8 @@ type SetShowAdHighlightsParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-setShowAdHighlights
|
||||
//
|
||||
// parameters:
|
||||
// show - True for showing ad highlights
|
||||
//
|
||||
// show - True for showing ad highlights
|
||||
func SetShowAdHighlights(show bool) *SetShowAdHighlightsParams {
|
||||
return &SetShowAdHighlightsParams{
|
||||
Show: show,
|
||||
@@ -521,7 +495,8 @@ type SetShowDebugBordersParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-setShowDebugBorders
|
||||
//
|
||||
// parameters:
|
||||
// show - True for showing debug borders
|
||||
//
|
||||
// show - True for showing debug borders
|
||||
func SetShowDebugBorders(show bool) *SetShowDebugBordersParams {
|
||||
return &SetShowDebugBordersParams{
|
||||
Show: show,
|
||||
@@ -543,7 +518,8 @@ type SetShowFPSCounterParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-setShowFPSCounter
|
||||
//
|
||||
// parameters:
|
||||
// show - True for showing the FPS counter
|
||||
//
|
||||
// show - True for showing the FPS counter
|
||||
func SetShowFPSCounter(show bool) *SetShowFPSCounterParams {
|
||||
return &SetShowFPSCounterParams{
|
||||
Show: show,
|
||||
@@ -566,7 +542,8 @@ type SetShowGridOverlaysParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-setShowGridOverlays
|
||||
//
|
||||
// parameters:
|
||||
// gridNodeHighlightConfigs - An array of node identifiers and descriptors for the highlight appearance.
|
||||
//
|
||||
// gridNodeHighlightConfigs - An array of node identifiers and descriptors for the highlight appearance.
|
||||
func SetShowGridOverlays(gridNodeHighlightConfigs []*GridNodeHighlightConfig) *SetShowGridOverlaysParams {
|
||||
return &SetShowGridOverlaysParams{
|
||||
GridNodeHighlightConfigs: gridNodeHighlightConfigs,
|
||||
@@ -588,7 +565,8 @@ type SetShowFlexOverlaysParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-setShowFlexOverlays
|
||||
//
|
||||
// parameters:
|
||||
// flexNodeHighlightConfigs - An array of node identifiers and descriptors for the highlight appearance.
|
||||
//
|
||||
// flexNodeHighlightConfigs - An array of node identifiers and descriptors for the highlight appearance.
|
||||
func SetShowFlexOverlays(flexNodeHighlightConfigs []*FlexNodeHighlightConfig) *SetShowFlexOverlaysParams {
|
||||
return &SetShowFlexOverlaysParams{
|
||||
FlexNodeHighlightConfigs: flexNodeHighlightConfigs,
|
||||
@@ -610,7 +588,8 @@ type SetShowScrollSnapOverlaysParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-setShowScrollSnapOverlays
|
||||
//
|
||||
// parameters:
|
||||
// scrollSnapHighlightConfigs - An array of node identifiers and descriptors for the highlight appearance.
|
||||
//
|
||||
// scrollSnapHighlightConfigs - An array of node identifiers and descriptors for the highlight appearance.
|
||||
func SetShowScrollSnapOverlays(scrollSnapHighlightConfigs []*ScrollSnapHighlightConfig) *SetShowScrollSnapOverlaysParams {
|
||||
return &SetShowScrollSnapOverlaysParams{
|
||||
ScrollSnapHighlightConfigs: scrollSnapHighlightConfigs,
|
||||
@@ -622,6 +601,29 @@ func (p *SetShowScrollSnapOverlaysParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandSetShowScrollSnapOverlays, p, nil)
|
||||
}
|
||||
|
||||
// SetShowContainerQueryOverlaysParams [no description].
|
||||
type SetShowContainerQueryOverlaysParams struct {
|
||||
ContainerQueryHighlightConfigs []*ContainerQueryHighlightConfig `json:"containerQueryHighlightConfigs"` // An array of node identifiers and descriptors for the highlight appearance.
|
||||
}
|
||||
|
||||
// SetShowContainerQueryOverlays [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-setShowContainerQueryOverlays
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// containerQueryHighlightConfigs - An array of node identifiers and descriptors for the highlight appearance.
|
||||
func SetShowContainerQueryOverlays(containerQueryHighlightConfigs []*ContainerQueryHighlightConfig) *SetShowContainerQueryOverlaysParams {
|
||||
return &SetShowContainerQueryOverlaysParams{
|
||||
ContainerQueryHighlightConfigs: containerQueryHighlightConfigs,
|
||||
}
|
||||
}
|
||||
|
||||
// Do executes Overlay.setShowContainerQueryOverlays against the provided context.
|
||||
func (p *SetShowContainerQueryOverlaysParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandSetShowContainerQueryOverlays, p, nil)
|
||||
}
|
||||
|
||||
// SetShowPaintRectsParams requests that backend shows paint rectangles.
|
||||
type SetShowPaintRectsParams struct {
|
||||
Result bool `json:"result"` // True for showing paint rectangles
|
||||
@@ -632,7 +634,8 @@ type SetShowPaintRectsParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-setShowPaintRects
|
||||
//
|
||||
// parameters:
|
||||
// result - True for showing paint rectangles
|
||||
//
|
||||
// result - True for showing paint rectangles
|
||||
func SetShowPaintRects(result bool) *SetShowPaintRectsParams {
|
||||
return &SetShowPaintRectsParams{
|
||||
Result: result,
|
||||
@@ -656,7 +659,8 @@ type SetShowLayoutShiftRegionsParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-setShowLayoutShiftRegions
|
||||
//
|
||||
// parameters:
|
||||
// result - True for showing layout shift regions
|
||||
//
|
||||
// result - True for showing layout shift regions
|
||||
func SetShowLayoutShiftRegions(result bool) *SetShowLayoutShiftRegionsParams {
|
||||
return &SetShowLayoutShiftRegionsParams{
|
||||
Result: result,
|
||||
@@ -680,7 +684,8 @@ type SetShowScrollBottleneckRectsParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-setShowScrollBottleneckRects
|
||||
//
|
||||
// parameters:
|
||||
// show - True for showing scroll bottleneck rects
|
||||
//
|
||||
// show - True for showing scroll bottleneck rects
|
||||
func SetShowScrollBottleneckRects(show bool) *SetShowScrollBottleneckRectsParams {
|
||||
return &SetShowScrollBottleneckRectsParams{
|
||||
Show: show,
|
||||
@@ -692,30 +697,6 @@ func (p *SetShowScrollBottleneckRectsParams) Do(ctx context.Context) (err error)
|
||||
return cdp.Execute(ctx, CommandSetShowScrollBottleneckRects, p, nil)
|
||||
}
|
||||
|
||||
// SetShowHitTestBordersParams requests that backend shows hit-test borders
|
||||
// on layers.
|
||||
type SetShowHitTestBordersParams struct {
|
||||
Show bool `json:"show"` // True for showing hit-test borders
|
||||
}
|
||||
|
||||
// SetShowHitTestBorders requests that backend shows hit-test borders on
|
||||
// layers.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-setShowHitTestBorders
|
||||
//
|
||||
// parameters:
|
||||
// show - True for showing hit-test borders
|
||||
func SetShowHitTestBorders(show bool) *SetShowHitTestBordersParams {
|
||||
return &SetShowHitTestBordersParams{
|
||||
Show: show,
|
||||
}
|
||||
}
|
||||
|
||||
// Do executes Overlay.setShowHitTestBorders against the provided context.
|
||||
func (p *SetShowHitTestBordersParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandSetShowHitTestBorders, p, nil)
|
||||
}
|
||||
|
||||
// SetShowWebVitalsParams request that backend shows an overlay with web
|
||||
// vital metrics.
|
||||
type SetShowWebVitalsParams struct {
|
||||
@@ -728,7 +709,8 @@ type SetShowWebVitalsParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-setShowWebVitals
|
||||
//
|
||||
// parameters:
|
||||
// show
|
||||
//
|
||||
// show
|
||||
func SetShowWebVitals(show bool) *SetShowWebVitalsParams {
|
||||
return &SetShowWebVitalsParams{
|
||||
Show: show,
|
||||
@@ -751,7 +733,8 @@ type SetShowViewportSizeOnResizeParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-setShowViewportSizeOnResize
|
||||
//
|
||||
// parameters:
|
||||
// show - Whether to paint size or not.
|
||||
//
|
||||
// show - Whether to paint size or not.
|
||||
func SetShowViewportSizeOnResize(show bool) *SetShowViewportSizeOnResizeParams {
|
||||
return &SetShowViewportSizeOnResizeParams{
|
||||
Show: show,
|
||||
@@ -788,6 +771,30 @@ func (p *SetShowHingeParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandSetShowHinge, p, nil)
|
||||
}
|
||||
|
||||
// SetShowIsolatedElementsParams show elements in isolation mode with
|
||||
// overlays.
|
||||
type SetShowIsolatedElementsParams struct {
|
||||
IsolatedElementHighlightConfigs []*IsolatedElementHighlightConfig `json:"isolatedElementHighlightConfigs"` // An array of node identifiers and descriptors for the highlight appearance.
|
||||
}
|
||||
|
||||
// SetShowIsolatedElements show elements in isolation mode with overlays.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#method-setShowIsolatedElements
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// isolatedElementHighlightConfigs - An array of node identifiers and descriptors for the highlight appearance.
|
||||
func SetShowIsolatedElements(isolatedElementHighlightConfigs []*IsolatedElementHighlightConfig) *SetShowIsolatedElementsParams {
|
||||
return &SetShowIsolatedElementsParams{
|
||||
IsolatedElementHighlightConfigs: isolatedElementHighlightConfigs,
|
||||
}
|
||||
}
|
||||
|
||||
// Do executes Overlay.setShowIsolatedElements against the provided context.
|
||||
func (p *SetShowIsolatedElementsParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandSetShowIsolatedElements, p, nil)
|
||||
}
|
||||
|
||||
// Command names.
|
||||
const (
|
||||
CommandDisable = "Overlay.disable"
|
||||
@@ -796,7 +803,6 @@ const (
|
||||
CommandGetGridHighlightObjectsForTest = "Overlay.getGridHighlightObjectsForTest"
|
||||
CommandGetSourceOrderHighlightObjectForTest = "Overlay.getSourceOrderHighlightObjectForTest"
|
||||
CommandHideHighlight = "Overlay.hideHighlight"
|
||||
CommandHighlightFrame = "Overlay.highlightFrame"
|
||||
CommandHighlightNode = "Overlay.highlightNode"
|
||||
CommandHighlightQuad = "Overlay.highlightQuad"
|
||||
CommandHighlightRect = "Overlay.highlightRect"
|
||||
@@ -809,11 +815,12 @@ const (
|
||||
CommandSetShowGridOverlays = "Overlay.setShowGridOverlays"
|
||||
CommandSetShowFlexOverlays = "Overlay.setShowFlexOverlays"
|
||||
CommandSetShowScrollSnapOverlays = "Overlay.setShowScrollSnapOverlays"
|
||||
CommandSetShowContainerQueryOverlays = "Overlay.setShowContainerQueryOverlays"
|
||||
CommandSetShowPaintRects = "Overlay.setShowPaintRects"
|
||||
CommandSetShowLayoutShiftRegions = "Overlay.setShowLayoutShiftRegions"
|
||||
CommandSetShowScrollBottleneckRects = "Overlay.setShowScrollBottleneckRects"
|
||||
CommandSetShowHitTestBorders = "Overlay.setShowHitTestBorders"
|
||||
CommandSetShowWebVitals = "Overlay.setShowWebVitals"
|
||||
CommandSetShowViewportSizeOnResize = "Overlay.setShowViewportSizeOnResize"
|
||||
CommandSetShowHinge = "Overlay.setShowHinge"
|
||||
CommandSetShowIsolatedElements = "Overlay.setShowIsolatedElements"
|
||||
)
|
||||
|
||||
95
vendor/github.com/chromedp/cdproto/overlay/types.go
generated
vendored
95
vendor/github.com/chromedp/cdproto/overlay/types.go
generated
vendored
@@ -3,7 +3,7 @@ package overlay
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/chromedp/cdproto/cdp"
|
||||
"github.com/chromedp/cdproto/dom"
|
||||
@@ -116,7 +116,8 @@ func (t ContrastAlgorithm) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ContrastAlgorithm) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ContrastAlgorithm(in.String()) {
|
||||
v := in.String()
|
||||
switch ContrastAlgorithm(v) {
|
||||
case ContrastAlgorithmAa:
|
||||
*t = ContrastAlgorithmAa
|
||||
case ContrastAlgorithmAaa:
|
||||
@@ -125,7 +126,7 @@ func (t *ContrastAlgorithm) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = ContrastAlgorithmApca
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ContrastAlgorithm value"))
|
||||
in.AddError(fmt.Errorf("unknown ContrastAlgorithm value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,24 +139,25 @@ func (t *ContrastAlgorithm) UnmarshalJSON(buf []byte) error {
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#type-HighlightConfig
|
||||
type HighlightConfig struct {
|
||||
ShowInfo bool `json:"showInfo,omitempty"` // Whether the node info tooltip should be shown (default: false).
|
||||
ShowStyles bool `json:"showStyles,omitempty"` // Whether the node styles in the tooltip (default: false).
|
||||
ShowRulers bool `json:"showRulers,omitempty"` // Whether the rulers should be shown (default: false).
|
||||
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 *cdp.RGBA `json:"contentColor,omitempty"` // The content box highlight fill color (default: transparent).
|
||||
PaddingColor *cdp.RGBA `json:"paddingColor,omitempty"` // The padding highlight fill color (default: transparent).
|
||||
BorderColor *cdp.RGBA `json:"borderColor,omitempty"` // The border highlight fill color (default: transparent).
|
||||
MarginColor *cdp.RGBA `json:"marginColor,omitempty"` // The margin highlight fill color (default: transparent).
|
||||
EventTargetColor *cdp.RGBA `json:"eventTargetColor,omitempty"` // The event target element highlight fill color (default: transparent).
|
||||
ShapeColor *cdp.RGBA `json:"shapeColor,omitempty"` // The shape outside fill color (default: transparent).
|
||||
ShapeMarginColor *cdp.RGBA `json:"shapeMarginColor,omitempty"` // The shape margin fill color (default: transparent).
|
||||
CSSGridColor *cdp.RGBA `json:"cssGridColor,omitempty"` // The grid layout color (default: transparent).
|
||||
ColorFormat ColorFormat `json:"colorFormat,omitempty"` // The color format used to format color styles (default: hex).
|
||||
GridHighlightConfig *GridHighlightConfig `json:"gridHighlightConfig,omitempty"` // The grid layout highlight configuration (default: all transparent).
|
||||
FlexContainerHighlightConfig *FlexContainerHighlightConfig `json:"flexContainerHighlightConfig,omitempty"` // The flex container highlight configuration (default: all transparent).
|
||||
FlexItemHighlightConfig *FlexItemHighlightConfig `json:"flexItemHighlightConfig,omitempty"` // The flex item highlight configuration (default: all transparent).
|
||||
ContrastAlgorithm ContrastAlgorithm `json:"contrastAlgorithm,omitempty"` // The contrast algorithm to use for the contrast ratio (default: aa).
|
||||
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 *cdp.RGBA `json:"contentColor,omitempty"` // The content box highlight fill color (default: transparent).
|
||||
PaddingColor *cdp.RGBA `json:"paddingColor,omitempty"` // The padding highlight fill color (default: transparent).
|
||||
BorderColor *cdp.RGBA `json:"borderColor,omitempty"` // The border highlight fill color (default: transparent).
|
||||
MarginColor *cdp.RGBA `json:"marginColor,omitempty"` // The margin highlight fill color (default: transparent).
|
||||
EventTargetColor *cdp.RGBA `json:"eventTargetColor,omitempty"` // The event target element highlight fill color (default: transparent).
|
||||
ShapeColor *cdp.RGBA `json:"shapeColor,omitempty"` // The shape outside fill color (default: transparent).
|
||||
ShapeMarginColor *cdp.RGBA `json:"shapeMarginColor,omitempty"` // The shape margin fill color (default: transparent).
|
||||
CSSGridColor *cdp.RGBA `json:"cssGridColor,omitempty"` // The grid layout color (default: transparent).
|
||||
ColorFormat ColorFormat `json:"colorFormat,omitempty"` // The color format used to format color styles (default: hex).
|
||||
GridHighlightConfig *GridHighlightConfig `json:"gridHighlightConfig,omitempty"` // The grid layout highlight configuration (default: all transparent).
|
||||
FlexContainerHighlightConfig *FlexContainerHighlightConfig `json:"flexContainerHighlightConfig,omitempty"` // The flex container highlight configuration (default: all transparent).
|
||||
FlexItemHighlightConfig *FlexItemHighlightConfig `json:"flexItemHighlightConfig,omitempty"` // The flex item highlight configuration (default: all transparent).
|
||||
ContrastAlgorithm ContrastAlgorithm `json:"contrastAlgorithm,omitempty"` // The contrast algorithm to use for the contrast ratio (default: aa).
|
||||
ContainerQueryContainerHighlightConfig *ContainerQueryContainerHighlightConfig `json:"containerQueryContainerHighlightConfig,omitempty"` // The container query container highlight configuration (default: all transparent).
|
||||
}
|
||||
|
||||
// ColorFormat [no description].
|
||||
@@ -172,6 +174,7 @@ func (t ColorFormat) String() string {
|
||||
const (
|
||||
ColorFormatRgb ColorFormat = "rgb"
|
||||
ColorFormatHsl ColorFormat = "hsl"
|
||||
ColorFormatHwb ColorFormat = "hwb"
|
||||
ColorFormatHex ColorFormat = "hex"
|
||||
)
|
||||
|
||||
@@ -187,16 +190,19 @@ func (t ColorFormat) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *ColorFormat) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch ColorFormat(in.String()) {
|
||||
v := in.String()
|
||||
switch ColorFormat(v) {
|
||||
case ColorFormatRgb:
|
||||
*t = ColorFormatRgb
|
||||
case ColorFormatHsl:
|
||||
*t = ColorFormatHsl
|
||||
case ColorFormatHwb:
|
||||
*t = ColorFormatHwb
|
||||
case ColorFormatHex:
|
||||
*t = ColorFormatHex
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown ColorFormat value"))
|
||||
in.AddError(fmt.Errorf("unknown ColorFormat value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -248,6 +254,39 @@ type HingeConfig struct {
|
||||
OutlineColor *cdp.RGBA `json:"outlineColor,omitempty"` // The content box highlight outline color (default: transparent).
|
||||
}
|
||||
|
||||
// ContainerQueryHighlightConfig [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#type-ContainerQueryHighlightConfig
|
||||
type ContainerQueryHighlightConfig struct {
|
||||
ContainerQueryContainerHighlightConfig *ContainerQueryContainerHighlightConfig `json:"containerQueryContainerHighlightConfig"` // A descriptor for the highlight appearance of container query containers.
|
||||
NodeID cdp.NodeID `json:"nodeId"` // Identifier of the container node to highlight.
|
||||
}
|
||||
|
||||
// ContainerQueryContainerHighlightConfig [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#type-ContainerQueryContainerHighlightConfig
|
||||
type ContainerQueryContainerHighlightConfig struct {
|
||||
ContainerBorder *LineStyle `json:"containerBorder,omitempty"` // The style of the container border.
|
||||
DescendantBorder *LineStyle `json:"descendantBorder,omitempty"` // The style of the descendants' borders.
|
||||
}
|
||||
|
||||
// IsolatedElementHighlightConfig [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#type-IsolatedElementHighlightConfig
|
||||
type IsolatedElementHighlightConfig struct {
|
||||
IsolationModeHighlightConfig *IsolationModeHighlightConfig `json:"isolationModeHighlightConfig"` // A descriptor for the highlight appearance of an element in isolation mode.
|
||||
NodeID cdp.NodeID `json:"nodeId"` // Identifier of the isolated element to highlight.
|
||||
}
|
||||
|
||||
// IsolationModeHighlightConfig [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#type-IsolationModeHighlightConfig
|
||||
type IsolationModeHighlightConfig struct {
|
||||
ResizerColor *cdp.RGBA `json:"resizerColor,omitempty"` // The fill color of the resizers (default: transparent).
|
||||
ResizerHandleColor *cdp.RGBA `json:"resizerHandleColor,omitempty"` // The fill color for resizer handles (default: transparent).
|
||||
MaskColor *cdp.RGBA `json:"maskColor,omitempty"` // The fill color for the mask covering non-isolated elements (default: transparent).
|
||||
}
|
||||
|
||||
// InspectMode [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Overlay#type-InspectMode
|
||||
@@ -279,7 +318,8 @@ func (t InspectMode) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *InspectMode) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch InspectMode(in.String()) {
|
||||
v := in.String()
|
||||
switch InspectMode(v) {
|
||||
case InspectModeSearchForNode:
|
||||
*t = InspectModeSearchForNode
|
||||
case InspectModeSearchForUAShadowDOM:
|
||||
@@ -292,7 +332,7 @@ func (t *InspectMode) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = InspectModeNone
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown InspectMode value"))
|
||||
in.AddError(fmt.Errorf("unknown InspectMode value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -329,14 +369,15 @@ func (t LineStylePattern) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *LineStylePattern) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch LineStylePattern(in.String()) {
|
||||
v := in.String()
|
||||
switch LineStylePattern(v) {
|
||||
case LineStylePatternDashed:
|
||||
*t = LineStylePatternDashed
|
||||
case LineStylePatternDotted:
|
||||
*t = LineStylePatternDotted
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown LineStylePattern value"))
|
||||
in.AddError(fmt.Errorf("unknown LineStylePattern value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
2229
vendor/github.com/chromedp/cdproto/page/easyjson.go
generated
vendored
2229
vendor/github.com/chromedp/cdproto/page/easyjson.go
generated
vendored
File diff suppressed because it is too large
Load Diff
24
vendor/github.com/chromedp/cdproto/page/events.go
generated
vendored
24
vendor/github.com/chromedp/cdproto/page/events.go
generated
vendored
@@ -19,9 +19,9 @@ type EventDomContentEventFired struct {
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-fileChooserOpened
|
||||
type EventFileChooserOpened struct {
|
||||
FrameID cdp.FrameID `json:"frameId"` // Id of the frame containing input node.
|
||||
BackendNodeID cdp.BackendNodeID `json:"backendNodeId"` // Input node id.
|
||||
Mode FileChooserOpenedMode `json:"mode"` // Input mode.
|
||||
FrameID cdp.FrameID `json:"frameId"` // Id of the frame containing input node.
|
||||
Mode FileChooserOpenedMode `json:"mode"` // Input mode.
|
||||
BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty"` // Input node id. Only present for file choosers opened via an <input type="file"> element.
|
||||
}
|
||||
|
||||
// EventFrameAttached fired when frame has been attached to its parent.
|
||||
@@ -137,9 +137,21 @@ type EventLifecycleEvent struct {
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-backForwardCacheNotUsed
|
||||
type EventBackForwardCacheNotUsed struct {
|
||||
LoaderID cdp.LoaderID `json:"loaderId"` // The loader id for the associated navgation.
|
||||
FrameID cdp.FrameID `json:"frameId"` // The frame id of the associated frame.
|
||||
NotRestoredExplanations []*BackForwardCacheNotRestoredExplanation `json:"notRestoredExplanations"` // Array of reasons why the page could not be cached. This must not be empty.
|
||||
LoaderID cdp.LoaderID `json:"loaderId"` // The loader id for the associated navgation.
|
||||
FrameID cdp.FrameID `json:"frameId"` // The frame id of the associated frame.
|
||||
NotRestoredExplanations []*BackForwardCacheNotRestoredExplanation `json:"notRestoredExplanations"` // Array of reasons why the page could not be cached. This must not be empty.
|
||||
NotRestoredExplanationsTree *BackForwardCacheNotRestoredExplanationTree `json:"notRestoredExplanationsTree,omitempty"` // Tree structure of reasons why the page could not be cached for each frame.
|
||||
}
|
||||
|
||||
// EventPrerenderAttemptCompleted fired when a prerender attempt is
|
||||
// completed.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#event-prerenderAttemptCompleted
|
||||
type EventPrerenderAttemptCompleted struct {
|
||||
InitiatingFrameID cdp.FrameID `json:"initiatingFrameId"` // The frame id of the frame initiating prerendering.
|
||||
PrerenderingURL string `json:"prerenderingUrl"`
|
||||
FinalStatus PrerenderFinalStatus `json:"finalStatus"`
|
||||
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
|
||||
}
|
||||
|
||||
// EventLoadEventFired [no description].
|
||||
|
||||
413
vendor/github.com/chromedp/cdproto/page/page.go
generated
vendored
413
vendor/github.com/chromedp/cdproto/page/page.go
generated
vendored
@@ -34,7 +34,8 @@ type AddScriptToEvaluateOnNewDocumentParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-addScriptToEvaluateOnNewDocument
|
||||
//
|
||||
// parameters:
|
||||
// source
|
||||
//
|
||||
// source
|
||||
func AddScriptToEvaluateOnNewDocument(source string) *AddScriptToEvaluateOnNewDocumentParams {
|
||||
return &AddScriptToEvaluateOnNewDocumentParams{
|
||||
Source: source,
|
||||
@@ -64,7 +65,8 @@ type AddScriptToEvaluateOnNewDocumentReturns struct {
|
||||
// Do executes Page.addScriptToEvaluateOnNewDocument against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// identifier - Identifier of the added script.
|
||||
//
|
||||
// identifier - Identifier of the added script.
|
||||
func (p *AddScriptToEvaluateOnNewDocumentParams) Do(ctx context.Context) (identifier ScriptIdentifier, err error) {
|
||||
// execute
|
||||
var res AddScriptToEvaluateOnNewDocumentReturns
|
||||
@@ -98,6 +100,7 @@ type CaptureScreenshotParams struct {
|
||||
Clip *Viewport `json:"clip,omitempty"` // Capture the screenshot of a given region only.
|
||||
FromSurface bool `json:"fromSurface,omitempty"` // Capture the screenshot from the surface, rather than the view. Defaults to true.
|
||||
CaptureBeyondViewport bool `json:"captureBeyondViewport,omitempty"` // Capture the screenshot beyond the viewport. Defaults to false.
|
||||
OptimizeForSpeed bool `json:"optimizeForSpeed,omitempty"` // Optimize image encoding for speed, not for resulting size (defaults to false)
|
||||
}
|
||||
|
||||
// CaptureScreenshot capture page screenshot.
|
||||
@@ -141,6 +144,13 @@ func (p CaptureScreenshotParams) WithCaptureBeyondViewport(captureBeyondViewport
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithOptimizeForSpeed optimize image encoding for speed, not for resulting
|
||||
// size (defaults to false).
|
||||
func (p CaptureScreenshotParams) WithOptimizeForSpeed(optimizeForSpeed bool) *CaptureScreenshotParams {
|
||||
p.OptimizeForSpeed = optimizeForSpeed
|
||||
return &p
|
||||
}
|
||||
|
||||
// CaptureScreenshotReturns return values.
|
||||
type CaptureScreenshotReturns struct {
|
||||
Data string `json:"data,omitempty"` // Base64-encoded image data.
|
||||
@@ -149,7 +159,8 @@ type CaptureScreenshotReturns struct {
|
||||
// Do executes Page.captureScreenshot against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// data - Base64-encoded image data.
|
||||
//
|
||||
// data - Base64-encoded image data.
|
||||
func (p *CaptureScreenshotParams) Do(ctx context.Context) (data []byte, err error) {
|
||||
// execute
|
||||
var res CaptureScreenshotReturns
|
||||
@@ -199,7 +210,8 @@ type CaptureSnapshotReturns struct {
|
||||
// Do executes Page.captureSnapshot against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// data - Serialized page data.
|
||||
//
|
||||
// data - Serialized page data.
|
||||
func (p *CaptureSnapshotParams) Do(ctx context.Context) (data string, err error) {
|
||||
// execute
|
||||
var res CaptureSnapshotReturns
|
||||
@@ -223,7 +235,8 @@ type CreateIsolatedWorldParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-createIsolatedWorld
|
||||
//
|
||||
// parameters:
|
||||
// frameID - Id of the frame in which the isolated world should be created.
|
||||
//
|
||||
// frameID - Id of the frame in which the isolated world should be created.
|
||||
func CreateIsolatedWorld(frameID cdp.FrameID) *CreateIsolatedWorldParams {
|
||||
return &CreateIsolatedWorldParams{
|
||||
FrameID: frameID,
|
||||
@@ -251,7 +264,8 @@ type CreateIsolatedWorldReturns struct {
|
||||
// Do executes Page.createIsolatedWorld against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// executionContextID - Execution context of the isolated world.
|
||||
//
|
||||
// executionContextID - Execution context of the isolated world.
|
||||
func (p *CreateIsolatedWorldParams) Do(ctx context.Context) (executionContextID runtime.ExecutionContextID, err error) {
|
||||
// execute
|
||||
var res CreateIsolatedWorldReturns
|
||||
@@ -314,10 +328,11 @@ type GetAppManifestReturns struct {
|
||||
// Do executes Page.getAppManifest against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// url - Manifest location.
|
||||
// errors
|
||||
// data - Manifest content.
|
||||
// parsed - Parsed manifest properties
|
||||
//
|
||||
// url - Manifest location.
|
||||
// errors
|
||||
// data - Manifest content.
|
||||
// parsed - Parsed manifest properties
|
||||
func (p *GetAppManifestParams) Do(ctx context.Context) (url string, errors []*AppManifestError, data string, parsed *AppManifestParsedProperties, err error) {
|
||||
// execute
|
||||
var res GetAppManifestReturns
|
||||
@@ -347,7 +362,8 @@ type GetInstallabilityErrorsReturns struct {
|
||||
// Do executes Page.getInstallabilityErrors against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// installabilityErrors
|
||||
//
|
||||
// installabilityErrors
|
||||
func (p *GetInstallabilityErrorsParams) Do(ctx context.Context) (installabilityErrors []*InstallabilityError, err error) {
|
||||
// execute
|
||||
var res GetInstallabilityErrorsReturns
|
||||
@@ -377,7 +393,8 @@ type GetManifestIconsReturns struct {
|
||||
// Do executes Page.getManifestIcons against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// primaryIcon
|
||||
//
|
||||
// primaryIcon
|
||||
func (p *GetManifestIconsParams) Do(ctx context.Context) (primaryIcon []byte, err error) {
|
||||
// execute
|
||||
var res GetManifestIconsReturns
|
||||
@@ -395,6 +412,80 @@ func (p *GetManifestIconsParams) Do(ctx context.Context) (primaryIcon []byte, er
|
||||
return dec, nil
|
||||
}
|
||||
|
||||
// GetAppIDParams returns the unique (PWA) app id. Only returns values if the
|
||||
// feature flag 'WebAppEnableManifestId' is enabled.
|
||||
type GetAppIDParams struct{}
|
||||
|
||||
// GetAppID returns the unique (PWA) app id. Only returns values if the
|
||||
// feature flag 'WebAppEnableManifestId' is enabled.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-getAppId
|
||||
func GetAppID() *GetAppIDParams {
|
||||
return &GetAppIDParams{}
|
||||
}
|
||||
|
||||
// GetAppIDReturns return values.
|
||||
type GetAppIDReturns struct {
|
||||
AppID string `json:"appId,omitempty"` // App id, either from manifest's id attribute or computed from start_url
|
||||
RecommendedID string `json:"recommendedId,omitempty"` // Recommendation for manifest's id attribute to match current id computed from start_url
|
||||
}
|
||||
|
||||
// Do executes Page.getAppId against the provided context.
|
||||
//
|
||||
// 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 (p *GetAppIDParams) Do(ctx context.Context) (appID string, recommendedID string, err error) {
|
||||
// execute
|
||||
var res GetAppIDReturns
|
||||
err = cdp.Execute(ctx, CommandGetAppID, nil, &res)
|
||||
if err != nil {
|
||||
return "", "", err
|
||||
}
|
||||
|
||||
return res.AppID, res.RecommendedID, nil
|
||||
}
|
||||
|
||||
// GetAdScriptIDParams [no description].
|
||||
type GetAdScriptIDParams struct {
|
||||
FrameID cdp.FrameID `json:"frameId"`
|
||||
}
|
||||
|
||||
// GetAdScriptID [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-getAdScriptId
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// frameID
|
||||
func GetAdScriptID(frameID cdp.FrameID) *GetAdScriptIDParams {
|
||||
return &GetAdScriptIDParams{
|
||||
FrameID: frameID,
|
||||
}
|
||||
}
|
||||
|
||||
// GetAdScriptIDReturns return values.
|
||||
type GetAdScriptIDReturns struct {
|
||||
AdScriptID *AdScriptID `json:"adScriptId,omitempty"` // 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.
|
||||
}
|
||||
|
||||
// Do executes Page.getAdScriptId against the provided context.
|
||||
//
|
||||
// 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 (p *GetAdScriptIDParams) Do(ctx context.Context) (adScriptID *AdScriptID, err error) {
|
||||
// execute
|
||||
var res GetAdScriptIDReturns
|
||||
err = cdp.Execute(ctx, CommandGetAdScriptID, p, &res)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return res.AdScriptID, nil
|
||||
}
|
||||
|
||||
// GetFrameTreeParams returns present frame tree structure.
|
||||
type GetFrameTreeParams struct{}
|
||||
|
||||
@@ -413,7 +504,8 @@ type GetFrameTreeReturns struct {
|
||||
// Do executes Page.getFrameTree against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// frameTree - Present frame tree structure.
|
||||
//
|
||||
// frameTree - Present frame tree structure.
|
||||
func (p *GetFrameTreeParams) Do(ctx context.Context) (frameTree *FrameTree, err error) {
|
||||
// execute
|
||||
var res GetFrameTreeReturns
|
||||
@@ -439,9 +531,9 @@ func GetLayoutMetrics() *GetLayoutMetricsParams {
|
||||
|
||||
// GetLayoutMetricsReturns return values.
|
||||
type GetLayoutMetricsReturns struct {
|
||||
LayoutViewport *LayoutViewport `json:"layoutViewport"` // Deprecated metrics relating to the layout viewport. Can be in DP or in CSS pixels depending on the enable-use-zoom-for-dsf flag. Use cssLayoutViewport instead.
|
||||
VisualViewport *VisualViewport `json:"visualViewport"` // Deprecated metrics relating to the visual viewport. Can be in DP or in CSS pixels depending on the enable-use-zoom-for-dsf flag. Use cssVisualViewport instead.
|
||||
ContentSize *dom.Rect `json:"contentSize"` // Deprecated size of scrollable area. Can be in DP or in CSS pixels depending on the enable-use-zoom-for-dsf flag. Use cssContentSize instead.
|
||||
LayoutViewport *LayoutViewport `json:"layoutViewport"` // Deprecated metrics relating to the layout viewport. Is in device pixels. Use cssLayoutViewport instead.
|
||||
VisualViewport *VisualViewport `json:"visualViewport"` // Deprecated metrics relating to the visual viewport. Is in device pixels. Use cssVisualViewport instead.
|
||||
ContentSize *dom.Rect `json:"contentSize"` // Deprecated size of scrollable area. Is in DP. Use cssContentSize instead.
|
||||
CSSLayoutViewport *LayoutViewport `json:"cssLayoutViewport"` // Metrics relating to the layout viewport in CSS pixels.
|
||||
CSSVisualViewport *VisualViewport `json:"cssVisualViewport"` // Metrics relating to the visual viewport in CSS pixels.
|
||||
CSSContentSize *dom.Rect `json:"cssContentSize"` // Size of scrollable area in CSS pixels.
|
||||
@@ -450,12 +542,13 @@ type GetLayoutMetricsReturns struct {
|
||||
// Do executes Page.getLayoutMetrics against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// layoutViewport - Deprecated metrics relating to the layout viewport. Can be in DP or in CSS pixels depending on the enable-use-zoom-for-dsf flag. Use cssLayoutViewport instead.
|
||||
// visualViewport - Deprecated metrics relating to the visual viewport. Can be in DP or in CSS pixels depending on the enable-use-zoom-for-dsf flag. Use cssVisualViewport instead.
|
||||
// contentSize - Deprecated size of scrollable area. Can be in DP or in CSS pixels depending on the enable-use-zoom-for-dsf flag. 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.
|
||||
//
|
||||
// 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 (p *GetLayoutMetricsParams) Do(ctx context.Context) (layoutViewport *LayoutViewport, visualViewport *VisualViewport, contentSize *dom.Rect, cssLayoutViewport *LayoutViewport, cssVisualViewport *VisualViewport, cssContentSize *dom.Rect, err error) {
|
||||
// execute
|
||||
var res GetLayoutMetricsReturns
|
||||
@@ -487,8 +580,9 @@ type GetNavigationHistoryReturns struct {
|
||||
// Do executes Page.getNavigationHistory against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// currentIndex - Index of the current navigation history entry.
|
||||
// entries - Array of navigation history entries.
|
||||
//
|
||||
// currentIndex - Index of the current navigation history entry.
|
||||
// entries - Array of navigation history entries.
|
||||
func (p *GetNavigationHistoryParams) Do(ctx context.Context) (currentIndex int64, entries []*NavigationEntry, err error) {
|
||||
// execute
|
||||
var res GetNavigationHistoryReturns
|
||||
@@ -527,8 +621,9 @@ type GetResourceContentParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-getResourceContent
|
||||
//
|
||||
// parameters:
|
||||
// frameID - Frame id to get resource for.
|
||||
// url - URL of the resource to get content for.
|
||||
//
|
||||
// frameID - Frame id to get resource for.
|
||||
// url - URL of the resource to get content for.
|
||||
func GetResourceContent(frameID cdp.FrameID, url string) *GetResourceContentParams {
|
||||
return &GetResourceContentParams{
|
||||
FrameID: frameID,
|
||||
@@ -545,7 +640,8 @@ type GetResourceContentReturns struct {
|
||||
// Do executes Page.getResourceContent against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// content - Resource content.
|
||||
//
|
||||
// content - Resource content.
|
||||
func (p *GetResourceContentParams) Do(ctx context.Context) (content []byte, err error) {
|
||||
// execute
|
||||
var res GetResourceContentReturns
|
||||
@@ -585,7 +681,8 @@ type GetResourceTreeReturns struct {
|
||||
// Do executes Page.getResourceTree against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// frameTree - Present frame / resource tree structure.
|
||||
//
|
||||
// frameTree - Present frame / resource tree structure.
|
||||
func (p *GetResourceTreeParams) Do(ctx context.Context) (frameTree *FrameResourceTree, err error) {
|
||||
// execute
|
||||
var res GetResourceTreeReturns
|
||||
@@ -610,7 +707,8 @@ type HandleJavaScriptDialogParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-handleJavaScriptDialog
|
||||
//
|
||||
// parameters:
|
||||
// accept - Whether to accept or dismiss the dialog.
|
||||
//
|
||||
// accept - Whether to accept or dismiss the dialog.
|
||||
func HandleJavaScriptDialog(accept bool) *HandleJavaScriptDialogParams {
|
||||
return &HandleJavaScriptDialogParams{
|
||||
Accept: accept,
|
||||
@@ -643,7 +741,8 @@ type NavigateParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-navigate
|
||||
//
|
||||
// parameters:
|
||||
// url - URL to navigate the page to.
|
||||
//
|
||||
// url - URL to navigate the page to.
|
||||
func Navigate(url string) *NavigateParams {
|
||||
return &NavigateParams{
|
||||
URL: url,
|
||||
@@ -678,16 +777,17 @@ func (p NavigateParams) WithReferrerPolicy(referrerPolicy ReferrerPolicy) *Navig
|
||||
// NavigateReturns return values.
|
||||
type NavigateReturns struct {
|
||||
FrameID cdp.FrameID `json:"frameId,omitempty"` // Frame id that has navigated (or failed to navigate)
|
||||
LoaderID cdp.LoaderID `json:"loaderId,omitempty"` // Loader identifier.
|
||||
LoaderID cdp.LoaderID `json:"loaderId,omitempty"` // Loader identifier. This is omitted in case of same-document navigation, as the previously committed loaderId would not change.
|
||||
ErrorText string `json:"errorText,omitempty"` // User friendly error message, present if and only if navigation has failed.
|
||||
}
|
||||
|
||||
// Do executes Page.navigate against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// frameID - Frame id that has navigated (or failed to navigate)
|
||||
// loaderID - Loader identifier.
|
||||
// errorText - User friendly error message, present if and only if navigation has failed.
|
||||
//
|
||||
// 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 (p *NavigateParams) Do(ctx context.Context) (frameID cdp.FrameID, loaderID cdp.LoaderID, errorText string, err error) {
|
||||
// execute
|
||||
var res NavigateReturns
|
||||
@@ -710,7 +810,8 @@ type NavigateToHistoryEntryParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-navigateToHistoryEntry
|
||||
//
|
||||
// parameters:
|
||||
// entryID - Unique id of the entry to navigate to.
|
||||
//
|
||||
// entryID - Unique id of the entry to navigate to.
|
||||
func NavigateToHistoryEntry(entryID int64) *NavigateToHistoryEntryParams {
|
||||
return &NavigateToHistoryEntryParams{
|
||||
EntryID: entryID,
|
||||
@@ -724,22 +825,21 @@ func (p *NavigateToHistoryEntryParams) Do(ctx context.Context) (err error) {
|
||||
|
||||
// PrintToPDFParams print page as PDF.
|
||||
type PrintToPDFParams struct {
|
||||
Landscape bool `json:"landscape,omitempty"` // Paper orientation. Defaults to false.
|
||||
DisplayHeaderFooter bool `json:"displayHeaderFooter,omitempty"` // Display header and footer. Defaults to false.
|
||||
PrintBackground bool `json:"printBackground,omitempty"` // Print background graphics. Defaults to false.
|
||||
Scale float64 `json:"scale,omitempty"` // Scale of the webpage rendering. Defaults to 1.
|
||||
PaperWidth float64 `json:"paperWidth,omitempty"` // Paper width in inches. Defaults to 8.5 inches.
|
||||
PaperHeight float64 `json:"paperHeight,omitempty"` // Paper height in inches. Defaults to 11 inches.
|
||||
MarginTop float64 `json:"marginTop"` // Top margin in inches. Defaults to 1cm (~0.4 inches).
|
||||
MarginBottom float64 `json:"marginBottom"` // Bottom margin in inches. Defaults to 1cm (~0.4 inches).
|
||||
MarginLeft float64 `json:"marginLeft"` // Left margin in inches. Defaults to 1cm (~0.4 inches).
|
||||
MarginRight float64 `json:"marginRight"` // Right margin in inches. Defaults to 1cm (~0.4 inches).
|
||||
PageRanges string `json:"pageRanges,omitempty"` // Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means print all pages.
|
||||
IgnoreInvalidPageRanges bool `json:"ignoreInvalidPageRanges,omitempty"` // Whether to silently ignore invalid but successfully parsed page ranges, such as '3-2'. Defaults to false.
|
||||
HeaderTemplate string `json:"headerTemplate,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.
|
||||
FooterTemplate string `json:"footerTemplate,omitempty"` // HTML template for the print footer. Should use the same format as the headerTemplate.
|
||||
PreferCSSPageSize bool `json:"preferCSSPageSize,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.
|
||||
TransferMode PrintToPDFTransferMode `json:"transferMode,omitempty"` // return as stream
|
||||
Landscape bool `json:"landscape,omitempty"` // Paper orientation. Defaults to false.
|
||||
DisplayHeaderFooter bool `json:"displayHeaderFooter,omitempty"` // Display header and footer. Defaults to false.
|
||||
PrintBackground bool `json:"printBackground,omitempty"` // Print background graphics. Defaults to false.
|
||||
Scale float64 `json:"scale,omitempty"` // Scale of the webpage rendering. Defaults to 1.
|
||||
PaperWidth float64 `json:"paperWidth,omitempty"` // Paper width in inches. Defaults to 8.5 inches.
|
||||
PaperHeight float64 `json:"paperHeight,omitempty"` // Paper height in inches. Defaults to 11 inches.
|
||||
MarginTop float64 `json:"marginTop"` // Top margin in inches. Defaults to 1cm (~0.4 inches).
|
||||
MarginBottom float64 `json:"marginBottom"` // Bottom margin in inches. Defaults to 1cm (~0.4 inches).
|
||||
MarginLeft float64 `json:"marginLeft"` // Left margin in inches. Defaults to 1cm (~0.4 inches).
|
||||
MarginRight float64 `json:"marginRight"` // Right margin in inches. Defaults to 1cm (~0.4 inches).
|
||||
PageRanges string `json:"pageRanges,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.
|
||||
HeaderTemplate string `json:"headerTemplate,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.
|
||||
FooterTemplate string `json:"footerTemplate,omitempty"` // HTML template for the print footer. Should use the same format as the headerTemplate.
|
||||
PreferCSSPageSize bool `json:"preferCSSPageSize,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.
|
||||
TransferMode PrintToPDFTransferMode `json:"transferMode,omitempty"` // return as stream
|
||||
}
|
||||
|
||||
// PrintToPDF print page as PDF.
|
||||
@@ -811,20 +911,18 @@ func (p PrintToPDFParams) WithMarginRight(marginRight float64) *PrintToPDFParams
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithPageRanges paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to
|
||||
// the empty string, which means print all pages.
|
||||
// WithPageRanges 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.
|
||||
func (p PrintToPDFParams) WithPageRanges(pageRanges string) *PrintToPDFParams {
|
||||
p.PageRanges = pageRanges
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithIgnoreInvalidPageRanges whether to silently ignore invalid but
|
||||
// successfully parsed page ranges, such as '3-2'. Defaults to false.
|
||||
func (p PrintToPDFParams) WithIgnoreInvalidPageRanges(ignoreInvalidPageRanges bool) *PrintToPDFParams {
|
||||
p.IgnoreInvalidPageRanges = ignoreInvalidPageRanges
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithHeaderTemplate 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
|
||||
@@ -866,8 +964,9 @@ type PrintToPDFReturns struct {
|
||||
// Do executes Page.printToPDF against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// data - Base64-encoded pdf data. Empty if |returnAsStream| is specified.
|
||||
// stream - A handle of the stream that holds resulting PDF data.
|
||||
//
|
||||
// data - Base64-encoded pdf data. Empty if |returnAsStream| is specified.
|
||||
// stream - A handle of the stream that holds resulting PDF data.
|
||||
func (p *PrintToPDFParams) Do(ctx context.Context) (data []byte, stream io.StreamHandle, err error) {
|
||||
// execute
|
||||
var res PrintToPDFReturns
|
||||
@@ -931,7 +1030,8 @@ type RemoveScriptToEvaluateOnNewDocumentParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-removeScriptToEvaluateOnNewDocument
|
||||
//
|
||||
// parameters:
|
||||
// identifier
|
||||
//
|
||||
// identifier
|
||||
func RemoveScriptToEvaluateOnNewDocument(identifier ScriptIdentifier) *RemoveScriptToEvaluateOnNewDocumentParams {
|
||||
return &RemoveScriptToEvaluateOnNewDocumentParams{
|
||||
Identifier: identifier,
|
||||
@@ -955,7 +1055,8 @@ type ScreencastFrameAckParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-screencastFrameAck
|
||||
//
|
||||
// parameters:
|
||||
// sessionID - Frame number.
|
||||
//
|
||||
// sessionID - Frame number.
|
||||
func ScreencastFrameAck(sessionID int64) *ScreencastFrameAckParams {
|
||||
return &ScreencastFrameAckParams{
|
||||
SessionID: sessionID,
|
||||
@@ -981,9 +1082,10 @@ type SearchInResourceParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-searchInResource
|
||||
//
|
||||
// parameters:
|
||||
// frameID - Frame id for resource to search in.
|
||||
// url - URL of the resource to search in.
|
||||
// query - String to search for.
|
||||
//
|
||||
// frameID - Frame id for resource to search in.
|
||||
// url - URL of the resource to search in.
|
||||
// query - String to search for.
|
||||
func SearchInResource(frameID cdp.FrameID, url string, query string) *SearchInResourceParams {
|
||||
return &SearchInResourceParams{
|
||||
FrameID: frameID,
|
||||
@@ -1012,7 +1114,8 @@ type SearchInResourceReturns struct {
|
||||
// Do executes Page.searchInResource against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// result - List of search matches.
|
||||
//
|
||||
// result - List of search matches.
|
||||
func (p *SearchInResourceParams) Do(ctx context.Context) (result []*debugger.SearchMatch, err error) {
|
||||
// execute
|
||||
var res SearchInResourceReturns
|
||||
@@ -1035,7 +1138,8 @@ type SetAdBlockingEnabledParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setAdBlockingEnabled
|
||||
//
|
||||
// parameters:
|
||||
// enabled - Whether to block ads.
|
||||
//
|
||||
// enabled - Whether to block ads.
|
||||
func SetAdBlockingEnabled(enabled bool) *SetAdBlockingEnabledParams {
|
||||
return &SetAdBlockingEnabledParams{
|
||||
Enabled: enabled,
|
||||
@@ -1057,7 +1161,8 @@ type SetBypassCSPParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setBypassCSP
|
||||
//
|
||||
// parameters:
|
||||
// enabled - Whether to bypass page CSP.
|
||||
//
|
||||
// enabled - Whether to bypass page CSP.
|
||||
func SetBypassCSP(enabled bool) *SetBypassCSPParams {
|
||||
return &SetBypassCSPParams{
|
||||
Enabled: enabled,
|
||||
@@ -1080,7 +1185,8 @@ type GetPermissionsPolicyStateParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-getPermissionsPolicyState
|
||||
//
|
||||
// parameters:
|
||||
// frameID
|
||||
//
|
||||
// frameID
|
||||
func GetPermissionsPolicyState(frameID cdp.FrameID) *GetPermissionsPolicyStateParams {
|
||||
return &GetPermissionsPolicyStateParams{
|
||||
FrameID: frameID,
|
||||
@@ -1095,7 +1201,8 @@ type GetPermissionsPolicyStateReturns struct {
|
||||
// Do executes Page.getPermissionsPolicyState against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// states
|
||||
//
|
||||
// states
|
||||
func (p *GetPermissionsPolicyStateParams) Do(ctx context.Context) (states []*PermissionsPolicyFeatureState, err error) {
|
||||
// execute
|
||||
var res GetPermissionsPolicyStateReturns
|
||||
@@ -1107,9 +1214,49 @@ func (p *GetPermissionsPolicyStateParams) Do(ctx context.Context) (states []*Per
|
||||
return res.States, nil
|
||||
}
|
||||
|
||||
// GetOriginTrialsParams get Origin Trials on given frame.
|
||||
type GetOriginTrialsParams struct {
|
||||
FrameID cdp.FrameID `json:"frameId"`
|
||||
}
|
||||
|
||||
// GetOriginTrials get Origin Trials on given frame.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-getOriginTrials
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// frameID
|
||||
func GetOriginTrials(frameID cdp.FrameID) *GetOriginTrialsParams {
|
||||
return &GetOriginTrialsParams{
|
||||
FrameID: frameID,
|
||||
}
|
||||
}
|
||||
|
||||
// GetOriginTrialsReturns return values.
|
||||
type GetOriginTrialsReturns struct {
|
||||
OriginTrials []*cdp.OriginTrial `json:"originTrials,omitempty"`
|
||||
}
|
||||
|
||||
// Do executes Page.getOriginTrials against the provided context.
|
||||
//
|
||||
// returns:
|
||||
//
|
||||
// originTrials
|
||||
func (p *GetOriginTrialsParams) Do(ctx context.Context) (originTrials []*cdp.OriginTrial, err error) {
|
||||
// execute
|
||||
var res GetOriginTrialsReturns
|
||||
err = cdp.Execute(ctx, CommandGetOriginTrials, p, &res)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return res.OriginTrials, nil
|
||||
}
|
||||
|
||||
// SetFontFamiliesParams set generic font families.
|
||||
type SetFontFamiliesParams struct {
|
||||
FontFamilies *FontFamilies `json:"fontFamilies"` // Specifies font families to set. If a font family is not specified, it won't be changed.
|
||||
FontFamilies *FontFamilies `json:"fontFamilies"` // Specifies font families to set. If a font family is not specified, it won't be changed.
|
||||
ForScripts []*ScriptFontFamilies `json:"forScripts,omitempty"` // Specifies font families to set for individual scripts.
|
||||
}
|
||||
|
||||
// SetFontFamilies set generic font families.
|
||||
@@ -1117,13 +1264,20 @@ type SetFontFamiliesParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setFontFamilies
|
||||
//
|
||||
// parameters:
|
||||
// fontFamilies - Specifies font families to set. If a font family is not specified, it won't be changed.
|
||||
//
|
||||
// fontFamilies - Specifies font families to set. If a font family is not specified, it won't be changed.
|
||||
func SetFontFamilies(fontFamilies *FontFamilies) *SetFontFamiliesParams {
|
||||
return &SetFontFamiliesParams{
|
||||
FontFamilies: fontFamilies,
|
||||
}
|
||||
}
|
||||
|
||||
// WithForScripts specifies font families to set for individual scripts.
|
||||
func (p SetFontFamiliesParams) WithForScripts(forScripts []*ScriptFontFamilies) *SetFontFamiliesParams {
|
||||
p.ForScripts = forScripts
|
||||
return &p
|
||||
}
|
||||
|
||||
// Do executes Page.setFontFamilies against the provided context.
|
||||
func (p *SetFontFamiliesParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandSetFontFamilies, p, nil)
|
||||
@@ -1139,7 +1293,8 @@ type SetFontSizesParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setFontSizes
|
||||
//
|
||||
// parameters:
|
||||
// fontSizes - Specifies font sizes to set. If a font size is not specified, it won't be changed.
|
||||
//
|
||||
// fontSizes - Specifies font sizes to set. If a font size is not specified, it won't be changed.
|
||||
func SetFontSizes(fontSizes *FontSizes) *SetFontSizesParams {
|
||||
return &SetFontSizesParams{
|
||||
FontSizes: fontSizes,
|
||||
@@ -1162,8 +1317,9 @@ type SetDocumentContentParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setDocumentContent
|
||||
//
|
||||
// parameters:
|
||||
// frameID - Frame id to set HTML for.
|
||||
// html - HTML content to set.
|
||||
//
|
||||
// frameID - Frame id to set HTML for.
|
||||
// html - HTML content to set.
|
||||
func SetDocumentContent(frameID cdp.FrameID, html string) *SetDocumentContentParams {
|
||||
return &SetDocumentContentParams{
|
||||
FrameID: frameID,
|
||||
@@ -1187,7 +1343,8 @@ type SetDownloadBehaviorParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setDownloadBehavior
|
||||
//
|
||||
// parameters:
|
||||
// behavior - Whether to allow all or deny all download requests, or use default Chrome behavior if available (otherwise deny).
|
||||
//
|
||||
// behavior - Whether to allow all or deny all download requests, or use default Chrome behavior if available (otherwise deny).
|
||||
func SetDownloadBehavior(behavior SetDownloadBehaviorBehavior) *SetDownloadBehaviorParams {
|
||||
return &SetDownloadBehaviorParams{
|
||||
Behavior: behavior,
|
||||
@@ -1218,7 +1375,8 @@ type SetLifecycleEventsEnabledParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setLifecycleEventsEnabled
|
||||
//
|
||||
// parameters:
|
||||
// enabled - If true, starts emitting lifecycle events.
|
||||
//
|
||||
// enabled - If true, starts emitting lifecycle events.
|
||||
func SetLifecycleEventsEnabled(enabled bool) *SetLifecycleEventsEnabledParams {
|
||||
return &SetLifecycleEventsEnabledParams{
|
||||
Enabled: enabled,
|
||||
@@ -1345,7 +1503,8 @@ type SetWebLifecycleStateParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setWebLifecycleState
|
||||
//
|
||||
// parameters:
|
||||
// state - Target lifecycle state
|
||||
//
|
||||
// state - Target lifecycle state
|
||||
func SetWebLifecycleState(state SetWebLifecycleStateState) *SetWebLifecycleStateParams {
|
||||
return &SetWebLifecycleStateParams{
|
||||
State: state,
|
||||
@@ -1372,57 +1531,28 @@ func (p *StopScreencastParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandStopScreencast, nil, nil)
|
||||
}
|
||||
|
||||
// SetProduceCompilationCacheParams forces compilation cache to be generated
|
||||
// for every subresource script. See also: Page.produceCompilationCache.
|
||||
type SetProduceCompilationCacheParams struct {
|
||||
Enabled bool `json:"enabled"`
|
||||
}
|
||||
|
||||
// SetProduceCompilationCache forces compilation cache to be generated for
|
||||
// every subresource script. See also: Page.produceCompilationCache.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setProduceCompilationCache
|
||||
//
|
||||
// parameters:
|
||||
// enabled
|
||||
func SetProduceCompilationCache(enabled bool) *SetProduceCompilationCacheParams {
|
||||
return &SetProduceCompilationCacheParams{
|
||||
Enabled: enabled,
|
||||
}
|
||||
}
|
||||
|
||||
// Do executes Page.setProduceCompilationCache against the provided context.
|
||||
func (p *SetProduceCompilationCacheParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandSetProduceCompilationCache, p, nil)
|
||||
}
|
||||
|
||||
// ProduceCompilationCacheParams requests backend to produce compilation
|
||||
// cache for the specified scripts. Unlike setProduceCompilationCache, this
|
||||
// allows client to only produce cache for specific scripts. scripts are
|
||||
// appeneded to the list of scripts for which the cache for would produced.
|
||||
// Disabling compilation cache with setProduceCompilationCache would reset all
|
||||
// pending cache requests. The list may also 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.
|
||||
// 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.
|
||||
type ProduceCompilationCacheParams struct {
|
||||
Scripts []*CompilationCacheParams `json:"scripts"`
|
||||
}
|
||||
|
||||
// ProduceCompilationCache requests backend to produce compilation cache for
|
||||
// the specified scripts. Unlike setProduceCompilationCache, this allows client
|
||||
// to only produce cache for specific scripts. scripts are appeneded to the list
|
||||
// of scripts for which the cache for would produced. Disabling compilation
|
||||
// cache with setProduceCompilationCache would reset all pending cache requests.
|
||||
// The list may also 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:
|
||||
// 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.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-produceCompilationCache
|
||||
//
|
||||
// parameters:
|
||||
// scripts
|
||||
//
|
||||
// scripts
|
||||
func ProduceCompilationCache(scripts []*CompilationCacheParams) *ProduceCompilationCacheParams {
|
||||
return &ProduceCompilationCacheParams{
|
||||
Scripts: scripts,
|
||||
@@ -1447,8 +1577,9 @@ type AddCompilationCacheParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-addCompilationCache
|
||||
//
|
||||
// parameters:
|
||||
// url
|
||||
// data - Base64-encoded data
|
||||
//
|
||||
// url
|
||||
// data - Base64-encoded data
|
||||
func AddCompilationCache(url string, data string) *AddCompilationCacheParams {
|
||||
return &AddCompilationCacheParams{
|
||||
URL: url,
|
||||
@@ -1476,6 +1607,33 @@ func (p *ClearCompilationCacheParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandClearCompilationCache, nil, nil)
|
||||
}
|
||||
|
||||
// SetSPCTransactionModeParams sets the Secure Payment Confirmation
|
||||
// transaction mode.
|
||||
// https://w3c.github.io/secure-payment-confirmation/#sctn-automation-set-spc-transaction-mode.
|
||||
type SetSPCTransactionModeParams struct {
|
||||
Mode SetSPCTransactionModeMode `json:"mode"`
|
||||
}
|
||||
|
||||
// SetSPCTransactionMode sets the Secure Payment Confirmation transaction
|
||||
// mode.
|
||||
// https://w3c.github.io/secure-payment-confirmation/#sctn-automation-set-spc-transaction-mode.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setSPCTransactionMode
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// mode
|
||||
func SetSPCTransactionMode(mode SetSPCTransactionModeMode) *SetSPCTransactionModeParams {
|
||||
return &SetSPCTransactionModeParams{
|
||||
Mode: mode,
|
||||
}
|
||||
}
|
||||
|
||||
// Do executes Page.setSPCTransactionMode against the provided context.
|
||||
func (p *SetSPCTransactionModeParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandSetSPCTransactionMode, p, nil)
|
||||
}
|
||||
|
||||
// GenerateTestReportParams generates a report for testing.
|
||||
type GenerateTestReportParams struct {
|
||||
Message string `json:"message"` // Message to be displayed in the report.
|
||||
@@ -1487,7 +1645,8 @@ type GenerateTestReportParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-generateTestReport
|
||||
//
|
||||
// parameters:
|
||||
// message - Message to be displayed in the report.
|
||||
//
|
||||
// message - Message to be displayed in the report.
|
||||
func GenerateTestReport(message string) *GenerateTestReportParams {
|
||||
return &GenerateTestReportParams{
|
||||
Message: message,
|
||||
@@ -1538,7 +1697,8 @@ type SetInterceptFileChooserDialogParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Page#method-setInterceptFileChooserDialog
|
||||
//
|
||||
// parameters:
|
||||
// enabled
|
||||
//
|
||||
// enabled
|
||||
func SetInterceptFileChooserDialog(enabled bool) *SetInterceptFileChooserDialogParams {
|
||||
return &SetInterceptFileChooserDialogParams{
|
||||
Enabled: enabled,
|
||||
@@ -1562,6 +1722,8 @@ const (
|
||||
CommandGetAppManifest = "Page.getAppManifest"
|
||||
CommandGetInstallabilityErrors = "Page.getInstallabilityErrors"
|
||||
CommandGetManifestIcons = "Page.getManifestIcons"
|
||||
CommandGetAppID = "Page.getAppId"
|
||||
CommandGetAdScriptID = "Page.getAdScriptId"
|
||||
CommandGetFrameTree = "Page.getFrameTree"
|
||||
CommandGetLayoutMetrics = "Page.getLayoutMetrics"
|
||||
CommandGetNavigationHistory = "Page.getNavigationHistory"
|
||||
@@ -1579,6 +1741,7 @@ const (
|
||||
CommandSetAdBlockingEnabled = "Page.setAdBlockingEnabled"
|
||||
CommandSetBypassCSP = "Page.setBypassCSP"
|
||||
CommandGetPermissionsPolicyState = "Page.getPermissionsPolicyState"
|
||||
CommandGetOriginTrials = "Page.getOriginTrials"
|
||||
CommandSetFontFamilies = "Page.setFontFamilies"
|
||||
CommandSetFontSizes = "Page.setFontSizes"
|
||||
CommandSetDocumentContent = "Page.setDocumentContent"
|
||||
@@ -1590,10 +1753,10 @@ const (
|
||||
CommandClose = "Page.close"
|
||||
CommandSetWebLifecycleState = "Page.setWebLifecycleState"
|
||||
CommandStopScreencast = "Page.stopScreencast"
|
||||
CommandSetProduceCompilationCache = "Page.setProduceCompilationCache"
|
||||
CommandProduceCompilationCache = "Page.produceCompilationCache"
|
||||
CommandAddCompilationCache = "Page.addCompilationCache"
|
||||
CommandClearCompilationCache = "Page.clearCompilationCache"
|
||||
CommandSetSPCTransactionMode = "Page.setSPCTransactionMode"
|
||||
CommandGenerateTestReport = "Page.generateTestReport"
|
||||
CommandWaitForDebugger = "Page.waitForDebugger"
|
||||
CommandSetInterceptFileChooserDialog = "Page.setInterceptFileChooserDialog"
|
||||
|
||||
736
vendor/github.com/chromedp/cdproto/page/types.go
generated
vendored
736
vendor/github.com/chromedp/cdproto/page/types.go
generated
vendored
File diff suppressed because it is too large
Load Diff
3
vendor/github.com/chromedp/cdproto/performance/performance.go
generated
vendored
3
vendor/github.com/chromedp/cdproto/performance/performance.go
generated
vendored
@@ -71,7 +71,8 @@ type GetMetricsReturns struct {
|
||||
// Do executes Performance.getMetrics against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// metrics - Current values for run-time metrics.
|
||||
//
|
||||
// metrics - Current values for run-time metrics.
|
||||
func (p *GetMetricsParams) Do(ctx context.Context) (metrics []*Metric, err error) {
|
||||
// execute
|
||||
var res GetMetricsReturns
|
||||
|
||||
7
vendor/github.com/chromedp/cdproto/performance/types.go
generated
vendored
7
vendor/github.com/chromedp/cdproto/performance/types.go
generated
vendored
@@ -3,7 +3,7 @@ package performance
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/mailru/easyjson"
|
||||
"github.com/mailru/easyjson/jlexer"
|
||||
@@ -47,14 +47,15 @@ func (t EnableTimeDomain) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *EnableTimeDomain) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch EnableTimeDomain(in.String()) {
|
||||
v := in.String()
|
||||
switch EnableTimeDomain(v) {
|
||||
case EnableTimeDomainTimeTicks:
|
||||
*t = EnableTimeDomainTimeTicks
|
||||
case EnableTimeDomainThreadTicks:
|
||||
*t = EnableTimeDomainThreadTicks
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown EnableTimeDomain value"))
|
||||
in.AddError(fmt.Errorf("unknown EnableTimeDomain value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
3
vendor/github.com/chromedp/cdproto/performancetimeline/performancetimeline.go
generated
vendored
3
vendor/github.com/chromedp/cdproto/performancetimeline/performancetimeline.go
generated
vendored
@@ -27,7 +27,8 @@ type EnableParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/PerformanceTimeline#method-enable
|
||||
//
|
||||
// parameters:
|
||||
// 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.
|
||||
//
|
||||
// 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 Enable(eventTypes []string) *EnableParams {
|
||||
return &EnableParams{
|
||||
EventTypes: eventTypes,
|
||||
|
||||
1758
vendor/github.com/chromedp/cdproto/profiler/easyjson.go
generated
vendored
1758
vendor/github.com/chromedp/cdproto/profiler/easyjson.go
generated
vendored
File diff suppressed because it is too large
Load Diff
226
vendor/github.com/chromedp/cdproto/profiler/profiler.go
generated
vendored
226
vendor/github.com/chromedp/cdproto/profiler/profiler.go
generated
vendored
@@ -62,7 +62,8 @@ type GetBestEffortCoverageReturns struct {
|
||||
// Do executes Profiler.getBestEffortCoverage against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// result - Coverage data for the current isolate.
|
||||
//
|
||||
// result - Coverage data for the current isolate.
|
||||
func (p *GetBestEffortCoverageParams) Do(ctx context.Context) (result []*ScriptCoverage, err error) {
|
||||
// execute
|
||||
var res GetBestEffortCoverageReturns
|
||||
@@ -86,7 +87,8 @@ type SetSamplingIntervalParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-setSamplingInterval
|
||||
//
|
||||
// parameters:
|
||||
// interval - New sampling interval in microseconds.
|
||||
//
|
||||
// interval - New sampling interval in microseconds.
|
||||
func SetSamplingInterval(interval int64) *SetSamplingIntervalParams {
|
||||
return &SetSamplingIntervalParams{
|
||||
Interval: interval,
|
||||
@@ -161,7 +163,8 @@ type StartPreciseCoverageReturns struct {
|
||||
// Do executes Profiler.startPreciseCoverage against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// timestamp - Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
|
||||
//
|
||||
// timestamp - Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
|
||||
func (p *StartPreciseCoverageParams) Do(ctx context.Context) (timestamp float64, err error) {
|
||||
// execute
|
||||
var res StartPreciseCoverageReturns
|
||||
@@ -173,21 +176,6 @@ func (p *StartPreciseCoverageParams) Do(ctx context.Context) (timestamp float64,
|
||||
return res.Timestamp, nil
|
||||
}
|
||||
|
||||
// StartTypeProfileParams enable type profile.
|
||||
type StartTypeProfileParams struct{}
|
||||
|
||||
// StartTypeProfile enable type profile.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-startTypeProfile
|
||||
func StartTypeProfile() *StartTypeProfileParams {
|
||||
return &StartTypeProfileParams{}
|
||||
}
|
||||
|
||||
// Do executes Profiler.startTypeProfile against the provided context.
|
||||
func (p *StartTypeProfileParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandStartTypeProfile, nil, nil)
|
||||
}
|
||||
|
||||
// StopParams [no description].
|
||||
type StopParams struct{}
|
||||
|
||||
@@ -206,7 +194,8 @@ type StopReturns struct {
|
||||
// Do executes Profiler.stop against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// profile - Recorded profile.
|
||||
//
|
||||
// profile - Recorded profile.
|
||||
func (p *StopParams) Do(ctx context.Context) (profile *Profile, err error) {
|
||||
// execute
|
||||
var res StopReturns
|
||||
@@ -236,23 +225,6 @@ func (p *StopPreciseCoverageParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandStopPreciseCoverage, nil, nil)
|
||||
}
|
||||
|
||||
// StopTypeProfileParams disable type profile. Disabling releases type
|
||||
// profile data collected so far.
|
||||
type StopTypeProfileParams struct{}
|
||||
|
||||
// StopTypeProfile disable type profile. Disabling releases type profile data
|
||||
// collected so far.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-stopTypeProfile
|
||||
func StopTypeProfile() *StopTypeProfileParams {
|
||||
return &StopTypeProfileParams{}
|
||||
}
|
||||
|
||||
// Do executes Profiler.stopTypeProfile against the provided context.
|
||||
func (p *StopTypeProfileParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandStopTypeProfile, nil, nil)
|
||||
}
|
||||
|
||||
// TakePreciseCoverageParams collect coverage data for the current isolate,
|
||||
// and resets execution counters. Precise code coverage needs to have started.
|
||||
type TakePreciseCoverageParams struct{}
|
||||
@@ -274,8 +246,9 @@ type TakePreciseCoverageReturns struct {
|
||||
// Do executes Profiler.takePreciseCoverage against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// result - Coverage data for the current isolate.
|
||||
// timestamp - Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
|
||||
//
|
||||
// result - Coverage data for the current isolate.
|
||||
// timestamp - Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
|
||||
func (p *TakePreciseCoverageParams) Do(ctx context.Context) (result []*ScriptCoverage, timestamp float64, err error) {
|
||||
// execute
|
||||
var res TakePreciseCoverageReturns
|
||||
@@ -287,174 +260,15 @@ func (p *TakePreciseCoverageParams) Do(ctx context.Context) (result []*ScriptCov
|
||||
return res.Result, res.Timestamp, nil
|
||||
}
|
||||
|
||||
// TakeTypeProfileParams collect type profile.
|
||||
type TakeTypeProfileParams struct{}
|
||||
|
||||
// TakeTypeProfile collect type profile.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-takeTypeProfile
|
||||
func TakeTypeProfile() *TakeTypeProfileParams {
|
||||
return &TakeTypeProfileParams{}
|
||||
}
|
||||
|
||||
// TakeTypeProfileReturns return values.
|
||||
type TakeTypeProfileReturns struct {
|
||||
Result []*ScriptTypeProfile `json:"result,omitempty"` // Type profile for all scripts since startTypeProfile() was turned on.
|
||||
}
|
||||
|
||||
// Do executes Profiler.takeTypeProfile against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// result - Type profile for all scripts since startTypeProfile() was turned on.
|
||||
func (p *TakeTypeProfileParams) Do(ctx context.Context) (result []*ScriptTypeProfile, err error) {
|
||||
// execute
|
||||
var res TakeTypeProfileReturns
|
||||
err = cdp.Execute(ctx, CommandTakeTypeProfile, nil, &res)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return res.Result, nil
|
||||
}
|
||||
|
||||
// EnableCountersParams enable counters collection.
|
||||
type EnableCountersParams struct{}
|
||||
|
||||
// EnableCounters enable counters collection.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-enableCounters
|
||||
func EnableCounters() *EnableCountersParams {
|
||||
return &EnableCountersParams{}
|
||||
}
|
||||
|
||||
// Do executes Profiler.enableCounters against the provided context.
|
||||
func (p *EnableCountersParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandEnableCounters, nil, nil)
|
||||
}
|
||||
|
||||
// DisableCountersParams disable counters collection.
|
||||
type DisableCountersParams struct{}
|
||||
|
||||
// DisableCounters disable counters collection.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-disableCounters
|
||||
func DisableCounters() *DisableCountersParams {
|
||||
return &DisableCountersParams{}
|
||||
}
|
||||
|
||||
// Do executes Profiler.disableCounters against the provided context.
|
||||
func (p *DisableCountersParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandDisableCounters, nil, nil)
|
||||
}
|
||||
|
||||
// GetCountersParams retrieve counters.
|
||||
type GetCountersParams struct{}
|
||||
|
||||
// GetCounters retrieve counters.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-getCounters
|
||||
func GetCounters() *GetCountersParams {
|
||||
return &GetCountersParams{}
|
||||
}
|
||||
|
||||
// GetCountersReturns return values.
|
||||
type GetCountersReturns struct {
|
||||
Result []*CounterInfo `json:"result,omitempty"` // Collected counters information.
|
||||
}
|
||||
|
||||
// Do executes Profiler.getCounters against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// result - Collected counters information.
|
||||
func (p *GetCountersParams) Do(ctx context.Context) (result []*CounterInfo, err error) {
|
||||
// execute
|
||||
var res GetCountersReturns
|
||||
err = cdp.Execute(ctx, CommandGetCounters, nil, &res)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return res.Result, nil
|
||||
}
|
||||
|
||||
// EnableRuntimeCallStatsParams enable run time call stats collection.
|
||||
type EnableRuntimeCallStatsParams struct{}
|
||||
|
||||
// EnableRuntimeCallStats enable run time call stats collection.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-enableRuntimeCallStats
|
||||
func EnableRuntimeCallStats() *EnableRuntimeCallStatsParams {
|
||||
return &EnableRuntimeCallStatsParams{}
|
||||
}
|
||||
|
||||
// Do executes Profiler.enableRuntimeCallStats against the provided context.
|
||||
func (p *EnableRuntimeCallStatsParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandEnableRuntimeCallStats, nil, nil)
|
||||
}
|
||||
|
||||
// DisableRuntimeCallStatsParams disable run time call stats collection.
|
||||
type DisableRuntimeCallStatsParams struct{}
|
||||
|
||||
// DisableRuntimeCallStats disable run time call stats collection.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-disableRuntimeCallStats
|
||||
func DisableRuntimeCallStats() *DisableRuntimeCallStatsParams {
|
||||
return &DisableRuntimeCallStatsParams{}
|
||||
}
|
||||
|
||||
// Do executes Profiler.disableRuntimeCallStats against the provided context.
|
||||
func (p *DisableRuntimeCallStatsParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandDisableRuntimeCallStats, nil, nil)
|
||||
}
|
||||
|
||||
// GetRuntimeCallStatsParams retrieve run time call stats.
|
||||
type GetRuntimeCallStatsParams struct{}
|
||||
|
||||
// GetRuntimeCallStats retrieve run time call stats.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-getRuntimeCallStats
|
||||
func GetRuntimeCallStats() *GetRuntimeCallStatsParams {
|
||||
return &GetRuntimeCallStatsParams{}
|
||||
}
|
||||
|
||||
// GetRuntimeCallStatsReturns return values.
|
||||
type GetRuntimeCallStatsReturns struct {
|
||||
Result []*RuntimeCallCounterInfo `json:"result,omitempty"` // Collected runtime call counter information.
|
||||
}
|
||||
|
||||
// Do executes Profiler.getRuntimeCallStats against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// result - Collected runtime call counter information.
|
||||
func (p *GetRuntimeCallStatsParams) Do(ctx context.Context) (result []*RuntimeCallCounterInfo, err error) {
|
||||
// execute
|
||||
var res GetRuntimeCallStatsReturns
|
||||
err = cdp.Execute(ctx, CommandGetRuntimeCallStats, nil, &res)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return res.Result, nil
|
||||
}
|
||||
|
||||
// Command names.
|
||||
const (
|
||||
CommandDisable = "Profiler.disable"
|
||||
CommandEnable = "Profiler.enable"
|
||||
CommandGetBestEffortCoverage = "Profiler.getBestEffortCoverage"
|
||||
CommandSetSamplingInterval = "Profiler.setSamplingInterval"
|
||||
CommandStart = "Profiler.start"
|
||||
CommandStartPreciseCoverage = "Profiler.startPreciseCoverage"
|
||||
CommandStartTypeProfile = "Profiler.startTypeProfile"
|
||||
CommandStop = "Profiler.stop"
|
||||
CommandStopPreciseCoverage = "Profiler.stopPreciseCoverage"
|
||||
CommandStopTypeProfile = "Profiler.stopTypeProfile"
|
||||
CommandTakePreciseCoverage = "Profiler.takePreciseCoverage"
|
||||
CommandTakeTypeProfile = "Profiler.takeTypeProfile"
|
||||
CommandEnableCounters = "Profiler.enableCounters"
|
||||
CommandDisableCounters = "Profiler.disableCounters"
|
||||
CommandGetCounters = "Profiler.getCounters"
|
||||
CommandEnableRuntimeCallStats = "Profiler.enableRuntimeCallStats"
|
||||
CommandDisableRuntimeCallStats = "Profiler.disableRuntimeCallStats"
|
||||
CommandGetRuntimeCallStats = "Profiler.getRuntimeCallStats"
|
||||
CommandDisable = "Profiler.disable"
|
||||
CommandEnable = "Profiler.enable"
|
||||
CommandGetBestEffortCoverage = "Profiler.getBestEffortCoverage"
|
||||
CommandSetSamplingInterval = "Profiler.setSamplingInterval"
|
||||
CommandStart = "Profiler.start"
|
||||
CommandStartPreciseCoverage = "Profiler.startPreciseCoverage"
|
||||
CommandStop = "Profiler.stop"
|
||||
CommandStopPreciseCoverage = "Profiler.stopPreciseCoverage"
|
||||
CommandTakePreciseCoverage = "Profiler.takePreciseCoverage"
|
||||
)
|
||||
|
||||
42
vendor/github.com/chromedp/cdproto/profiler/types.go
generated
vendored
42
vendor/github.com/chromedp/cdproto/profiler/types.go
generated
vendored
@@ -65,45 +65,3 @@ type ScriptCoverage struct {
|
||||
URL string `json:"url"` // JavaScript script name or url.
|
||||
Functions []*FunctionCoverage `json:"functions"` // Functions contained in the script that has coverage data.
|
||||
}
|
||||
|
||||
// TypeObject describes a type collected during runtime.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-TypeObject
|
||||
type TypeObject struct {
|
||||
Name string `json:"name"` // Name of a type collected with type profiling.
|
||||
}
|
||||
|
||||
// TypeProfileEntry source offset and types for a parameter or return value.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-TypeProfileEntry
|
||||
type TypeProfileEntry struct {
|
||||
Offset int64 `json:"offset"` // Source offset of the parameter or end of function for return values.
|
||||
Types []*TypeObject `json:"types"` // The types for this parameter or return value.
|
||||
}
|
||||
|
||||
// ScriptTypeProfile type profile data collected during runtime for a
|
||||
// JavaScript script.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-ScriptTypeProfile
|
||||
type ScriptTypeProfile struct {
|
||||
ScriptID runtime.ScriptID `json:"scriptId"` // JavaScript script id.
|
||||
URL string `json:"url"` // JavaScript script name or url.
|
||||
Entries []*TypeProfileEntry `json:"entries"` // Type profile entries for parameters and return values of the functions in the script.
|
||||
}
|
||||
|
||||
// CounterInfo collected counter information.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-CounterInfo
|
||||
type CounterInfo struct {
|
||||
Name string `json:"name"` // Counter name.
|
||||
Value int64 `json:"value"` // Counter value.
|
||||
}
|
||||
|
||||
// RuntimeCallCounterInfo runtime call counter information.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-RuntimeCallCounterInfo
|
||||
type RuntimeCallCounterInfo struct {
|
||||
Name string `json:"name"` // Counter name.
|
||||
Value float64 `json:"value"` // Counter value.
|
||||
Time float64 `json:"time"` // Counter time in seconds.
|
||||
}
|
||||
|
||||
907
vendor/github.com/chromedp/cdproto/runtime/easyjson.go
generated
vendored
907
vendor/github.com/chromedp/cdproto/runtime/easyjson.go
generated
vendored
File diff suppressed because it is too large
Load Diff
5
vendor/github.com/chromedp/cdproto/runtime/events.go
generated
vendored
5
vendor/github.com/chromedp/cdproto/runtime/events.go
generated
vendored
@@ -69,6 +69,7 @@ type EventExecutionContextsCleared struct{}
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#event-inspectRequested
|
||||
type EventInspectRequested struct {
|
||||
Object *RemoteObject `json:"object"`
|
||||
Hints easyjson.RawMessage `json:"hints"`
|
||||
Object *RemoteObject `json:"object"`
|
||||
Hints easyjson.RawMessage `json:"hints"`
|
||||
ExecutionContextID ExecutionContextID `json:"executionContextId,omitempty"` // Identifier of the context where the call was made.
|
||||
}
|
||||
|
||||
198
vendor/github.com/chromedp/cdproto/runtime/runtime.go
generated
vendored
198
vendor/github.com/chromedp/cdproto/runtime/runtime.go
generated
vendored
@@ -31,7 +31,8 @@ type AwaitPromiseParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-awaitPromise
|
||||
//
|
||||
// parameters:
|
||||
// promiseObjectID - Identifier of the promise.
|
||||
//
|
||||
// promiseObjectID - Identifier of the promise.
|
||||
func AwaitPromise(promiseObjectID RemoteObjectID) *AwaitPromiseParams {
|
||||
return &AwaitPromiseParams{
|
||||
PromiseObjectID: promiseObjectID,
|
||||
@@ -60,8 +61,9 @@ type AwaitPromiseReturns struct {
|
||||
// Do executes Runtime.awaitPromise against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// result - Promise result. Will contain rejected value if promise was rejected.
|
||||
// exceptionDetails - Exception details if stack strace is available.
|
||||
//
|
||||
// result - Promise result. Will contain rejected value if promise was rejected.
|
||||
// exceptionDetails - Exception details if stack strace is available.
|
||||
func (p *AwaitPromiseParams) Do(ctx context.Context) (result *RemoteObject, exceptionDetails *ExceptionDetails, err error) {
|
||||
// execute
|
||||
var res AwaitPromiseReturns
|
||||
@@ -76,16 +78,18 @@ func (p *AwaitPromiseParams) Do(ctx context.Context) (result *RemoteObject, exce
|
||||
// CallFunctionOnParams calls function with given declaration on the given
|
||||
// object. Object group of the result is inherited from the target object.
|
||||
type CallFunctionOnParams struct {
|
||||
FunctionDeclaration string `json:"functionDeclaration"` // Declaration of the function to call.
|
||||
ObjectID RemoteObjectID `json:"objectId,omitempty"` // Identifier of the object to call function on. Either objectId or executionContextId should be specified.
|
||||
Arguments []*CallArgument `json:"arguments,omitempty"` // Call arguments. All call arguments must belong to the same JavaScript world as the target object.
|
||||
Silent bool `json:"silent,omitempty"` // In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state.
|
||||
ReturnByValue bool `json:"returnByValue,omitempty"` // Whether the result is expected to be a JSON object which should be sent by value.
|
||||
GeneratePreview bool `json:"generatePreview,omitempty"` // Whether preview should be generated for the result.
|
||||
UserGesture bool `json:"userGesture,omitempty"` // Whether execution should be treated as initiated by user in the UI.
|
||||
AwaitPromise bool `json:"awaitPromise,omitempty"` // Whether execution should await for resulting value and return once awaited promise is resolved.
|
||||
ExecutionContextID ExecutionContextID `json:"executionContextId,omitempty"` // Specifies execution context which global object will be used to call function on. Either executionContextId or objectId should be specified.
|
||||
ObjectGroup string `json:"objectGroup,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.
|
||||
FunctionDeclaration string `json:"functionDeclaration"` // Declaration of the function to call.
|
||||
ObjectID RemoteObjectID `json:"objectId,omitempty"` // Identifier of the object to call function on. Either objectId or executionContextId should be specified.
|
||||
Arguments []*CallArgument `json:"arguments,omitempty"` // Call arguments. All call arguments must belong to the same JavaScript world as the target object.
|
||||
Silent bool `json:"silent,omitempty"` // In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state.
|
||||
ReturnByValue bool `json:"returnByValue,omitempty"` // Whether the result is expected to be a JSON object which should be sent by value.
|
||||
GeneratePreview bool `json:"generatePreview,omitempty"` // Whether preview should be generated for the result.
|
||||
UserGesture bool `json:"userGesture,omitempty"` // Whether execution should be treated as initiated by user in the UI.
|
||||
AwaitPromise bool `json:"awaitPromise,omitempty"` // Whether execution should await for resulting value and return once awaited promise is resolved.
|
||||
ExecutionContextID ExecutionContextID `json:"executionContextId,omitempty"` // Specifies execution context which global object will be used to call function on. Either executionContextId or objectId should be specified.
|
||||
ObjectGroup string `json:"objectGroup,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.
|
||||
ThrowOnSideEffect bool `json:"throwOnSideEffect,omitempty"` // Whether to throw an exception if side effect cannot be ruled out during evaluation.
|
||||
GenerateWebDriverValue bool `json:"generateWebDriverValue,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.
|
||||
}
|
||||
|
||||
// CallFunctionOn calls function with given declaration on the given object.
|
||||
@@ -94,7 +98,8 @@ type CallFunctionOnParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-callFunctionOn
|
||||
//
|
||||
// parameters:
|
||||
// functionDeclaration - Declaration of the function to call.
|
||||
//
|
||||
// functionDeclaration - Declaration of the function to call.
|
||||
func CallFunctionOn(functionDeclaration string) *CallFunctionOnParams {
|
||||
return &CallFunctionOnParams{
|
||||
FunctionDeclaration: functionDeclaration,
|
||||
@@ -165,6 +170,22 @@ func (p CallFunctionOnParams) WithObjectGroup(objectGroup string) *CallFunctionO
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithThrowOnSideEffect whether to throw an exception if side effect cannot
|
||||
// be ruled out during evaluation.
|
||||
func (p CallFunctionOnParams) WithThrowOnSideEffect(throwOnSideEffect bool) *CallFunctionOnParams {
|
||||
p.ThrowOnSideEffect = throwOnSideEffect
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithGenerateWebDriverValue 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.
|
||||
func (p CallFunctionOnParams) WithGenerateWebDriverValue(generateWebDriverValue bool) *CallFunctionOnParams {
|
||||
p.GenerateWebDriverValue = generateWebDriverValue
|
||||
return &p
|
||||
}
|
||||
|
||||
// CallFunctionOnReturns return values.
|
||||
type CallFunctionOnReturns struct {
|
||||
Result *RemoteObject `json:"result,omitempty"` // Call result.
|
||||
@@ -174,8 +195,9 @@ type CallFunctionOnReturns struct {
|
||||
// Do executes Runtime.callFunctionOn against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// result - Call result.
|
||||
// exceptionDetails - Exception details.
|
||||
//
|
||||
// result - Call result.
|
||||
// exceptionDetails - Exception details.
|
||||
func (p *CallFunctionOnParams) Do(ctx context.Context) (result *RemoteObject, exceptionDetails *ExceptionDetails, err error) {
|
||||
// execute
|
||||
var res CallFunctionOnReturns
|
||||
@@ -200,9 +222,10 @@ type CompileScriptParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-compileScript
|
||||
//
|
||||
// parameters:
|
||||
// expression - Expression to compile.
|
||||
// sourceURL - Source url to be set for the script.
|
||||
// persistScript - Specifies whether the compiled script should be persisted.
|
||||
//
|
||||
// expression - Expression to compile.
|
||||
// sourceURL - Source url to be set for the script.
|
||||
// persistScript - Specifies whether the compiled script should be persisted.
|
||||
func CompileScript(expression string, sourceURL string, persistScript bool) *CompileScriptParams {
|
||||
return &CompileScriptParams{
|
||||
Expression: expression,
|
||||
@@ -228,8 +251,9 @@ type CompileScriptReturns struct {
|
||||
// Do executes Runtime.compileScript against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// scriptID - Id of the script.
|
||||
// exceptionDetails - Exception details.
|
||||
//
|
||||
// scriptID - Id of the script.
|
||||
// exceptionDetails - Exception details.
|
||||
func (p *CompileScriptParams) Do(ctx context.Context) (scriptID ScriptID, exceptionDetails *ExceptionDetails, err error) {
|
||||
// execute
|
||||
var res CompileScriptReturns
|
||||
@@ -308,6 +332,7 @@ type EvaluateParams struct {
|
||||
ReplMode bool `json:"replMode,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.
|
||||
AllowUnsafeEvalBlockedByCSP bool `json:"allowUnsafeEvalBlockedByCSP,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.
|
||||
UniqueContextID string `json:"uniqueContextId,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.
|
||||
GenerateWebDriverValue bool `json:"generateWebDriverValue,omitempty"` // Whether the result should be serialized according to https://w3c.github.io/webdriver-bidi.
|
||||
}
|
||||
|
||||
// Evaluate evaluates expression on global object.
|
||||
@@ -315,7 +340,8 @@ type EvaluateParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-evaluate
|
||||
//
|
||||
// parameters:
|
||||
// expression - Expression to evaluate.
|
||||
//
|
||||
// expression - Expression to evaluate.
|
||||
func Evaluate(expression string) *EvaluateParams {
|
||||
return &EvaluateParams{
|
||||
Expression: expression,
|
||||
@@ -428,6 +454,13 @@ func (p EvaluateParams) WithUniqueContextID(uniqueContextID string) *EvaluatePar
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithGenerateWebDriverValue whether the result should be serialized
|
||||
// according to https://w3c.github.io/webdriver-bidi.
|
||||
func (p EvaluateParams) WithGenerateWebDriverValue(generateWebDriverValue bool) *EvaluateParams {
|
||||
p.GenerateWebDriverValue = generateWebDriverValue
|
||||
return &p
|
||||
}
|
||||
|
||||
// EvaluateReturns return values.
|
||||
type EvaluateReturns struct {
|
||||
Result *RemoteObject `json:"result,omitempty"` // Evaluation result.
|
||||
@@ -437,8 +470,9 @@ type EvaluateReturns struct {
|
||||
// Do executes Runtime.evaluate against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// result - Evaluation result.
|
||||
// exceptionDetails - Exception details.
|
||||
//
|
||||
// result - Evaluation result.
|
||||
// exceptionDetails - Exception details.
|
||||
func (p *EvaluateParams) Do(ctx context.Context) (result *RemoteObject, exceptionDetails *ExceptionDetails, err error) {
|
||||
// execute
|
||||
var res EvaluateReturns
|
||||
@@ -468,7 +502,8 @@ type GetIsolateIDReturns struct {
|
||||
// Do executes Runtime.getIsolateId against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// id - The isolate id.
|
||||
//
|
||||
// id - The isolate id.
|
||||
func (p *GetIsolateIDParams) Do(ctx context.Context) (id string, err error) {
|
||||
// execute
|
||||
var res GetIsolateIDReturns
|
||||
@@ -501,8 +536,9 @@ type GetHeapUsageReturns struct {
|
||||
// Do executes Runtime.getHeapUsage against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// usedSize - Used heap size in bytes.
|
||||
// totalSize - Allocated heap size in bytes.
|
||||
//
|
||||
// usedSize - Used heap size in bytes.
|
||||
// totalSize - Allocated heap size in bytes.
|
||||
func (p *GetHeapUsageParams) Do(ctx context.Context) (usedSize float64, totalSize float64, err error) {
|
||||
// execute
|
||||
var res GetHeapUsageReturns
|
||||
@@ -517,10 +553,11 @@ func (p *GetHeapUsageParams) Do(ctx context.Context) (usedSize float64, totalSiz
|
||||
// GetPropertiesParams returns properties of a given object. Object group of
|
||||
// the result is inherited from the target object.
|
||||
type GetPropertiesParams struct {
|
||||
ObjectID RemoteObjectID `json:"objectId"` // Identifier of the object to return properties for.
|
||||
OwnProperties bool `json:"ownProperties,omitempty"` // If true, returns properties belonging only to the element itself, not to its prototype chain.
|
||||
AccessorPropertiesOnly bool `json:"accessorPropertiesOnly,omitempty"` // If true, returns accessor properties (with getter/setter) only; internal properties are not returned either.
|
||||
GeneratePreview bool `json:"generatePreview,omitempty"` // Whether preview should be generated for the results.
|
||||
ObjectID RemoteObjectID `json:"objectId"` // Identifier of the object to return properties for.
|
||||
OwnProperties bool `json:"ownProperties,omitempty"` // If true, returns properties belonging only to the element itself, not to its prototype chain.
|
||||
AccessorPropertiesOnly bool `json:"accessorPropertiesOnly,omitempty"` // If true, returns accessor properties (with getter/setter) only; internal properties are not returned either.
|
||||
GeneratePreview bool `json:"generatePreview,omitempty"` // Whether preview should be generated for the results.
|
||||
NonIndexedPropertiesOnly bool `json:"nonIndexedPropertiesOnly,omitempty"` // If true, returns non-indexed properties only.
|
||||
}
|
||||
|
||||
// GetProperties returns properties of a given object. Object group of the
|
||||
@@ -529,7 +566,8 @@ type GetPropertiesParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-getProperties
|
||||
//
|
||||
// parameters:
|
||||
// objectID - Identifier of the object to return properties for.
|
||||
//
|
||||
// objectID - Identifier of the object to return properties for.
|
||||
func GetProperties(objectID RemoteObjectID) *GetPropertiesParams {
|
||||
return &GetPropertiesParams{
|
||||
ObjectID: objectID,
|
||||
@@ -556,6 +594,12 @@ func (p GetPropertiesParams) WithGeneratePreview(generatePreview bool) *GetPrope
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithNonIndexedPropertiesOnly if true, returns non-indexed properties only.
|
||||
func (p GetPropertiesParams) WithNonIndexedPropertiesOnly(nonIndexedPropertiesOnly bool) *GetPropertiesParams {
|
||||
p.NonIndexedPropertiesOnly = nonIndexedPropertiesOnly
|
||||
return &p
|
||||
}
|
||||
|
||||
// GetPropertiesReturns return values.
|
||||
type GetPropertiesReturns struct {
|
||||
Result []*PropertyDescriptor `json:"result,omitempty"` // Object properties.
|
||||
@@ -567,10 +611,11 @@ type GetPropertiesReturns struct {
|
||||
// Do executes Runtime.getProperties against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// result - Object properties.
|
||||
// internalProperties - Internal object properties (only of the element itself).
|
||||
// privateProperties - Object private properties.
|
||||
// exceptionDetails - Exception details.
|
||||
//
|
||||
// result - Object properties.
|
||||
// internalProperties - Internal object properties (only of the element itself).
|
||||
// privateProperties - Object private properties.
|
||||
// exceptionDetails - Exception details.
|
||||
func (p *GetPropertiesParams) Do(ctx context.Context) (result []*PropertyDescriptor, internalProperties []*InternalPropertyDescriptor, privateProperties []*PrivatePropertyDescriptor, exceptionDetails *ExceptionDetails, err error) {
|
||||
// execute
|
||||
var res GetPropertiesReturns
|
||||
@@ -613,7 +658,8 @@ type GlobalLexicalScopeNamesReturns struct {
|
||||
// Do executes Runtime.globalLexicalScopeNames against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// names
|
||||
//
|
||||
// names
|
||||
func (p *GlobalLexicalScopeNamesParams) Do(ctx context.Context) (names []string, err error) {
|
||||
// execute
|
||||
var res GlobalLexicalScopeNamesReturns
|
||||
@@ -636,7 +682,8 @@ type QueryObjectsParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-queryObjects
|
||||
//
|
||||
// parameters:
|
||||
// prototypeObjectID - Identifier of the prototype to return objects for.
|
||||
//
|
||||
// prototypeObjectID - Identifier of the prototype to return objects for.
|
||||
func QueryObjects(prototypeObjectID RemoteObjectID) *QueryObjectsParams {
|
||||
return &QueryObjectsParams{
|
||||
PrototypeObjectID: prototypeObjectID,
|
||||
@@ -658,7 +705,8 @@ type QueryObjectsReturns struct {
|
||||
// Do executes Runtime.queryObjects against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// objects - Array with objects.
|
||||
//
|
||||
// objects - Array with objects.
|
||||
func (p *QueryObjectsParams) Do(ctx context.Context) (objects *RemoteObject, err error) {
|
||||
// execute
|
||||
var res QueryObjectsReturns
|
||||
@@ -680,7 +728,8 @@ type ReleaseObjectParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-releaseObject
|
||||
//
|
||||
// parameters:
|
||||
// objectID - Identifier of the object to release.
|
||||
//
|
||||
// objectID - Identifier of the object to release.
|
||||
func ReleaseObject(objectID RemoteObjectID) *ReleaseObjectParams {
|
||||
return &ReleaseObjectParams{
|
||||
ObjectID: objectID,
|
||||
@@ -704,7 +753,8 @@ type ReleaseObjectGroupParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-releaseObjectGroup
|
||||
//
|
||||
// parameters:
|
||||
// objectGroup - Symbolic object group name.
|
||||
//
|
||||
// objectGroup - Symbolic object group name.
|
||||
func ReleaseObjectGroup(objectGroup string) *ReleaseObjectGroupParams {
|
||||
return &ReleaseObjectGroupParams{
|
||||
ObjectGroup: objectGroup,
|
||||
@@ -750,7 +800,8 @@ type RunScriptParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-runScript
|
||||
//
|
||||
// parameters:
|
||||
// scriptID - Id of the script to run.
|
||||
//
|
||||
// scriptID - Id of the script to run.
|
||||
func RunScript(scriptID ScriptID) *RunScriptParams {
|
||||
return &RunScriptParams{
|
||||
ScriptID: scriptID,
|
||||
@@ -815,8 +866,9 @@ type RunScriptReturns struct {
|
||||
// Do executes Runtime.runScript against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// result - Run result.
|
||||
// exceptionDetails - Exception details.
|
||||
//
|
||||
// result - Run result.
|
||||
// exceptionDetails - Exception details.
|
||||
func (p *RunScriptParams) Do(ctx context.Context) (result *RemoteObject, exceptionDetails *ExceptionDetails, err error) {
|
||||
// execute
|
||||
var res RunScriptReturns
|
||||
@@ -838,7 +890,8 @@ type SetCustomObjectFormatterEnabledParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-setCustomObjectFormatterEnabled
|
||||
//
|
||||
// parameters:
|
||||
// enabled
|
||||
//
|
||||
// enabled
|
||||
func SetCustomObjectFormatterEnabled(enabled bool) *SetCustomObjectFormatterEnabledParams {
|
||||
return &SetCustomObjectFormatterEnabledParams{
|
||||
Enabled: enabled,
|
||||
@@ -860,7 +913,8 @@ type SetMaxCallStackSizeToCaptureParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-setMaxCallStackSizeToCapture
|
||||
//
|
||||
// parameters:
|
||||
// size
|
||||
//
|
||||
// size
|
||||
func SetMaxCallStackSizeToCapture(size int64) *SetMaxCallStackSizeToCaptureParams {
|
||||
return &SetMaxCallStackSizeToCaptureParams{
|
||||
Size: size,
|
||||
@@ -910,7 +964,8 @@ type AddBindingParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-addBinding
|
||||
//
|
||||
// parameters:
|
||||
// name
|
||||
//
|
||||
// name
|
||||
func AddBinding(name string) *AddBindingParams {
|
||||
return &AddBindingParams{
|
||||
Name: name,
|
||||
@@ -946,7 +1001,8 @@ type RemoveBindingParams struct {
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-removeBinding
|
||||
//
|
||||
// parameters:
|
||||
// name
|
||||
//
|
||||
// name
|
||||
func RemoveBinding(name string) *RemoveBindingParams {
|
||||
return &RemoveBindingParams{
|
||||
Name: name,
|
||||
@@ -958,6 +1014,51 @@ func (p *RemoveBindingParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandRemoveBinding, p, nil)
|
||||
}
|
||||
|
||||
// GetExceptionDetailsParams 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.
|
||||
type GetExceptionDetailsParams struct {
|
||||
ErrorObjectID RemoteObjectID `json:"errorObjectId"` // The error object for which to resolve the exception details.
|
||||
}
|
||||
|
||||
// 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.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#method-getExceptionDetails
|
||||
//
|
||||
// parameters:
|
||||
//
|
||||
// errorObjectID - The error object for which to resolve the exception details.
|
||||
func GetExceptionDetails(errorObjectID RemoteObjectID) *GetExceptionDetailsParams {
|
||||
return &GetExceptionDetailsParams{
|
||||
ErrorObjectID: errorObjectID,
|
||||
}
|
||||
}
|
||||
|
||||
// GetExceptionDetailsReturns return values.
|
||||
type GetExceptionDetailsReturns struct {
|
||||
ExceptionDetails *ExceptionDetails `json:"exceptionDetails,omitempty"`
|
||||
}
|
||||
|
||||
// Do executes Runtime.getExceptionDetails against the provided context.
|
||||
//
|
||||
// returns:
|
||||
//
|
||||
// exceptionDetails
|
||||
func (p *GetExceptionDetailsParams) Do(ctx context.Context) (exceptionDetails *ExceptionDetails, err error) {
|
||||
// execute
|
||||
var res GetExceptionDetailsReturns
|
||||
err = cdp.Execute(ctx, CommandGetExceptionDetails, p, &res)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return res.ExceptionDetails, nil
|
||||
}
|
||||
|
||||
// Command names.
|
||||
const (
|
||||
CommandAwaitPromise = "Runtime.awaitPromise"
|
||||
@@ -981,4 +1082,5 @@ const (
|
||||
CommandTerminateExecution = "Runtime.terminateExecution"
|
||||
CommandAddBinding = "Runtime.addBinding"
|
||||
CommandRemoveBinding = "Runtime.removeBinding"
|
||||
CommandGetExceptionDetails = "Runtime.getExceptionDetails"
|
||||
)
|
||||
|
||||
135
vendor/github.com/chromedp/cdproto/runtime/types.go
generated
vendored
135
vendor/github.com/chromedp/cdproto/runtime/types.go
generated
vendored
@@ -3,7 +3,6 @@ package runtime
|
||||
// Code generated by cdproto-gen. DO NOT EDIT.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
@@ -24,6 +23,16 @@ func (t ScriptID) String() string {
|
||||
return string(t)
|
||||
}
|
||||
|
||||
// WebDriverValue represents the value serialiazed by the WebDriver BiDi
|
||||
// specification https://w3c.github.io/webdriver-bidi.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#type-WebDriverValue
|
||||
type WebDriverValue struct {
|
||||
Type WebDriverValueType `json:"type"`
|
||||
Value easyjson.RawMessage `json:"value,omitempty"`
|
||||
ObjectID string `json:"objectId,omitempty"`
|
||||
}
|
||||
|
||||
// RemoteObjectID unique object identifier.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#type-RemoteObjectId
|
||||
@@ -55,6 +64,7 @@ type RemoteObject struct {
|
||||
Value easyjson.RawMessage `json:"value,omitempty"` // Remote object value in case of primitive values or JSON values (if it was requested).
|
||||
UnserializableValue UnserializableValue `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 *WebDriverValue `json:"webDriverValue,omitempty"` // WebDriver BiDi representation of the value.
|
||||
ObjectID RemoteObjectID `json:"objectId,omitempty"` // Unique object identifier (for non-primitive values).
|
||||
Preview *ObjectPreview `json:"preview,omitempty"` // Preview containing abbreviated property values. Specified for object type values only.
|
||||
CustomPreview *CustomPreview `json:"customPreview,omitempty"`
|
||||
@@ -279,6 +289,114 @@ type StackTraceID struct {
|
||||
DebuggerID UniqueDebuggerID `json:"debuggerId,omitempty"`
|
||||
}
|
||||
|
||||
// WebDriverValueType [no description].
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#type-WebDriverValue
|
||||
type WebDriverValueType string
|
||||
|
||||
// String returns the WebDriverValueType as string value.
|
||||
func (t WebDriverValueType) String() string {
|
||||
return string(t)
|
||||
}
|
||||
|
||||
// WebDriverValueType values.
|
||||
const (
|
||||
WebDriverValueTypeUndefined WebDriverValueType = "undefined"
|
||||
WebDriverValueTypeNull WebDriverValueType = "null"
|
||||
WebDriverValueTypeString WebDriverValueType = "string"
|
||||
WebDriverValueTypeNumber WebDriverValueType = "number"
|
||||
WebDriverValueTypeBoolean WebDriverValueType = "boolean"
|
||||
WebDriverValueTypeBigint WebDriverValueType = "bigint"
|
||||
WebDriverValueTypeRegexp WebDriverValueType = "regexp"
|
||||
WebDriverValueTypeDate WebDriverValueType = "date"
|
||||
WebDriverValueTypeSymbol WebDriverValueType = "symbol"
|
||||
WebDriverValueTypeArray WebDriverValueType = "array"
|
||||
WebDriverValueTypeObject WebDriverValueType = "object"
|
||||
WebDriverValueTypeFunction WebDriverValueType = "function"
|
||||
WebDriverValueTypeMap WebDriverValueType = "map"
|
||||
WebDriverValueTypeSet WebDriverValueType = "set"
|
||||
WebDriverValueTypeWeakmap WebDriverValueType = "weakmap"
|
||||
WebDriverValueTypeWeakset WebDriverValueType = "weakset"
|
||||
WebDriverValueTypeError WebDriverValueType = "error"
|
||||
WebDriverValueTypeProxy WebDriverValueType = "proxy"
|
||||
WebDriverValueTypePromise WebDriverValueType = "promise"
|
||||
WebDriverValueTypeTypedarray WebDriverValueType = "typedarray"
|
||||
WebDriverValueTypeArraybuffer WebDriverValueType = "arraybuffer"
|
||||
WebDriverValueTypeNode WebDriverValueType = "node"
|
||||
WebDriverValueTypeWindow WebDriverValueType = "window"
|
||||
)
|
||||
|
||||
// MarshalEasyJSON satisfies easyjson.Marshaler.
|
||||
func (t WebDriverValueType) MarshalEasyJSON(out *jwriter.Writer) {
|
||||
out.String(string(t))
|
||||
}
|
||||
|
||||
// MarshalJSON satisfies json.Marshaler.
|
||||
func (t WebDriverValueType) MarshalJSON() ([]byte, error) {
|
||||
return easyjson.Marshal(t)
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *WebDriverValueType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
v := in.String()
|
||||
switch WebDriverValueType(v) {
|
||||
case WebDriverValueTypeUndefined:
|
||||
*t = WebDriverValueTypeUndefined
|
||||
case WebDriverValueTypeNull:
|
||||
*t = WebDriverValueTypeNull
|
||||
case WebDriverValueTypeString:
|
||||
*t = WebDriverValueTypeString
|
||||
case WebDriverValueTypeNumber:
|
||||
*t = WebDriverValueTypeNumber
|
||||
case WebDriverValueTypeBoolean:
|
||||
*t = WebDriverValueTypeBoolean
|
||||
case WebDriverValueTypeBigint:
|
||||
*t = WebDriverValueTypeBigint
|
||||
case WebDriverValueTypeRegexp:
|
||||
*t = WebDriverValueTypeRegexp
|
||||
case WebDriverValueTypeDate:
|
||||
*t = WebDriverValueTypeDate
|
||||
case WebDriverValueTypeSymbol:
|
||||
*t = WebDriverValueTypeSymbol
|
||||
case WebDriverValueTypeArray:
|
||||
*t = WebDriverValueTypeArray
|
||||
case WebDriverValueTypeObject:
|
||||
*t = WebDriverValueTypeObject
|
||||
case WebDriverValueTypeFunction:
|
||||
*t = WebDriverValueTypeFunction
|
||||
case WebDriverValueTypeMap:
|
||||
*t = WebDriverValueTypeMap
|
||||
case WebDriverValueTypeSet:
|
||||
*t = WebDriverValueTypeSet
|
||||
case WebDriverValueTypeWeakmap:
|
||||
*t = WebDriverValueTypeWeakmap
|
||||
case WebDriverValueTypeWeakset:
|
||||
*t = WebDriverValueTypeWeakset
|
||||
case WebDriverValueTypeError:
|
||||
*t = WebDriverValueTypeError
|
||||
case WebDriverValueTypeProxy:
|
||||
*t = WebDriverValueTypeProxy
|
||||
case WebDriverValueTypePromise:
|
||||
*t = WebDriverValueTypePromise
|
||||
case WebDriverValueTypeTypedarray:
|
||||
*t = WebDriverValueTypeTypedarray
|
||||
case WebDriverValueTypeArraybuffer:
|
||||
*t = WebDriverValueTypeArraybuffer
|
||||
case WebDriverValueTypeNode:
|
||||
*t = WebDriverValueTypeNode
|
||||
case WebDriverValueTypeWindow:
|
||||
*t = WebDriverValueTypeWindow
|
||||
|
||||
default:
|
||||
in.AddError(fmt.Errorf("unknown WebDriverValueType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
// UnmarshalJSON satisfies json.Unmarshaler.
|
||||
func (t *WebDriverValueType) UnmarshalJSON(buf []byte) error {
|
||||
return easyjson.Unmarshal(buf, t)
|
||||
}
|
||||
|
||||
// Type object type.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#type-RemoteObject
|
||||
@@ -314,7 +432,8 @@ func (t Type) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *Type) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch Type(in.String()) {
|
||||
v := in.String()
|
||||
switch Type(v) {
|
||||
case TypeObject:
|
||||
*t = TypeObject
|
||||
case TypeFunction:
|
||||
@@ -335,7 +454,7 @@ func (t *Type) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = TypeAccessor
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown Type value"))
|
||||
in.AddError(fmt.Errorf("unknown Type value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -391,7 +510,8 @@ func (t Subtype) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *Subtype) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch Subtype(in.String()) {
|
||||
v := in.String()
|
||||
switch Subtype(v) {
|
||||
case SubtypeArray:
|
||||
*t = SubtypeArray
|
||||
case SubtypeNull:
|
||||
@@ -432,7 +552,7 @@ func (t *Subtype) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = SubtypeWasmvalue
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown Subtype value"))
|
||||
in.AddError(fmt.Errorf("unknown Subtype value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -485,7 +605,8 @@ func (t APIType) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
|
||||
func (t *APIType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
switch APIType(in.String()) {
|
||||
v := in.String()
|
||||
switch APIType(v) {
|
||||
case APITypeLog:
|
||||
*t = APITypeLog
|
||||
case APITypeDebug:
|
||||
@@ -524,7 +645,7 @@ func (t *APIType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||
*t = APITypeTimeEnd
|
||||
|
||||
default:
|
||||
in.AddError(errors.New("unknown APIType value"))
|
||||
in.AddError(fmt.Errorf("unknown APIType value: %v", v))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
188
vendor/github.com/chromedp/cdproto/security/easyjson.go
generated
vendored
188
vendor/github.com/chromedp/cdproto/security/easyjson.go
generated
vendored
@@ -62,22 +62,22 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity(in *jlexer.Lexer, ou
|
||||
case "securityStateIssueIds":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
out.SecurityStateIssueIds = nil
|
||||
out.SecurityStateIssueIDs = nil
|
||||
} else {
|
||||
in.Delim('[')
|
||||
if out.SecurityStateIssueIds == nil {
|
||||
if out.SecurityStateIssueIDs == nil {
|
||||
if !in.IsDelim(']') {
|
||||
out.SecurityStateIssueIds = make([]string, 0, 4)
|
||||
out.SecurityStateIssueIDs = make([]string, 0, 4)
|
||||
} else {
|
||||
out.SecurityStateIssueIds = []string{}
|
||||
out.SecurityStateIssueIDs = []string{}
|
||||
}
|
||||
} else {
|
||||
out.SecurityStateIssueIds = (out.SecurityStateIssueIds)[:0]
|
||||
out.SecurityStateIssueIDs = (out.SecurityStateIssueIDs)[:0]
|
||||
}
|
||||
for !in.IsDelim(']') {
|
||||
var v1 string
|
||||
v1 = string(in.String())
|
||||
out.SecurityStateIssueIds = append(out.SecurityStateIssueIds, v1)
|
||||
out.SecurityStateIssueIDs = append(out.SecurityStateIssueIDs, v1)
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim(']')
|
||||
@@ -114,11 +114,11 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity(out *jwriter.Writer,
|
||||
{
|
||||
const prefix string = ",\"securityStateIssueIds\":"
|
||||
out.RawString(prefix)
|
||||
if in.SecurityStateIssueIds == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
if in.SecurityStateIssueIDs == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v2, v3 := range in.SecurityStateIssueIds {
|
||||
for v2, v3 := range in.SecurityStateIssueIDs {
|
||||
if v2 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
@@ -540,131 +540,7 @@ func (v *EventVisibleSecurityStateChanged) UnmarshalJSON(data []byte) error {
|
||||
func (v *EventVisibleSecurityStateChanged) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity4(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity5(in *jlexer.Lexer, out *EventSecurityStateChanged) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
in.Skip()
|
||||
return
|
||||
}
|
||||
in.Delim('{')
|
||||
for !in.IsDelim('}') {
|
||||
key := in.UnsafeFieldName(false)
|
||||
in.WantColon()
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
in.WantComma()
|
||||
continue
|
||||
}
|
||||
switch key {
|
||||
case "securityState":
|
||||
(out.SecurityState).UnmarshalEasyJSON(in)
|
||||
case "explanations":
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
out.Explanations = nil
|
||||
} else {
|
||||
in.Delim('[')
|
||||
if out.Explanations == nil {
|
||||
if !in.IsDelim(']') {
|
||||
out.Explanations = make([]*StateExplanation, 0, 8)
|
||||
} else {
|
||||
out.Explanations = []*StateExplanation{}
|
||||
}
|
||||
} else {
|
||||
out.Explanations = (out.Explanations)[:0]
|
||||
}
|
||||
for !in.IsDelim(']') {
|
||||
var v10 *StateExplanation
|
||||
if in.IsNull() {
|
||||
in.Skip()
|
||||
v10 = nil
|
||||
} else {
|
||||
if v10 == nil {
|
||||
v10 = new(StateExplanation)
|
||||
}
|
||||
(*v10).UnmarshalEasyJSON(in)
|
||||
}
|
||||
out.Explanations = append(out.Explanations, v10)
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim(']')
|
||||
}
|
||||
case "summary":
|
||||
out.Summary = string(in.String())
|
||||
default:
|
||||
in.SkipRecursive()
|
||||
}
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim('}')
|
||||
if isTopLevel {
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity5(out *jwriter.Writer, in EventSecurityStateChanged) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
{
|
||||
const prefix string = ",\"securityState\":"
|
||||
out.RawString(prefix[1:])
|
||||
(in.SecurityState).MarshalEasyJSON(out)
|
||||
}
|
||||
{
|
||||
const prefix string = ",\"explanations\":"
|
||||
out.RawString(prefix)
|
||||
if in.Explanations == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v11, v12 := range in.Explanations {
|
||||
if v11 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
if v12 == nil {
|
||||
out.RawString("null")
|
||||
} else {
|
||||
(*v12).MarshalEasyJSON(out)
|
||||
}
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
}
|
||||
if in.Summary != "" {
|
||||
const prefix string = ",\"summary\":"
|
||||
out.RawString(prefix)
|
||||
out.String(string(in.Summary))
|
||||
}
|
||||
out.RawByte('}')
|
||||
}
|
||||
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v EventSecurityStateChanged) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity5(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v EventSecurityStateChanged) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity5(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *EventSecurityStateChanged) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity5(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *EventSecurityStateChanged) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity5(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity6(in *jlexer.Lexer, out *EnableParams) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity5(in *jlexer.Lexer, out *EnableParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -693,7 +569,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity6(in *jlexer.Lexer, o
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity6(out *jwriter.Writer, in EnableParams) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity5(out *jwriter.Writer, in EnableParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -703,27 +579,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity6(out *jwriter.Writer
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v EnableParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity6(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity5(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity6(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity5(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *EnableParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity6(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity5(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity6(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity5(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity7(in *jlexer.Lexer, out *DisableParams) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity6(in *jlexer.Lexer, out *DisableParams) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -752,7 +628,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity7(in *jlexer.Lexer, o
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity7(out *jwriter.Writer, in DisableParams) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity6(out *jwriter.Writer, in DisableParams) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -762,27 +638,27 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity7(out *jwriter.Writer
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v DisableParams) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity7(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity6(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity7(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity6(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *DisableParams) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity7(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity6(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity7(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity6(l, v)
|
||||
}
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity8(in *jlexer.Lexer, out *CertificateSecurityState) {
|
||||
func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity7(in *jlexer.Lexer, out *CertificateSecurityState) {
|
||||
isTopLevel := in.IsStart()
|
||||
if in.IsNull() {
|
||||
if isTopLevel {
|
||||
@@ -827,9 +703,9 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity8(in *jlexer.Lexer, o
|
||||
out.Certificate = (out.Certificate)[:0]
|
||||
}
|
||||
for !in.IsDelim(']') {
|
||||
var v13 string
|
||||
v13 = string(in.String())
|
||||
out.Certificate = append(out.Certificate, v13)
|
||||
var v10 string
|
||||
v10 = string(in.String())
|
||||
out.Certificate = append(out.Certificate, v10)
|
||||
in.WantComma()
|
||||
}
|
||||
in.Delim(']')
|
||||
@@ -884,7 +760,7 @@ func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity8(in *jlexer.Lexer, o
|
||||
in.Consumed()
|
||||
}
|
||||
}
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity8(out *jwriter.Writer, in CertificateSecurityState) {
|
||||
func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity7(out *jwriter.Writer, in CertificateSecurityState) {
|
||||
out.RawByte('{')
|
||||
first := true
|
||||
_ = first
|
||||
@@ -920,11 +796,11 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity8(out *jwriter.Writer
|
||||
out.RawString("null")
|
||||
} else {
|
||||
out.RawByte('[')
|
||||
for v14, v15 := range in.Certificate {
|
||||
if v14 > 0 {
|
||||
for v11, v12 := range in.Certificate {
|
||||
if v11 > 0 {
|
||||
out.RawByte(',')
|
||||
}
|
||||
out.String(string(v15))
|
||||
out.String(string(v12))
|
||||
}
|
||||
out.RawByte(']')
|
||||
}
|
||||
@@ -1003,23 +879,23 @@ func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity8(out *jwriter.Writer
|
||||
// MarshalJSON supports json.Marshaler interface
|
||||
func (v CertificateSecurityState) MarshalJSON() ([]byte, error) {
|
||||
w := jwriter.Writer{}
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity8(&w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity7(&w, v)
|
||||
return w.Buffer.BuildBytes(), w.Error
|
||||
}
|
||||
|
||||
// MarshalEasyJSON supports easyjson.Marshaler interface
|
||||
func (v CertificateSecurityState) MarshalEasyJSON(w *jwriter.Writer) {
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity8(w, v)
|
||||
easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity7(w, v)
|
||||
}
|
||||
|
||||
// UnmarshalJSON supports json.Unmarshaler interface
|
||||
func (v *CertificateSecurityState) UnmarshalJSON(data []byte) error {
|
||||
r := jlexer.Lexer{Data: data}
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity8(&r, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity7(&r, v)
|
||||
return r.Error()
|
||||
}
|
||||
|
||||
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
|
||||
func (v *CertificateSecurityState) UnmarshalEasyJSON(l *jlexer.Lexer) {
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity8(l, v)
|
||||
easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity7(l, v)
|
||||
}
|
||||
|
||||
9
vendor/github.com/chromedp/cdproto/security/events.go
generated
vendored
9
vendor/github.com/chromedp/cdproto/security/events.go
generated
vendored
@@ -8,12 +8,3 @@ package security
|
||||
type EventVisibleSecurityStateChanged struct {
|
||||
VisibleSecurityState *VisibleSecurityState `json:"visibleSecurityState"` // Security state information about the page.
|
||||
}
|
||||
|
||||
// EventSecurityStateChanged the security state of the page changed.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Security#event-securityStateChanged
|
||||
type EventSecurityStateChanged struct {
|
||||
SecurityState State `json:"securityState"` // Security state.
|
||||
Explanations []*StateExplanation `json:"explanations"` // List of explanations for the security state. If the overall security state is insecure or warning, at least one corresponding explanation should be included.
|
||||
Summary string `json:"summary,omitempty"` // Overrides user-visible description of the state.
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user