Updating to latest protocol.json

This commit is contained in:
Kenneth Shaw 2017-08-22 16:23:52 +07:00
parent b6cbbcbe03
commit 50c2d576db
7 changed files with 731 additions and 210 deletions

View File

@ -265,6 +265,7 @@ const (
CommandDOMGetBoxModel MethodType = "DOM.getBoxModel" CommandDOMGetBoxModel MethodType = "DOM.getBoxModel"
CommandDOMGetNodeForLocation MethodType = "DOM.getNodeForLocation" CommandDOMGetNodeForLocation MethodType = "DOM.getNodeForLocation"
CommandDOMGetRelayoutBoundary MethodType = "DOM.getRelayoutBoundary" CommandDOMGetRelayoutBoundary MethodType = "DOM.getRelayoutBoundary"
CommandDOMDescribeNode MethodType = "DOM.describeNode"
EventCSSMediaQueryResultChanged MethodType = "CSS.mediaQueryResultChanged" EventCSSMediaQueryResultChanged MethodType = "CSS.mediaQueryResultChanged"
EventCSSFontsUpdated MethodType = "CSS.fontsUpdated" EventCSSFontsUpdated MethodType = "CSS.fontsUpdated"
EventCSSStyleSheetChanged MethodType = "CSS.styleSheetChanged" EventCSSStyleSheetChanged MethodType = "CSS.styleSheetChanged"
@ -423,6 +424,7 @@ const (
CommandRuntimeSetCustomObjectFormatterEnabled MethodType = "Runtime.setCustomObjectFormatterEnabled" CommandRuntimeSetCustomObjectFormatterEnabled MethodType = "Runtime.setCustomObjectFormatterEnabled"
CommandRuntimeCompileScript MethodType = "Runtime.compileScript" CommandRuntimeCompileScript MethodType = "Runtime.compileScript"
CommandRuntimeRunScript MethodType = "Runtime.runScript" CommandRuntimeRunScript MethodType = "Runtime.runScript"
CommandRuntimeQueryObjects MethodType = "Runtime.queryObjects"
EventDebuggerScriptParsed MethodType = "Debugger.scriptParsed" EventDebuggerScriptParsed MethodType = "Debugger.scriptParsed"
EventDebuggerScriptFailedToParse MethodType = "Debugger.scriptFailedToParse" EventDebuggerScriptFailedToParse MethodType = "Debugger.scriptFailedToParse"
EventDebuggerBreakpointResolved MethodType = "Debugger.breakpointResolved" EventDebuggerBreakpointResolved MethodType = "Debugger.breakpointResolved"
@ -927,6 +929,8 @@ func (t *MethodType) UnmarshalEasyJSON(in *jlexer.Lexer) {
*t = CommandDOMGetNodeForLocation *t = CommandDOMGetNodeForLocation
case CommandDOMGetRelayoutBoundary: case CommandDOMGetRelayoutBoundary:
*t = CommandDOMGetRelayoutBoundary *t = CommandDOMGetRelayoutBoundary
case CommandDOMDescribeNode:
*t = CommandDOMDescribeNode
case EventCSSMediaQueryResultChanged: case EventCSSMediaQueryResultChanged:
*t = EventCSSMediaQueryResultChanged *t = EventCSSMediaQueryResultChanged
case EventCSSFontsUpdated: case EventCSSFontsUpdated:
@ -1243,6 +1247,8 @@ func (t *MethodType) UnmarshalEasyJSON(in *jlexer.Lexer) {
*t = CommandRuntimeCompileScript *t = CommandRuntimeCompileScript
case CommandRuntimeRunScript: case CommandRuntimeRunScript:
*t = CommandRuntimeRunScript *t = CommandRuntimeRunScript
case CommandRuntimeQueryObjects:
*t = CommandRuntimeQueryObjects
case EventDebuggerScriptParsed: case EventDebuggerScriptParsed:
*t = EventDebuggerScriptParsed *t = EventDebuggerScriptParsed
case EventDebuggerScriptFailedToParse: case EventDebuggerScriptFailedToParse:

View File

@ -658,6 +658,9 @@ func UnmarshalMessage(msg *cdp.Message) (interface{}, error) {
case cdp.CommandDOMGetRelayoutBoundary: case cdp.CommandDOMGetRelayoutBoundary:
v = new(dom.GetRelayoutBoundaryReturns) v = new(dom.GetRelayoutBoundaryReturns)
case cdp.CommandDOMDescribeNode:
v = new(dom.DescribeNodeReturns)
case cdp.EventDOMDocumentUpdated: case cdp.EventDOMDocumentUpdated:
v = new(dom.EventDocumentUpdated) v = new(dom.EventDocumentUpdated)
@ -1153,6 +1156,9 @@ func UnmarshalMessage(msg *cdp.Message) (interface{}, error) {
case cdp.CommandRuntimeRunScript: case cdp.CommandRuntimeRunScript:
v = new(runtime.RunScriptReturns) v = new(runtime.RunScriptReturns)
case cdp.CommandRuntimeQueryObjects:
v = new(runtime.QueryObjectsReturns)
case cdp.EventRuntimeExecutionContextCreated: case cdp.EventRuntimeExecutionContextCreated:
v = new(runtime.EventExecutionContextCreated) v = new(runtime.EventExecutionContextCreated)

View File

@ -1269,3 +1269,75 @@ func (p *GetRelayoutBoundaryParams) Do(ctxt context.Context, h cdp.Handler) (nod
return res.NodeID, nil return res.NodeID, nil
} }
// DescribeNodeParams describes node given its id, does not require domain to
// be enabled. Does not start tracking any objects, can be used for automation.
type DescribeNodeParams struct {
NodeID cdp.NodeID `json:"nodeId,omitempty"` // Identifier of the node.
BackendNodeID cdp.BackendNodeID `json:"backendNodeId,omitempty"` // Identifier of the backend node.
ObjectID runtime.RemoteObjectID `json:"objectId,omitempty"` // JavaScript object id of the node wrapper.
Depth int64 `json:"depth,omitempty"` // The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.
Pierce bool `json:"pierce,omitempty"` // Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false).
}
// DescribeNode describes node given its id, does not require domain to be
// enabled. Does not start tracking any objects, can be used for automation.
//
// parameters:
func DescribeNode() *DescribeNodeParams {
return &DescribeNodeParams{}
}
// WithNodeID identifier of the node.
func (p DescribeNodeParams) WithNodeID(nodeID cdp.NodeID) *DescribeNodeParams {
p.NodeID = nodeID
return &p
}
// WithBackendNodeID identifier of the backend node.
func (p DescribeNodeParams) WithBackendNodeID(backendNodeID cdp.BackendNodeID) *DescribeNodeParams {
p.BackendNodeID = backendNodeID
return &p
}
// WithObjectID javaScript object id of the node wrapper.
func (p DescribeNodeParams) WithObjectID(objectID runtime.RemoteObjectID) *DescribeNodeParams {
p.ObjectID = objectID
return &p
}
// WithDepth the maximum depth at which children should be retrieved,
// defaults to 1. Use -1 for the entire subtree or provide an integer larger
// than 0.
func (p DescribeNodeParams) WithDepth(depth int64) *DescribeNodeParams {
p.Depth = depth
return &p
}
// WithPierce whether or not iframes and shadow roots should be traversed
// when returning the subtree (default is false).
func (p DescribeNodeParams) WithPierce(pierce bool) *DescribeNodeParams {
p.Pierce = pierce
return &p
}
// DescribeNodeReturns return values.
type DescribeNodeReturns struct {
Node *cdp.Node `json:"node,omitempty"` // Node description.
}
// Do executes DOM.describeNode against the provided context and
// target handler.
//
// returns:
// node - Node description.
func (p *DescribeNodeParams) Do(ctxt context.Context, h cdp.Handler) (node *cdp.Node, err error) {
// execute
var res DescribeNodeReturns
err = h.Execute(ctxt, cdp.CommandDOMDescribeNode, p, &res)
if err != nil {
return nil, err
}
return res.Node, nil
}

View File

@ -5419,7 +5419,197 @@ func (v *DisableParams) UnmarshalJSON(data []byte) error {
func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) { func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom65(l, v) easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom65(l, v)
} }
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom66(in *jlexer.Lexer, out *CopyToReturns) { func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom66(in *jlexer.Lexer, out *DescribeNodeReturns) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
in.Consumed()
}
in.Skip()
return
}
in.Delim('{')
for !in.IsDelim('}') {
key := in.UnsafeString()
in.WantColon()
if in.IsNull() {
in.Skip()
in.WantComma()
continue
}
switch key {
case "node":
if in.IsNull() {
in.Skip()
out.Node = nil
} else {
if out.Node == nil {
out.Node = new(cdp.Node)
}
(*out.Node).UnmarshalEasyJSON(in)
}
default:
in.SkipRecursive()
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom66(out *jwriter.Writer, in DescribeNodeReturns) {
out.RawByte('{')
first := true
_ = first
if in.Node != nil {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"node\":")
if in.Node == nil {
out.RawString("null")
} else {
(*in.Node).MarshalEasyJSON(out)
}
}
out.RawByte('}')
}
// MarshalJSON supports json.Marshaler interface
func (v DescribeNodeReturns) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom66(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v DescribeNodeReturns) MarshalEasyJSON(w *jwriter.Writer) {
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom66(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *DescribeNodeReturns) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom66(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *DescribeNodeReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom66(l, v)
}
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom67(in *jlexer.Lexer, out *DescribeNodeParams) {
isTopLevel := in.IsStart()
if in.IsNull() {
if isTopLevel {
in.Consumed()
}
in.Skip()
return
}
in.Delim('{')
for !in.IsDelim('}') {
key := in.UnsafeString()
in.WantColon()
if in.IsNull() {
in.Skip()
in.WantComma()
continue
}
switch key {
case "nodeId":
(out.NodeID).UnmarshalEasyJSON(in)
case "backendNodeId":
(out.BackendNodeID).UnmarshalEasyJSON(in)
case "objectId":
out.ObjectID = runtime.RemoteObjectID(in.String())
case "depth":
out.Depth = int64(in.Int64())
case "pierce":
out.Pierce = bool(in.Bool())
default:
in.SkipRecursive()
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom67(out *jwriter.Writer, in DescribeNodeParams) {
out.RawByte('{')
first := true
_ = first
if in.NodeID != 0 {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"nodeId\":")
out.Int64(int64(in.NodeID))
}
if in.BackendNodeID != 0 {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"backendNodeId\":")
out.Int64(int64(in.BackendNodeID))
}
if in.ObjectID != "" {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"objectId\":")
out.String(string(in.ObjectID))
}
if in.Depth != 0 {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"depth\":")
out.Int64(int64(in.Depth))
}
if in.Pierce {
if !first {
out.RawByte(',')
}
first = false
out.RawString("\"pierce\":")
out.Bool(bool(in.Pierce))
}
out.RawByte('}')
}
// MarshalJSON supports json.Marshaler interface
func (v DescribeNodeParams) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom67(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v DescribeNodeParams) MarshalEasyJSON(w *jwriter.Writer) {
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom67(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *DescribeNodeParams) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom67(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *DescribeNodeParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom67(l, v)
}
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom68(in *jlexer.Lexer, out *CopyToReturns) {
isTopLevel := in.IsStart() isTopLevel := in.IsStart()
if in.IsNull() { if in.IsNull() {
if isTopLevel { if isTopLevel {
@ -5450,7 +5640,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom66(in *jlexer.Lexer, out *C
in.Consumed() in.Consumed()
} }
} }
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom66(out *jwriter.Writer, in CopyToReturns) { func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom68(out *jwriter.Writer, in CopyToReturns) {
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
@ -5468,27 +5658,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom66(out *jwriter.Writer, in
// MarshalJSON supports json.Marshaler interface // MarshalJSON supports json.Marshaler interface
func (v CopyToReturns) MarshalJSON() ([]byte, error) { func (v CopyToReturns) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{} w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom66(&w, v) easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom68(&w, v)
return w.Buffer.BuildBytes(), w.Error return w.Buffer.BuildBytes(), w.Error
} }
// MarshalEasyJSON supports easyjson.Marshaler interface // MarshalEasyJSON supports easyjson.Marshaler interface
func (v CopyToReturns) MarshalEasyJSON(w *jwriter.Writer) { func (v CopyToReturns) MarshalEasyJSON(w *jwriter.Writer) {
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom66(w, v) easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom68(w, v)
} }
// UnmarshalJSON supports json.Unmarshaler interface // UnmarshalJSON supports json.Unmarshaler interface
func (v *CopyToReturns) UnmarshalJSON(data []byte) error { func (v *CopyToReturns) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data} r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom66(&r, v) easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom68(&r, v)
return r.Error() return r.Error()
} }
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *CopyToReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { func (v *CopyToReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom66(l, v) easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom68(l, v)
} }
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom67(in *jlexer.Lexer, out *CopyToParams) { func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom69(in *jlexer.Lexer, out *CopyToParams) {
isTopLevel := in.IsStart() isTopLevel := in.IsStart()
if in.IsNull() { if in.IsNull() {
if isTopLevel { if isTopLevel {
@ -5523,7 +5713,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom67(in *jlexer.Lexer, out *C
in.Consumed() in.Consumed()
} }
} }
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom67(out *jwriter.Writer, in CopyToParams) { func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom69(out *jwriter.Writer, in CopyToParams) {
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
@ -5553,27 +5743,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom67(out *jwriter.Writer, in
// MarshalJSON supports json.Marshaler interface // MarshalJSON supports json.Marshaler interface
func (v CopyToParams) MarshalJSON() ([]byte, error) { func (v CopyToParams) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{} w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom67(&w, v) easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom69(&w, v)
return w.Buffer.BuildBytes(), w.Error return w.Buffer.BuildBytes(), w.Error
} }
// MarshalEasyJSON supports easyjson.Marshaler interface // MarshalEasyJSON supports easyjson.Marshaler interface
func (v CopyToParams) MarshalEasyJSON(w *jwriter.Writer) { func (v CopyToParams) MarshalEasyJSON(w *jwriter.Writer) {
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom67(w, v) easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom69(w, v)
} }
// UnmarshalJSON supports json.Unmarshaler interface // UnmarshalJSON supports json.Unmarshaler interface
func (v *CopyToParams) UnmarshalJSON(data []byte) error { func (v *CopyToParams) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data} r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom67(&r, v) easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom69(&r, v)
return r.Error() return r.Error()
} }
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *CopyToParams) UnmarshalEasyJSON(l *jlexer.Lexer) { func (v *CopyToParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom67(l, v) easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom69(l, v)
} }
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom68(in *jlexer.Lexer, out *CollectClassNamesFromSubtreeReturns) { func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom70(in *jlexer.Lexer, out *CollectClassNamesFromSubtreeReturns) {
isTopLevel := in.IsStart() isTopLevel := in.IsStart()
if in.IsNull() { if in.IsNull() {
if isTopLevel { if isTopLevel {
@ -5625,7 +5815,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom68(in *jlexer.Lexer, out *C
in.Consumed() in.Consumed()
} }
} }
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom68(out *jwriter.Writer, in CollectClassNamesFromSubtreeReturns) { func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom70(out *jwriter.Writer, in CollectClassNamesFromSubtreeReturns) {
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
@ -5654,27 +5844,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom68(out *jwriter.Writer, in
// MarshalJSON supports json.Marshaler interface // MarshalJSON supports json.Marshaler interface
func (v CollectClassNamesFromSubtreeReturns) MarshalJSON() ([]byte, error) { func (v CollectClassNamesFromSubtreeReturns) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{} w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom68(&w, v) easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom70(&w, v)
return w.Buffer.BuildBytes(), w.Error return w.Buffer.BuildBytes(), w.Error
} }
// MarshalEasyJSON supports easyjson.Marshaler interface // MarshalEasyJSON supports easyjson.Marshaler interface
func (v CollectClassNamesFromSubtreeReturns) MarshalEasyJSON(w *jwriter.Writer) { func (v CollectClassNamesFromSubtreeReturns) MarshalEasyJSON(w *jwriter.Writer) {
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom68(w, v) easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom70(w, v)
} }
// UnmarshalJSON supports json.Unmarshaler interface // UnmarshalJSON supports json.Unmarshaler interface
func (v *CollectClassNamesFromSubtreeReturns) UnmarshalJSON(data []byte) error { func (v *CollectClassNamesFromSubtreeReturns) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data} r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom68(&r, v) easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom70(&r, v)
return r.Error() return r.Error()
} }
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *CollectClassNamesFromSubtreeReturns) UnmarshalEasyJSON(l *jlexer.Lexer) { func (v *CollectClassNamesFromSubtreeReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom68(l, v) easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom70(l, v)
} }
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom69(in *jlexer.Lexer, out *CollectClassNamesFromSubtreeParams) { func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom71(in *jlexer.Lexer, out *CollectClassNamesFromSubtreeParams) {
isTopLevel := in.IsStart() isTopLevel := in.IsStart()
if in.IsNull() { if in.IsNull() {
if isTopLevel { if isTopLevel {
@ -5705,7 +5895,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom69(in *jlexer.Lexer, out *C
in.Consumed() in.Consumed()
} }
} }
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom69(out *jwriter.Writer, in CollectClassNamesFromSubtreeParams) { func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom71(out *jwriter.Writer, in CollectClassNamesFromSubtreeParams) {
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
@ -5721,27 +5911,27 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom69(out *jwriter.Writer, in
// MarshalJSON supports json.Marshaler interface // MarshalJSON supports json.Marshaler interface
func (v CollectClassNamesFromSubtreeParams) MarshalJSON() ([]byte, error) { func (v CollectClassNamesFromSubtreeParams) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{} w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom69(&w, v) easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom71(&w, v)
return w.Buffer.BuildBytes(), w.Error return w.Buffer.BuildBytes(), w.Error
} }
// MarshalEasyJSON supports easyjson.Marshaler interface // MarshalEasyJSON supports easyjson.Marshaler interface
func (v CollectClassNamesFromSubtreeParams) MarshalEasyJSON(w *jwriter.Writer) { func (v CollectClassNamesFromSubtreeParams) MarshalEasyJSON(w *jwriter.Writer) {
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom69(w, v) easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom71(w, v)
} }
// UnmarshalJSON supports json.Unmarshaler interface // UnmarshalJSON supports json.Unmarshaler interface
func (v *CollectClassNamesFromSubtreeParams) UnmarshalJSON(data []byte) error { func (v *CollectClassNamesFromSubtreeParams) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data} r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom69(&r, v) easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom71(&r, v)
return r.Error() return r.Error()
} }
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *CollectClassNamesFromSubtreeParams) UnmarshalEasyJSON(l *jlexer.Lexer) { func (v *CollectClassNamesFromSubtreeParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom69(l, v) easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom71(l, v)
} }
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom70(in *jlexer.Lexer, out *BoxModel) { func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom72(in *jlexer.Lexer, out *BoxModel) {
isTopLevel := in.IsStart() isTopLevel := in.IsStart()
if in.IsNull() { if in.IsNull() {
if isTopLevel { if isTopLevel {
@ -5876,7 +6066,7 @@ func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom70(in *jlexer.Lexer, out *B
in.Consumed() in.Consumed()
} }
} }
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom70(out *jwriter.Writer, in BoxModel) { func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom72(out *jwriter.Writer, in BoxModel) {
out.RawByte('{') out.RawByte('{')
first := true first := true
_ = first _ = first
@ -5978,23 +6168,23 @@ func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom70(out *jwriter.Writer, in
// MarshalJSON supports json.Marshaler interface // MarshalJSON supports json.Marshaler interface
func (v BoxModel) MarshalJSON() ([]byte, error) { func (v BoxModel) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{} w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom70(&w, v) easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom72(&w, v)
return w.Buffer.BuildBytes(), w.Error return w.Buffer.BuildBytes(), w.Error
} }
// MarshalEasyJSON supports easyjson.Marshaler interface // MarshalEasyJSON supports easyjson.Marshaler interface
func (v BoxModel) MarshalEasyJSON(w *jwriter.Writer) { func (v BoxModel) MarshalEasyJSON(w *jwriter.Writer) {
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom70(w, v) easyjsonC5a4559bEncodeGithubComKnqChromedpCdpDom72(w, v)
} }
// UnmarshalJSON supports json.Unmarshaler interface // UnmarshalJSON supports json.Unmarshaler interface
func (v *BoxModel) UnmarshalJSON(data []byte) error { func (v *BoxModel) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data} r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom70(&r, v) easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom72(&r, v)
return r.Error() return r.Error()
} }
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *BoxModel) UnmarshalEasyJSON(l *jlexer.Lexer) { func (v *BoxModel) UnmarshalEasyJSON(l *jlexer.Lexer) {
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom70(l, v) easyjsonC5a4559bDecodeGithubComKnqChromedpCdpDom72(l, v)
} }

File diff suppressed because it is too large Load Diff

View File

@ -603,3 +603,39 @@ func (p *RunScriptParams) Do(ctxt context.Context, h cdp.Handler) (result *Remot
return res.Result, res.ExceptionDetails, nil return res.Result, res.ExceptionDetails, nil
} }
// QueryObjectsParams [no description].
type QueryObjectsParams struct {
ConstructorObjectID RemoteObjectID `json:"constructorObjectId"` // Identifier of the constructor to return objects for.
}
// QueryObjects [no description].
//
// parameters:
// constructorObjectID - Identifier of the constructor to return objects for.
func QueryObjects(constructorObjectID RemoteObjectID) *QueryObjectsParams {
return &QueryObjectsParams{
ConstructorObjectID: constructorObjectID,
}
}
// QueryObjectsReturns return values.
type QueryObjectsReturns struct {
Objects *RemoteObject `json:"objects,omitempty"` // Array with objects.
}
// Do executes Runtime.queryObjects against the provided context and
// target handler.
//
// returns:
// objects - Array with objects.
func (p *QueryObjectsParams) Do(ctxt context.Context, h cdp.Handler) (objects *RemoteObject, err error) {
// execute
var res QueryObjectsReturns
err = h.Execute(ctxt, cdp.CommandRuntimeQueryObjects, p, &res)
if err != nil {
return nil, err
}
return res.Objects, nil
}

View File

@ -6443,6 +6443,51 @@
], ],
"description": "Returns the id of the nearest ancestor that is a relayout boundary.", "description": "Returns the id of the nearest ancestor that is a relayout boundary.",
"experimental": true "experimental": true
},
{
"name": "describeNode",
"parameters": [
{
"name": "nodeId",
"$ref": "NodeId",
"optional": true,
"description": "Identifier of the node."
},
{
"name": "backendNodeId",
"$ref": "BackendNodeId",
"optional": true,
"description": "Identifier of the backend node."
},
{
"name": "objectId",
"$ref": "Runtime.RemoteObjectId",
"optional": true,
"description": "JavaScript object id of the node wrapper."
},
{
"name": "depth",
"type": "integer",
"optional": true,
"description": "The maximum depth at which children should be retrieved, defaults to 1. Use -1 for the entire subtree or provide an integer larger than 0.",
"experimental": true
},
{
"name": "pierce",
"type": "boolean",
"optional": true,
"description": "Whether or not iframes and shadow roots should be traversed when returning the subtree (default is false).",
"experimental": true
}
],
"returns": [
{
"name": "node",
"$ref": "Node",
"description": "Node description."
}
],
"description": "Describes node given its id, does not require domain to be enabled. Does not start tracking any objects, can be used for automation."
} }
], ],
"events": [ "events": [
@ -12558,6 +12603,24 @@
} }
], ],
"description": "Runs script with given id in a given context." "description": "Runs script with given id in a given context."
},
{
"name": "queryObjects",
"parameters": [
{
"name": "constructorObjectId",
"$ref": "RemoteObjectId",
"description": "Identifier of the constructor to return objects for."
}
],
"returns": [
{
"name": "objects",
"$ref": "RemoteObject",
"description": "Array with objects."
}
],
"experimental": true
} }
], ],
"events": [ "events": [