Updating to latest protocol.json
This commit is contained in:
parent
49117a03d8
commit
60dbb97d45
|
@ -443,6 +443,7 @@ const (
|
||||||
CommandRuntimeCompileScript MethodType = "Runtime.compileScript"
|
CommandRuntimeCompileScript MethodType = "Runtime.compileScript"
|
||||||
CommandRuntimeRunScript MethodType = "Runtime.runScript"
|
CommandRuntimeRunScript MethodType = "Runtime.runScript"
|
||||||
CommandRuntimeQueryObjects MethodType = "Runtime.queryObjects"
|
CommandRuntimeQueryObjects MethodType = "Runtime.queryObjects"
|
||||||
|
CommandRuntimeGlobalLexicalScopeNames MethodType = "Runtime.globalLexicalScopeNames"
|
||||||
EventDebuggerScriptParsed MethodType = "Debugger.scriptParsed"
|
EventDebuggerScriptParsed MethodType = "Debugger.scriptParsed"
|
||||||
EventDebuggerScriptFailedToParse MethodType = "Debugger.scriptFailedToParse"
|
EventDebuggerScriptFailedToParse MethodType = "Debugger.scriptFailedToParse"
|
||||||
EventDebuggerBreakpointResolved MethodType = "Debugger.breakpointResolved"
|
EventDebuggerBreakpointResolved MethodType = "Debugger.breakpointResolved"
|
||||||
|
@ -1306,6 +1307,8 @@ func (t *MethodType) UnmarshalEasyJSON(in *jlexer.Lexer) {
|
||||||
*t = CommandRuntimeRunScript
|
*t = CommandRuntimeRunScript
|
||||||
case CommandRuntimeQueryObjects:
|
case CommandRuntimeQueryObjects:
|
||||||
*t = CommandRuntimeQueryObjects
|
*t = CommandRuntimeQueryObjects
|
||||||
|
case CommandRuntimeGlobalLexicalScopeNames:
|
||||||
|
*t = CommandRuntimeGlobalLexicalScopeNames
|
||||||
case EventDebuggerScriptParsed:
|
case EventDebuggerScriptParsed:
|
||||||
*t = EventDebuggerScriptParsed
|
*t = EventDebuggerScriptParsed
|
||||||
case EventDebuggerScriptFailedToParse:
|
case EventDebuggerScriptFailedToParse:
|
||||||
|
|
|
@ -1214,6 +1214,9 @@ func UnmarshalMessage(msg *cdp.Message) (interface{}, error) {
|
||||||
case cdp.CommandRuntimeQueryObjects:
|
case cdp.CommandRuntimeQueryObjects:
|
||||||
v = new(runtime.QueryObjectsReturns)
|
v = new(runtime.QueryObjectsReturns)
|
||||||
|
|
||||||
|
case cdp.CommandRuntimeGlobalLexicalScopeNames:
|
||||||
|
v = new(runtime.GlobalLexicalScopeNamesReturns)
|
||||||
|
|
||||||
case cdp.EventRuntimeExecutionContextCreated:
|
case cdp.EventRuntimeExecutionContextCreated:
|
||||||
v = new(runtime.EventExecutionContextCreated)
|
v = new(runtime.EventExecutionContextCreated)
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -662,3 +662,45 @@ func (p *QueryObjectsParams) Do(ctxt context.Context, h cdp.Handler) (objects *R
|
||||||
|
|
||||||
return res.Objects, nil
|
return res.Objects, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GlobalLexicalScopeNamesParams returns all let, const and class variables
|
||||||
|
// from global scope.
|
||||||
|
type GlobalLexicalScopeNamesParams struct {
|
||||||
|
ExecutionContextID ExecutionContextID `json:"executionContextId,omitempty"` // Specifies in which execution context to lookup global scope variables.
|
||||||
|
}
|
||||||
|
|
||||||
|
// GlobalLexicalScopeNames returns all let, const and class variables from
|
||||||
|
// global scope.
|
||||||
|
//
|
||||||
|
// parameters:
|
||||||
|
func GlobalLexicalScopeNames() *GlobalLexicalScopeNamesParams {
|
||||||
|
return &GlobalLexicalScopeNamesParams{}
|
||||||
|
}
|
||||||
|
|
||||||
|
// WithExecutionContextID specifies in which execution context to lookup
|
||||||
|
// global scope variables.
|
||||||
|
func (p GlobalLexicalScopeNamesParams) WithExecutionContextID(executionContextID ExecutionContextID) *GlobalLexicalScopeNamesParams {
|
||||||
|
p.ExecutionContextID = executionContextID
|
||||||
|
return &p
|
||||||
|
}
|
||||||
|
|
||||||
|
// GlobalLexicalScopeNamesReturns return values.
|
||||||
|
type GlobalLexicalScopeNamesReturns struct {
|
||||||
|
Names []string `json:"names,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// Do executes Runtime.globalLexicalScopeNames against the provided context and
|
||||||
|
// target handler.
|
||||||
|
//
|
||||||
|
// returns:
|
||||||
|
// names
|
||||||
|
func (p *GlobalLexicalScopeNamesParams) Do(ctxt context.Context, h cdp.Handler) (names []string, err error) {
|
||||||
|
// execute
|
||||||
|
var res GlobalLexicalScopeNamesReturns
|
||||||
|
err = h.Execute(ctxt, cdp.CommandRuntimeGlobalLexicalScopeNames, p, &res)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return res.Names, nil
|
||||||
|
}
|
||||||
|
|
|
@ -13000,6 +13000,28 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"experimental": true
|
"experimental": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "globalLexicalScopeNames",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "executionContextId",
|
||||||
|
"$ref": "ExecutionContextId",
|
||||||
|
"optional": true,
|
||||||
|
"description": "Specifies in which execution context to lookup global scope variables."
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"returns": [
|
||||||
|
{
|
||||||
|
"name": "names",
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Returns all let, const and class variables from global scope.",
|
||||||
|
"experimental": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"events": [
|
"events": [
|
||||||
|
|
Loading…
Reference in New Issue
Block a user