Updating to latest protocol.json

This commit is contained in:
Kenneth Shaw 2017-11-28 09:41:21 +07:00
parent 4f13da10e7
commit df58ab5964
11 changed files with 993 additions and 796 deletions

View File

@ -422,7 +422,6 @@ const (
CommandBrowserGetVersion MethodType = "Browser.getVersion"
CommandBrowserSetWindowBounds MethodType = "Browser.setWindowBounds"
CommandBrowserGetWindowBounds MethodType = "Browser.getWindowBounds"
CommandSchemaGetDomains MethodType = "Schema.getDomains"
EventRuntimeExecutionContextCreated MethodType = "Runtime.executionContextCreated"
EventRuntimeExecutionContextDestroyed MethodType = "Runtime.executionContextDestroyed"
EventRuntimeExecutionContextsCleared MethodType = "Runtime.executionContextsCleared"
@ -459,13 +458,14 @@ const (
CommandDebuggerRemoveBreakpoint MethodType = "Debugger.removeBreakpoint"
CommandDebuggerGetPossibleBreakpoints MethodType = "Debugger.getPossibleBreakpoints"
CommandDebuggerContinueToLocation MethodType = "Debugger.continueToLocation"
CommandDebuggerPauseOnAsyncTask MethodType = "Debugger.pauseOnAsyncTask"
CommandDebuggerPauseOnAsyncCall MethodType = "Debugger.pauseOnAsyncCall"
CommandDebuggerStepOver MethodType = "Debugger.stepOver"
CommandDebuggerStepInto MethodType = "Debugger.stepInto"
CommandDebuggerStepOut MethodType = "Debugger.stepOut"
CommandDebuggerPause MethodType = "Debugger.pause"
CommandDebuggerScheduleStepIntoAsync MethodType = "Debugger.scheduleStepIntoAsync"
CommandDebuggerResume MethodType = "Debugger.resume"
CommandDebuggerGetStackTrace MethodType = "Debugger.getStackTrace"
CommandDebuggerSearchInContent MethodType = "Debugger.searchInContent"
CommandDebuggerSetScriptSource MethodType = "Debugger.setScriptSource"
CommandDebuggerRestartFrame MethodType = "Debugger.restartFrame"
@ -1269,8 +1269,6 @@ func (t *MethodType) UnmarshalEasyJSON(in *jlexer.Lexer) {
*t = CommandBrowserSetWindowBounds
case CommandBrowserGetWindowBounds:
*t = CommandBrowserGetWindowBounds
case CommandSchemaGetDomains:
*t = CommandSchemaGetDomains
case EventRuntimeExecutionContextCreated:
*t = EventRuntimeExecutionContextCreated
case EventRuntimeExecutionContextDestroyed:
@ -1343,8 +1341,8 @@ func (t *MethodType) UnmarshalEasyJSON(in *jlexer.Lexer) {
*t = CommandDebuggerGetPossibleBreakpoints
case CommandDebuggerContinueToLocation:
*t = CommandDebuggerContinueToLocation
case CommandDebuggerPauseOnAsyncTask:
*t = CommandDebuggerPauseOnAsyncTask
case CommandDebuggerPauseOnAsyncCall:
*t = CommandDebuggerPauseOnAsyncCall
case CommandDebuggerStepOver:
*t = CommandDebuggerStepOver
case CommandDebuggerStepInto:
@ -1357,6 +1355,8 @@ func (t *MethodType) UnmarshalEasyJSON(in *jlexer.Lexer) {
*t = CommandDebuggerScheduleStepIntoAsync
case CommandDebuggerResume:
*t = CommandDebuggerResume
case CommandDebuggerGetStackTrace:
*t = CommandDebuggerGetStackTrace
case CommandDebuggerSearchInContent:
*t = CommandDebuggerSearchInContent
case CommandDebuggerSetScriptSource:

View File

@ -34,7 +34,6 @@ import (
"github.com/knq/chromedp/cdp/performance"
"github.com/knq/chromedp/cdp/profiler"
"github.com/knq/chromedp/cdp/runtime"
"github.com/knq/chromedp/cdp/schema"
"github.com/knq/chromedp/cdp/security"
"github.com/knq/chromedp/cdp/serviceworker"
"github.com/knq/chromedp/cdp/storage"
@ -1172,9 +1171,6 @@ func UnmarshalMessage(msg *cdp.Message) (interface{}, error) {
case cdp.CommandBrowserGetWindowBounds:
v = new(browser.GetWindowBoundsReturns)
case cdp.CommandSchemaGetDomains:
v = new(schema.GetDomainsReturns)
case cdp.CommandRuntimeEvaluate:
v = new(runtime.EvaluateReturns)
@ -1242,7 +1238,7 @@ func UnmarshalMessage(msg *cdp.Message) (interface{}, error) {
v = new(runtime.EventInspectRequested)
case cdp.CommandDebuggerEnable:
return emptyVal, nil
v = new(debugger.EnableReturns)
case cdp.CommandDebuggerDisable:
return emptyVal, nil
@ -1268,7 +1264,7 @@ func UnmarshalMessage(msg *cdp.Message) (interface{}, error) {
case cdp.CommandDebuggerContinueToLocation:
return emptyVal, nil
case cdp.CommandDebuggerPauseOnAsyncTask:
case cdp.CommandDebuggerPauseOnAsyncCall:
return emptyVal, nil
case cdp.CommandDebuggerStepOver:
@ -1289,6 +1285,9 @@ func UnmarshalMessage(msg *cdp.Message) (interface{}, error) {
case cdp.CommandDebuggerResume:
return emptyVal, nil
case cdp.CommandDebuggerGetStackTrace:
v = new(debugger.GetStackTraceReturns)
case cdp.CommandDebuggerSearchInContent:
v = new(debugger.SearchInContentReturns)

View File

@ -28,10 +28,25 @@ func Enable() *EnableParams {
return &EnableParams{}
}
// EnableReturns return values.
type EnableReturns struct {
DebuggerID runtime.UniqueDebuggerID `json:"debuggerId,omitempty"` // Unique identifier of the debugger.
}
// Do executes Debugger.enable against the provided context and
// target handler.
func (p *EnableParams) Do(ctxt context.Context, h cdp.Handler) (err error) {
return h.Execute(ctxt, cdp.CommandDebuggerEnable, nil, nil)
//
// returns:
// debuggerID - Unique identifier of the debugger.
func (p *EnableParams) Do(ctxt context.Context, h cdp.Handler) (debuggerID runtime.UniqueDebuggerID, err error) {
// execute
var res EnableReturns
err = h.Execute(ctxt, cdp.CommandDebuggerEnable, nil, &res)
if err != nil {
return "", err
}
return res.DebuggerID, nil
}
// DisableParams disables debugger for given page.
@ -329,25 +344,25 @@ func (p *ContinueToLocationParams) Do(ctxt context.Context, h cdp.Handler) (err
return h.Execute(ctxt, cdp.CommandDebuggerContinueToLocation, p, nil)
}
// PauseOnAsyncTaskParams [no description].
type PauseOnAsyncTaskParams struct {
AsyncTaskID runtime.AsyncTaskID `json:"asyncTaskId"` // Debugger will pause when given async task is started.
// PauseOnAsyncCallParams [no description].
type PauseOnAsyncCallParams struct {
ParentStackTraceID *runtime.StackTraceID `json:"parentStackTraceId"` // Debugger will pause when async call with given stack trace is started.
}
// PauseOnAsyncTask [no description].
// PauseOnAsyncCall [no description].
//
// parameters:
// asyncTaskID - Debugger will pause when given async task is started.
func PauseOnAsyncTask(asyncTaskID runtime.AsyncTaskID) *PauseOnAsyncTaskParams {
return &PauseOnAsyncTaskParams{
AsyncTaskID: asyncTaskID,
// parentStackTraceID - Debugger will pause when async call with given stack trace is started.
func PauseOnAsyncCall(parentStackTraceID *runtime.StackTraceID) *PauseOnAsyncCallParams {
return &PauseOnAsyncCallParams{
ParentStackTraceID: parentStackTraceID,
}
}
// Do executes Debugger.pauseOnAsyncTask against the provided context and
// Do executes Debugger.pauseOnAsyncCall against the provided context and
// target handler.
func (p *PauseOnAsyncTaskParams) Do(ctxt context.Context, h cdp.Handler) (err error) {
return h.Execute(ctxt, cdp.CommandDebuggerPauseOnAsyncTask, p, nil)
func (p *PauseOnAsyncCallParams) Do(ctxt context.Context, h cdp.Handler) (err error) {
return h.Execute(ctxt, cdp.CommandDebuggerPauseOnAsyncCall, p, nil)
}
// StepOverParams steps over the statement.
@ -453,6 +468,42 @@ func (p *ResumeParams) Do(ctxt context.Context, h cdp.Handler) (err error) {
return h.Execute(ctxt, cdp.CommandDebuggerResume, nil, nil)
}
// GetStackTraceParams returns stack trace with given stackTraceId.
type GetStackTraceParams struct {
StackTraceID *runtime.StackTraceID `json:"stackTraceId"`
}
// GetStackTrace returns stack trace with given stackTraceId.
//
// parameters:
// stackTraceID
func GetStackTrace(stackTraceID *runtime.StackTraceID) *GetStackTraceParams {
return &GetStackTraceParams{
StackTraceID: stackTraceID,
}
}
// GetStackTraceReturns return values.
type GetStackTraceReturns struct {
StackTrace *runtime.StackTrace `json:"stackTrace,omitempty"`
}
// Do executes Debugger.getStackTrace against the provided context and
// target handler.
//
// returns:
// stackTrace
func (p *GetStackTraceParams) Do(ctxt context.Context, h cdp.Handler) (stackTrace *runtime.StackTrace, err error) {
// execute
var res GetStackTraceReturns
err = h.Execute(ctxt, cdp.CommandDebuggerGetStackTrace, p, &res)
if err != nil {
return nil, err
}
return res.StackTrace, nil
}
// SearchInContentParams searches for given string in script content.
type SearchInContentParams struct {
ScriptID runtime.ScriptID `json:"scriptId"` // Id of the script to search in.
@ -537,6 +588,7 @@ 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.
}
@ -547,16 +599,17 @@ type SetScriptSourceReturns struct {
// 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(ctxt context.Context, h cdp.Handler) (callFrames []*CallFrame, stackChanged bool, asyncStackTrace *runtime.StackTrace, exceptionDetails *runtime.ExceptionDetails, err error) {
func (p *SetScriptSourceParams) Do(ctxt context.Context, h cdp.Handler) (callFrames []*CallFrame, stackChanged bool, asyncStackTrace *runtime.StackTrace, asyncStackTraceID *runtime.StackTraceID, exceptionDetails *runtime.ExceptionDetails, err error) {
// execute
var res SetScriptSourceReturns
err = h.Execute(ctxt, cdp.CommandDebuggerSetScriptSource, p, &res)
if err != nil {
return nil, false, nil, nil, err
return nil, false, nil, nil, nil, err
}
return res.CallFrames, res.StackChanged, res.AsyncStackTrace, res.ExceptionDetails, nil
return res.CallFrames, res.StackChanged, res.AsyncStackTrace, res.AsyncStackTraceID, res.ExceptionDetails, nil
}
// RestartFrameParams restarts particular call frame from the beginning.
@ -578,6 +631,7 @@ func RestartFrame(callFrameID CallFrameID) *RestartFrameParams {
type RestartFrameReturns struct {
CallFrames []*CallFrame `json:"callFrames,omitempty"` // New stack trace.
AsyncStackTrace *runtime.StackTrace `json:"asyncStackTrace,omitempty"` // Async stack trace, if any.
AsyncStackTraceID *runtime.StackTraceID `json:"asyncStackTraceId,omitempty"` // Async stack trace, if any.
}
// Do executes Debugger.restartFrame against the provided context and
@ -586,15 +640,16 @@ type RestartFrameReturns struct {
// returns:
// callFrames - New stack trace.
// asyncStackTrace - Async stack trace, if any.
func (p *RestartFrameParams) Do(ctxt context.Context, h cdp.Handler) (callFrames []*CallFrame, asyncStackTrace *runtime.StackTrace, err error) {
// asyncStackTraceID - Async stack trace, if any.
func (p *RestartFrameParams) Do(ctxt context.Context, h cdp.Handler) (callFrames []*CallFrame, asyncStackTrace *runtime.StackTrace, asyncStackTraceID *runtime.StackTraceID, err error) {
// execute
var res RestartFrameReturns
err = h.Execute(ctxt, cdp.CommandDebuggerRestartFrame, p, &res)
if err != nil {
return nil, nil, err
return nil, nil, nil, err
}
return res.CallFrames, res.AsyncStackTrace, nil
return res.CallFrames, res.AsyncStackTrace, res.AsyncStackTraceID, nil
}
// GetScriptSourceParams returns source for the script with given id.

File diff suppressed because it is too large Load Diff

View File

@ -62,7 +62,8 @@ type EventPaused struct {
Data easyjson.RawMessage `json:"data,omitempty"`
HitBreakpoints []string `json:"hitBreakpoints,omitempty"` // Hit breakpoints IDs
AsyncStackTrace *runtime.StackTrace `json:"asyncStackTrace,omitempty"` // Async stack trace, if any.
ScheduledAsyncTaskID runtime.AsyncTaskID `json:"scheduledAsyncTaskId,omitempty"` // Scheduled async task id.
AsyncStackTraceID *runtime.StackTraceID `json:"asyncStackTraceId,omitempty"` // Async stack trace, if any.
AsyncCallStackTraceID *runtime.StackTraceID `json:"asyncCallStackTraceId,omitempty"` // Just scheduled async call will have this stack trace as parent stack during async execution. This field is available only after Debugger.stepInto call with breakOnAsynCall flag.
}
// EventResumed fired when the virtual machine resumed execution.

File diff suppressed because it is too large Load Diff

View File

@ -236,16 +236,25 @@ type StackTrace struct {
Description string `json:"description,omitempty"` // String label of this stack trace. For async traces this may be a name of the function that initiated the async call.
CallFrames []*CallFrame `json:"callFrames"` // JavaScript function name.
Parent *StackTrace `json:"parent,omitempty"` // Asynchronous JavaScript stack trace that preceded this stack, if available.
ParentID *StackTraceID `json:"parentId,omitempty"` // Asynchronous JavaScript stack trace that preceded this stack, if available.
}
// AsyncTaskID [no description].
type AsyncTaskID string
// UniqueDebuggerID unique identifier of current debugger.
type UniqueDebuggerID string
// String returns the AsyncTaskID as string value.
func (t AsyncTaskID) String() string {
// String returns the UniqueDebuggerID as string value.
func (t UniqueDebuggerID) String() string {
return string(t)
}
// StackTraceID if debuggerId is set stack trace comes from another debugger
// and can be resolved there. This allows to track cross-debugger calls. See
// Runtime.StackTrace and Debugger.paused for usages.
type StackTraceID struct {
ID string `json:"id"`
DebuggerID UniqueDebuggerID `json:"debuggerId,omitempty"`
}
// Type object type.
type Type string

View File

@ -1,274 +0,0 @@
// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
package schema
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 easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSchema(in *jlexer.Lexer, out *GetDomainsReturns) {
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 "domains":
if in.IsNull() {
in.Skip()
out.Domains = nil
} else {
in.Delim('[')
if out.Domains == nil {
if !in.IsDelim(']') {
out.Domains = make([]*Domain, 0, 8)
} else {
out.Domains = []*Domain{}
}
} else {
out.Domains = (out.Domains)[:0]
}
for !in.IsDelim(']') {
var v1 *Domain
if in.IsNull() {
in.Skip()
v1 = nil
} else {
if v1 == nil {
v1 = new(Domain)
}
(*v1).UnmarshalEasyJSON(in)
}
out.Domains = append(out.Domains, v1)
in.WantComma()
}
in.Delim(']')
}
default:
in.SkipRecursive()
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSchema(out *jwriter.Writer, in GetDomainsReturns) {
out.RawByte('{')
first := true
_ = first
if len(in.Domains) != 0 {
const prefix string = ",\"domains\":"
if first {
first = false
out.RawString(prefix[1:])
} else {
out.RawString(prefix)
}
{
out.RawByte('[')
for v2, v3 := range in.Domains {
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 GetDomainsReturns) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSchema(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v GetDomainsReturns) MarshalEasyJSON(w *jwriter.Writer) {
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSchema(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *GetDomainsReturns) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSchema(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *GetDomainsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSchema(l, v)
}
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSchema1(in *jlexer.Lexer, out *GetDomainsParams) {
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 {
default:
in.SkipRecursive()
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSchema1(out *jwriter.Writer, in GetDomainsParams) {
out.RawByte('{')
first := true
_ = first
out.RawByte('}')
}
// MarshalJSON supports json.Marshaler interface
func (v GetDomainsParams) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSchema1(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v GetDomainsParams) MarshalEasyJSON(w *jwriter.Writer) {
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSchema1(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *GetDomainsParams) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSchema1(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *GetDomainsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSchema1(l, v)
}
func easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSchema2(in *jlexer.Lexer, out *Domain) {
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 "name":
out.Name = string(in.String())
case "version":
out.Version = string(in.String())
default:
in.SkipRecursive()
}
in.WantComma()
}
in.Delim('}')
if isTopLevel {
in.Consumed()
}
}
func easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSchema2(out *jwriter.Writer, in Domain) {
out.RawByte('{')
first := true
_ = first
{
const prefix string = ",\"name\":"
if first {
first = false
out.RawString(prefix[1:])
} else {
out.RawString(prefix)
}
out.String(string(in.Name))
}
{
const prefix string = ",\"version\":"
if first {
first = false
out.RawString(prefix[1:])
} else {
out.RawString(prefix)
}
out.String(string(in.Version))
}
out.RawByte('}')
}
// MarshalJSON supports json.Marshaler interface
func (v Domain) MarshalJSON() ([]byte, error) {
w := jwriter.Writer{}
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSchema2(&w, v)
return w.Buffer.BuildBytes(), w.Error
}
// MarshalEasyJSON supports easyjson.Marshaler interface
func (v Domain) MarshalEasyJSON(w *jwriter.Writer) {
easyjsonC5a4559bEncodeGithubComKnqChromedpCdpSchema2(w, v)
}
// UnmarshalJSON supports json.Unmarshaler interface
func (v *Domain) UnmarshalJSON(data []byte) error {
r := jlexer.Lexer{Data: data}
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSchema2(&r, v)
return r.Error()
}
// UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (v *Domain) UnmarshalEasyJSON(l *jlexer.Lexer) {
easyjsonC5a4559bDecodeGithubComKnqChromedpCdpSchema2(l, v)
}

View File

@ -1,44 +0,0 @@
// Package schema provides the Chrome Debugging Protocol
// commands, types, and events for the Schema domain.
//
// Provides information about the protocol schema.
//
// Generated by the chromedp-gen command.
package schema
// Code generated by chromedp-gen. DO NOT EDIT.
import (
"context"
cdp "github.com/knq/chromedp/cdp"
)
// GetDomainsParams returns supported domains.
type GetDomainsParams struct{}
// GetDomains returns supported domains.
func GetDomains() *GetDomainsParams {
return &GetDomainsParams{}
}
// GetDomainsReturns return values.
type GetDomainsReturns struct {
Domains []*Domain `json:"domains,omitempty"` // List of supported domains.
}
// Do executes Schema.getDomains against the provided context and
// target handler.
//
// returns:
// domains - List of supported domains.
func (p *GetDomainsParams) Do(ctxt context.Context, h cdp.Handler) (domains []*Domain, err error) {
// execute
var res GetDomainsReturns
err = h.Execute(ctxt, cdp.CommandSchemaGetDomains, nil, &res)
if err != nil {
return nil, err
}
return res.Domains, nil
}

View File

@ -1,9 +0,0 @@
package schema
// Code generated by chromedp-gen. DO NOT EDIT.
// Domain description of the protocol domain.
type Domain struct {
Name string `json:"name"` // Domain name.
Version string `json:"version"` // Domain version.
}

View File

@ -12027,7 +12027,8 @@
},
{
"domain": "Schema",
"description": "Provides information about the protocol schema.",
"description": "This domain is deprecated.",
"deprecated": true,
"types": [
{
"id": "Domain",
@ -12613,12 +12614,37 @@
"$ref": "StackTrace",
"optional": true,
"description": "Asynchronous JavaScript stack trace that preceded this stack, if available."
},
{
"name": "parentId",
"$ref": "StackTraceId",
"optional": true,
"experimental": true,
"description": "Asynchronous JavaScript stack trace that preceded this stack, if available."
}
]
},
{
"id": "AsyncTaskId",
"id": "UniqueDebuggerId",
"type": "string",
"description": "Unique identifier of current debugger.",
"experimental": true
},
{
"id": "StackTraceId",
"type": "object",
"description": "If <code>debuggerId</code> is set stack trace comes from another debugger and can be resolved there. This allows to track cross-debugger calls. See <code>Runtime.StackTrace</code> and <code>Debugger.paused</code> for usages.",
"properties": [
{
"name": "id",
"type": "string"
},
{
"name": "debuggerId",
"$ref": "UniqueDebuggerId",
"optional": true
}
],
"experimental": true
}
],
@ -12672,7 +12698,6 @@
"name": "userGesture",
"type": "boolean",
"optional": true,
"experimental": true,
"description": "Whether execution should be treated as initiated by user in the UI."
},
{
@ -12780,7 +12805,6 @@
"name": "userGesture",
"type": "boolean",
"optional": true,
"experimental": true,
"description": "Whether execution should be treated as initiated by user in the UI."
},
{
@ -13043,8 +13067,7 @@
"$ref": "RemoteObject",
"description": "Array with objects."
}
],
"experimental": true
]
},
{
"name": "globalLexicalScopeNames",
@ -13065,8 +13088,7 @@
}
}
],
"description": "Returns all let, const and class variables from global scope.",
"experimental": true
"description": "Returns all let, const and class variables from global scope."
}
],
"events": [
@ -13279,7 +13301,6 @@
"name": "functionLocation",
"$ref": "Location",
"optional": true,
"experimental": true,
"description": "Location in the source code."
},
{
@ -13374,8 +13395,7 @@
"type": "string",
"description": "Line with match content."
}
],
"experimental": true
]
},
{
"id": "BreakLocation",
@ -13407,13 +13427,20 @@
],
"optional": true
}
],
"experimental": true
]
}
],
"commands": [
{
"name": "enable",
"returns": [
{
"name": "debuggerId",
"$ref": "Runtime.UniqueDebuggerId",
"experimental": true,
"description": "Unique identifier of the debugger."
}
],
"description": "Enables debugger for the given page. Clients should not assume that the debugging has been enabled until the result for this command is received."
},
{
@ -13466,7 +13493,6 @@
"name": "scriptHash",
"type": "string",
"optional": true,
"experimental": true,
"description": "Script hash of the resources to set breakpoint on."
},
{
@ -13569,8 +13595,7 @@
"description": "List of the possible breakpoint locations."
}
],
"description": "Returns possible locations for breakpoint. scriptId in start and end range locations should be the same.",
"experimental": true
"description": "Returns possible locations for breakpoint. scriptId in start and end range locations should be the same."
},
{
"name": "continueToLocation",
@ -13587,19 +13612,18 @@
"any",
"current"
],
"optional": true,
"experimental": true
"optional": true
}
],
"description": "Continues execution until specific location is reached."
},
{
"name": "pauseOnAsyncTask",
"name": "pauseOnAsyncCall",
"parameters": [
{
"name": "asyncTaskId",
"$ref": "Runtime.AsyncTaskId",
"description": "Debugger will pause when given async task is started."
"name": "parentStackTraceId",
"$ref": "Runtime.StackTraceId",
"description": "Debugger will pause when async call with given stack trace is started."
}
],
"experimental": true
@ -13638,6 +13662,23 @@
"name": "resume",
"description": "Resumes JavaScript execution."
},
{
"name": "getStackTrace",
"parameters": [
{
"name": "stackTraceId",
"$ref": "Runtime.StackTraceId"
}
],
"returns": [
{
"name": "stackTrace",
"$ref": "Runtime.StackTrace"
}
],
"description": "Returns stack trace with given <code>stackTraceId</code>.",
"experimental": true
},
{
"name": "searchInContent",
"parameters": [
@ -13674,7 +13715,6 @@
"description": "List of search matches."
}
],
"experimental": true,
"description": "Searches for given string in script content."
},
{
@ -13719,6 +13759,13 @@
"optional": true,
"description": "Async stack trace, if any."
},
{
"name": "asyncStackTraceId",
"$ref": "Runtime.StackTraceId",
"optional": true,
"experimental": true,
"description": "Async stack trace, if any."
},
{
"name": "exceptionDetails",
"optional": true,
@ -13751,6 +13798,13 @@
"$ref": "Runtime.StackTrace",
"optional": true,
"description": "Async stack trace, if any."
},
{
"name": "asyncStackTraceId",
"$ref": "Runtime.StackTraceId",
"optional": true,
"experimental": true,
"description": "Async stack trace, if any."
}
],
"description": "Restarts particular call frame from the beginning."
@ -13837,7 +13891,6 @@
"name": "throwOnSideEffect",
"type": "boolean",
"optional": true,
"experimental": true,
"description": "Whether to throw an exception if side effect cannot be ruled out during evaluation."
}
],
@ -14007,22 +14060,19 @@
"name": "hasSourceURL",
"type": "boolean",
"optional": true,
"description": "True, if this script has sourceURL.",
"experimental": true
"description": "True, if this script has sourceURL."
},
{
"name": "isModule",
"type": "boolean",
"optional": true,
"description": "True, if this script is ES6 module.",
"experimental": true
"description": "True, if this script is ES6 module."
},
{
"name": "length",
"type": "integer",
"optional": true,
"description": "This script length.",
"experimental": true
"description": "This script length."
},
{
"name": "stackTrace",
@ -14093,22 +14143,19 @@
"name": "hasSourceURL",
"type": "boolean",
"optional": true,
"description": "True, if this script has sourceURL.",
"experimental": true
"description": "True, if this script has sourceURL."
},
{
"name": "isModule",
"type": "boolean",
"optional": true,
"description": "True, if this script is ES6 module.",
"experimental": true
"description": "True, if this script is ES6 module."
},
{
"name": "length",
"type": "integer",
"optional": true,
"description": "This script length.",
"experimental": true
"description": "This script length."
},
{
"name": "stackTrace",
@ -14186,11 +14233,18 @@
"description": "Async stack trace, if any."
},
{
"name": "scheduledAsyncTaskId",
"$ref": "Runtime.AsyncTaskId",
"name": "asyncStackTraceId",
"$ref": "Runtime.StackTraceId",
"optional": true,
"experimental": true,
"description": "Scheduled async task id."
"description": "Async stack trace, if any."
},
{
"name": "asyncCallStackTraceId",
"$ref": "Runtime.StackTraceId",
"optional": true,
"experimental": true,
"description": "Just scheduled async call will have this stack trace as parent stack during async execution. This field is available only after <code>Debugger.stepInto</code> call with <code>breakOnAsynCall</code> flag."
}
],
"description": "Fired when the virtual machine stopped on breakpoint or exception or any other stop criteria."
@ -14324,7 +14378,6 @@
"name": "hitCount",
"type": "integer",
"optional": true,
"experimental": true,
"description": "Number of samples where this node was on top of the call stack."
},
{
@ -14349,7 +14402,6 @@
"$ref": "PositionTickInfo"
},
"optional": true,
"experimental": true,
"description": "An array of source position ticks."
}
]
@ -14400,7 +14452,6 @@
{
"id": "PositionTickInfo",
"type": "object",
"experimental": true,
"description": "Specifies a number of samples attributed to a certain source position.",
"properties": [
{
@ -14435,8 +14486,7 @@
"type": "integer",
"description": "Collected execution count of the source range."
}
],
"experimental": true
]
},
{
"id": "FunctionCoverage",
@ -14461,8 +14511,7 @@
"type": "boolean",
"description": "Whether coverage data for this function has block granularity."
}
],
"experimental": true
]
},
{
"id": "ScriptCoverage",
@ -14487,8 +14536,7 @@
},
"description": "Functions contained in the script that has coverage data."
}
],
"experimental": true
]
},
{
"id": "TypeObject",
@ -14598,13 +14646,11 @@
"description": "Collect block-based coverage."
}
],
"description": "Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters.",
"experimental": true
"description": "Enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters."
},
{
"name": "stopPreciseCoverage",
"description": "Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code.",
"experimental": true
"description": "Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code."
},
{
"name": "takePreciseCoverage",
@ -14618,8 +14664,7 @@
"description": "Coverage data for the current isolate."
}
],
"description": "Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started.",
"experimental": true
"description": "Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started."
},
{
"name": "getBestEffortCoverage",
@ -14633,8 +14678,7 @@
"description": "Coverage data for the current isolate."
}
],
"description": "Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection.",
"experimental": true
"description": "Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection."
},
{
"name": "startTypeProfile",