id
int32 0
167k
| repo
stringlengths 5
54
| path
stringlengths 4
155
| func_name
stringlengths 1
118
| original_string
stringlengths 52
85.5k
| language
stringclasses 1
value | code
stringlengths 52
85.5k
| code_tokens
listlengths 21
1.41k
| docstring
stringlengths 6
2.61k
| docstring_tokens
listlengths 3
215
| sha
stringlengths 40
40
| url
stringlengths 85
252
|
|---|---|---|---|---|---|---|---|---|---|---|---|
18,800
|
mafredri/cdp
|
protocol/debugger/command.go
|
NewSearchInContentArgs
|
func NewSearchInContentArgs(scriptID runtime.ScriptID, query string) *SearchInContentArgs {
args := new(SearchInContentArgs)
args.ScriptID = scriptID
args.Query = query
return args
}
|
go
|
func NewSearchInContentArgs(scriptID runtime.ScriptID, query string) *SearchInContentArgs {
args := new(SearchInContentArgs)
args.ScriptID = scriptID
args.Query = query
return args
}
|
[
"func",
"NewSearchInContentArgs",
"(",
"scriptID",
"runtime",
".",
"ScriptID",
",",
"query",
"string",
")",
"*",
"SearchInContentArgs",
"{",
"args",
":=",
"new",
"(",
"SearchInContentArgs",
")",
"\n",
"args",
".",
"ScriptID",
"=",
"scriptID",
"\n",
"args",
".",
"Query",
"=",
"query",
"\n",
"return",
"args",
"\n",
"}"
] |
// NewSearchInContentArgs initializes SearchInContentArgs with the required arguments.
|
[
"NewSearchInContentArgs",
"initializes",
"SearchInContentArgs",
"with",
"the",
"required",
"arguments",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/debugger/command.go#L285-L290
|
18,801
|
mafredri/cdp
|
protocol/debugger/command.go
|
NewSetAsyncCallStackDepthArgs
|
func NewSetAsyncCallStackDepthArgs(maxDepth int) *SetAsyncCallStackDepthArgs {
args := new(SetAsyncCallStackDepthArgs)
args.MaxDepth = maxDepth
return args
}
|
go
|
func NewSetAsyncCallStackDepthArgs(maxDepth int) *SetAsyncCallStackDepthArgs {
args := new(SetAsyncCallStackDepthArgs)
args.MaxDepth = maxDepth
return args
}
|
[
"func",
"NewSetAsyncCallStackDepthArgs",
"(",
"maxDepth",
"int",
")",
"*",
"SetAsyncCallStackDepthArgs",
"{",
"args",
":=",
"new",
"(",
"SetAsyncCallStackDepthArgs",
")",
"\n",
"args",
".",
"MaxDepth",
"=",
"maxDepth",
"\n",
"return",
"args",
"\n",
"}"
] |
// NewSetAsyncCallStackDepthArgs initializes SetAsyncCallStackDepthArgs with the required arguments.
|
[
"NewSetAsyncCallStackDepthArgs",
"initializes",
"SetAsyncCallStackDepthArgs",
"with",
"the",
"required",
"arguments",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/debugger/command.go#L317-L321
|
18,802
|
mafredri/cdp
|
protocol/debugger/command.go
|
NewSetBlackboxPatternsArgs
|
func NewSetBlackboxPatternsArgs(patterns []string) *SetBlackboxPatternsArgs {
args := new(SetBlackboxPatternsArgs)
args.Patterns = patterns
return args
}
|
go
|
func NewSetBlackboxPatternsArgs(patterns []string) *SetBlackboxPatternsArgs {
args := new(SetBlackboxPatternsArgs)
args.Patterns = patterns
return args
}
|
[
"func",
"NewSetBlackboxPatternsArgs",
"(",
"patterns",
"[",
"]",
"string",
")",
"*",
"SetBlackboxPatternsArgs",
"{",
"args",
":=",
"new",
"(",
"SetBlackboxPatternsArgs",
")",
"\n",
"args",
".",
"Patterns",
"=",
"patterns",
"\n",
"return",
"args",
"\n",
"}"
] |
// NewSetBlackboxPatternsArgs initializes SetBlackboxPatternsArgs with the required arguments.
|
[
"NewSetBlackboxPatternsArgs",
"initializes",
"SetBlackboxPatternsArgs",
"with",
"the",
"required",
"arguments",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/debugger/command.go#L329-L333
|
18,803
|
mafredri/cdp
|
protocol/debugger/command.go
|
NewSetBlackboxedRangesArgs
|
func NewSetBlackboxedRangesArgs(scriptID runtime.ScriptID, positions []ScriptPosition) *SetBlackboxedRangesArgs {
args := new(SetBlackboxedRangesArgs)
args.ScriptID = scriptID
args.Positions = positions
return args
}
|
go
|
func NewSetBlackboxedRangesArgs(scriptID runtime.ScriptID, positions []ScriptPosition) *SetBlackboxedRangesArgs {
args := new(SetBlackboxedRangesArgs)
args.ScriptID = scriptID
args.Positions = positions
return args
}
|
[
"func",
"NewSetBlackboxedRangesArgs",
"(",
"scriptID",
"runtime",
".",
"ScriptID",
",",
"positions",
"[",
"]",
"ScriptPosition",
")",
"*",
"SetBlackboxedRangesArgs",
"{",
"args",
":=",
"new",
"(",
"SetBlackboxedRangesArgs",
")",
"\n",
"args",
".",
"ScriptID",
"=",
"scriptID",
"\n",
"args",
".",
"Positions",
"=",
"positions",
"\n",
"return",
"args",
"\n",
"}"
] |
// NewSetBlackboxedRangesArgs initializes SetBlackboxedRangesArgs with the required arguments.
|
[
"NewSetBlackboxedRangesArgs",
"initializes",
"SetBlackboxedRangesArgs",
"with",
"the",
"required",
"arguments",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/debugger/command.go#L342-L347
|
18,804
|
mafredri/cdp
|
protocol/debugger/command.go
|
NewSetBreakpointArgs
|
func NewSetBreakpointArgs(location Location) *SetBreakpointArgs {
args := new(SetBreakpointArgs)
args.Location = location
return args
}
|
go
|
func NewSetBreakpointArgs(location Location) *SetBreakpointArgs {
args := new(SetBreakpointArgs)
args.Location = location
return args
}
|
[
"func",
"NewSetBreakpointArgs",
"(",
"location",
"Location",
")",
"*",
"SetBreakpointArgs",
"{",
"args",
":=",
"new",
"(",
"SetBreakpointArgs",
")",
"\n",
"args",
".",
"Location",
"=",
"location",
"\n",
"return",
"args",
"\n",
"}"
] |
// NewSetBreakpointArgs initializes SetBreakpointArgs with the required arguments.
|
[
"NewSetBreakpointArgs",
"initializes",
"SetBreakpointArgs",
"with",
"the",
"required",
"arguments",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/debugger/command.go#L356-L360
|
18,805
|
mafredri/cdp
|
protocol/debugger/command.go
|
NewSetBreakpointByURLArgs
|
func NewSetBreakpointByURLArgs(lineNumber int) *SetBreakpointByURLArgs {
args := new(SetBreakpointByURLArgs)
args.LineNumber = lineNumber
return args
}
|
go
|
func NewSetBreakpointByURLArgs(lineNumber int) *SetBreakpointByURLArgs {
args := new(SetBreakpointByURLArgs)
args.LineNumber = lineNumber
return args
}
|
[
"func",
"NewSetBreakpointByURLArgs",
"(",
"lineNumber",
"int",
")",
"*",
"SetBreakpointByURLArgs",
"{",
"args",
":=",
"new",
"(",
"SetBreakpointByURLArgs",
")",
"\n",
"args",
".",
"LineNumber",
"=",
"lineNumber",
"\n",
"return",
"args",
"\n",
"}"
] |
// NewSetBreakpointByURLArgs initializes SetBreakpointByURLArgs with the required arguments.
|
[
"NewSetBreakpointByURLArgs",
"initializes",
"SetBreakpointByURLArgs",
"with",
"the",
"required",
"arguments",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/debugger/command.go#L387-L391
|
18,806
|
mafredri/cdp
|
protocol/debugger/command.go
|
SetURL
|
func (a *SetBreakpointByURLArgs) SetURL(url string) *SetBreakpointByURLArgs {
a.URL = &url
return a
}
|
go
|
func (a *SetBreakpointByURLArgs) SetURL(url string) *SetBreakpointByURLArgs {
a.URL = &url
return a
}
|
[
"func",
"(",
"a",
"*",
"SetBreakpointByURLArgs",
")",
"SetURL",
"(",
"url",
"string",
")",
"*",
"SetBreakpointByURLArgs",
"{",
"a",
".",
"URL",
"=",
"&",
"url",
"\n",
"return",
"a",
"\n",
"}"
] |
// SetURL sets the URL optional argument. URL of the resources to set
// breakpoint on.
|
[
"SetURL",
"sets",
"the",
"URL",
"optional",
"argument",
".",
"URL",
"of",
"the",
"resources",
"to",
"set",
"breakpoint",
"on",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/debugger/command.go#L395-L398
|
18,807
|
mafredri/cdp
|
protocol/debugger/command.go
|
SetURLRegex
|
func (a *SetBreakpointByURLArgs) SetURLRegex(urlRegex string) *SetBreakpointByURLArgs {
a.URLRegex = &urlRegex
return a
}
|
go
|
func (a *SetBreakpointByURLArgs) SetURLRegex(urlRegex string) *SetBreakpointByURLArgs {
a.URLRegex = &urlRegex
return a
}
|
[
"func",
"(",
"a",
"*",
"SetBreakpointByURLArgs",
")",
"SetURLRegex",
"(",
"urlRegex",
"string",
")",
"*",
"SetBreakpointByURLArgs",
"{",
"a",
".",
"URLRegex",
"=",
"&",
"urlRegex",
"\n",
"return",
"a",
"\n",
"}"
] |
// SetURLRegex sets the URLRegex optional argument. Regex pattern for
// the URLs of the resources to set breakpoints on. Either `url` or
// `urlRegex` must be specified.
|
[
"SetURLRegex",
"sets",
"the",
"URLRegex",
"optional",
"argument",
".",
"Regex",
"pattern",
"for",
"the",
"URLs",
"of",
"the",
"resources",
"to",
"set",
"breakpoints",
"on",
".",
"Either",
"url",
"or",
"urlRegex",
"must",
"be",
"specified",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/debugger/command.go#L403-L406
|
18,808
|
mafredri/cdp
|
protocol/debugger/command.go
|
SetScriptHash
|
func (a *SetBreakpointByURLArgs) SetScriptHash(scriptHash string) *SetBreakpointByURLArgs {
a.ScriptHash = &scriptHash
return a
}
|
go
|
func (a *SetBreakpointByURLArgs) SetScriptHash(scriptHash string) *SetBreakpointByURLArgs {
a.ScriptHash = &scriptHash
return a
}
|
[
"func",
"(",
"a",
"*",
"SetBreakpointByURLArgs",
")",
"SetScriptHash",
"(",
"scriptHash",
"string",
")",
"*",
"SetBreakpointByURLArgs",
"{",
"a",
".",
"ScriptHash",
"=",
"&",
"scriptHash",
"\n",
"return",
"a",
"\n",
"}"
] |
// SetScriptHash sets the ScriptHash optional argument. Script hash of
// the resources to set breakpoint on.
|
[
"SetScriptHash",
"sets",
"the",
"ScriptHash",
"optional",
"argument",
".",
"Script",
"hash",
"of",
"the",
"resources",
"to",
"set",
"breakpoint",
"on",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/debugger/command.go#L410-L413
|
18,809
|
mafredri/cdp
|
protocol/debugger/command.go
|
SetColumnNumber
|
func (a *SetBreakpointByURLArgs) SetColumnNumber(columnNumber int) *SetBreakpointByURLArgs {
a.ColumnNumber = &columnNumber
return a
}
|
go
|
func (a *SetBreakpointByURLArgs) SetColumnNumber(columnNumber int) *SetBreakpointByURLArgs {
a.ColumnNumber = &columnNumber
return a
}
|
[
"func",
"(",
"a",
"*",
"SetBreakpointByURLArgs",
")",
"SetColumnNumber",
"(",
"columnNumber",
"int",
")",
"*",
"SetBreakpointByURLArgs",
"{",
"a",
".",
"ColumnNumber",
"=",
"&",
"columnNumber",
"\n",
"return",
"a",
"\n",
"}"
] |
// SetColumnNumber sets the ColumnNumber optional argument. Offset in
// the line to set breakpoint at.
|
[
"SetColumnNumber",
"sets",
"the",
"ColumnNumber",
"optional",
"argument",
".",
"Offset",
"in",
"the",
"line",
"to",
"set",
"breakpoint",
"at",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/debugger/command.go#L417-L420
|
18,810
|
mafredri/cdp
|
protocol/debugger/command.go
|
NewSetBreakpointOnFunctionCallArgs
|
func NewSetBreakpointOnFunctionCallArgs(objectID runtime.RemoteObjectID) *SetBreakpointOnFunctionCallArgs {
args := new(SetBreakpointOnFunctionCallArgs)
args.ObjectID = objectID
return args
}
|
go
|
func NewSetBreakpointOnFunctionCallArgs(objectID runtime.RemoteObjectID) *SetBreakpointOnFunctionCallArgs {
args := new(SetBreakpointOnFunctionCallArgs)
args.ObjectID = objectID
return args
}
|
[
"func",
"NewSetBreakpointOnFunctionCallArgs",
"(",
"objectID",
"runtime",
".",
"RemoteObjectID",
")",
"*",
"SetBreakpointOnFunctionCallArgs",
"{",
"args",
":=",
"new",
"(",
"SetBreakpointOnFunctionCallArgs",
")",
"\n",
"args",
".",
"ObjectID",
"=",
"objectID",
"\n",
"return",
"args",
"\n",
"}"
] |
// NewSetBreakpointOnFunctionCallArgs initializes SetBreakpointOnFunctionCallArgs with the required arguments.
|
[
"NewSetBreakpointOnFunctionCallArgs",
"initializes",
"SetBreakpointOnFunctionCallArgs",
"with",
"the",
"required",
"arguments",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/debugger/command.go#L443-L447
|
18,811
|
mafredri/cdp
|
protocol/debugger/command.go
|
SetCondition
|
func (a *SetBreakpointOnFunctionCallArgs) SetCondition(condition string) *SetBreakpointOnFunctionCallArgs {
a.Condition = &condition
return a
}
|
go
|
func (a *SetBreakpointOnFunctionCallArgs) SetCondition(condition string) *SetBreakpointOnFunctionCallArgs {
a.Condition = &condition
return a
}
|
[
"func",
"(",
"a",
"*",
"SetBreakpointOnFunctionCallArgs",
")",
"SetCondition",
"(",
"condition",
"string",
")",
"*",
"SetBreakpointOnFunctionCallArgs",
"{",
"a",
".",
"Condition",
"=",
"&",
"condition",
"\n",
"return",
"a",
"\n",
"}"
] |
// SetCondition sets the Condition optional argument. Expression to
// use as a breakpoint condition. When specified, debugger will stop on
// the breakpoint if this expression evaluates to true.
|
[
"SetCondition",
"sets",
"the",
"Condition",
"optional",
"argument",
".",
"Expression",
"to",
"use",
"as",
"a",
"breakpoint",
"condition",
".",
"When",
"specified",
"debugger",
"will",
"stop",
"on",
"the",
"breakpoint",
"if",
"this",
"expression",
"evaluates",
"to",
"true",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/debugger/command.go#L452-L455
|
18,812
|
mafredri/cdp
|
protocol/debugger/command.go
|
NewSetBreakpointsActiveArgs
|
func NewSetBreakpointsActiveArgs(active bool) *SetBreakpointsActiveArgs {
args := new(SetBreakpointsActiveArgs)
args.Active = active
return args
}
|
go
|
func NewSetBreakpointsActiveArgs(active bool) *SetBreakpointsActiveArgs {
args := new(SetBreakpointsActiveArgs)
args.Active = active
return args
}
|
[
"func",
"NewSetBreakpointsActiveArgs",
"(",
"active",
"bool",
")",
"*",
"SetBreakpointsActiveArgs",
"{",
"args",
":=",
"new",
"(",
"SetBreakpointsActiveArgs",
")",
"\n",
"args",
".",
"Active",
"=",
"active",
"\n",
"return",
"args",
"\n",
"}"
] |
// NewSetBreakpointsActiveArgs initializes SetBreakpointsActiveArgs with the required arguments.
|
[
"NewSetBreakpointsActiveArgs",
"initializes",
"SetBreakpointsActiveArgs",
"with",
"the",
"required",
"arguments",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/debugger/command.go#L468-L472
|
18,813
|
mafredri/cdp
|
protocol/debugger/command.go
|
NewSetPauseOnExceptionsArgs
|
func NewSetPauseOnExceptionsArgs(state string) *SetPauseOnExceptionsArgs {
args := new(SetPauseOnExceptionsArgs)
args.State = state
return args
}
|
go
|
func NewSetPauseOnExceptionsArgs(state string) *SetPauseOnExceptionsArgs {
args := new(SetPauseOnExceptionsArgs)
args.State = state
return args
}
|
[
"func",
"NewSetPauseOnExceptionsArgs",
"(",
"state",
"string",
")",
"*",
"SetPauseOnExceptionsArgs",
"{",
"args",
":=",
"new",
"(",
"SetPauseOnExceptionsArgs",
")",
"\n",
"args",
".",
"State",
"=",
"state",
"\n",
"return",
"args",
"\n",
"}"
] |
// NewSetPauseOnExceptionsArgs initializes SetPauseOnExceptionsArgs with the required arguments.
|
[
"NewSetPauseOnExceptionsArgs",
"initializes",
"SetPauseOnExceptionsArgs",
"with",
"the",
"required",
"arguments",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/debugger/command.go#L483-L487
|
18,814
|
mafredri/cdp
|
protocol/debugger/command.go
|
NewSetReturnValueArgs
|
func NewSetReturnValueArgs(newValue runtime.CallArgument) *SetReturnValueArgs {
args := new(SetReturnValueArgs)
args.NewValue = newValue
return args
}
|
go
|
func NewSetReturnValueArgs(newValue runtime.CallArgument) *SetReturnValueArgs {
args := new(SetReturnValueArgs)
args.NewValue = newValue
return args
}
|
[
"func",
"NewSetReturnValueArgs",
"(",
"newValue",
"runtime",
".",
"CallArgument",
")",
"*",
"SetReturnValueArgs",
"{",
"args",
":=",
"new",
"(",
"SetReturnValueArgs",
")",
"\n",
"args",
".",
"NewValue",
"=",
"newValue",
"\n",
"return",
"args",
"\n",
"}"
] |
// NewSetReturnValueArgs initializes SetReturnValueArgs with the required arguments.
|
[
"NewSetReturnValueArgs",
"initializes",
"SetReturnValueArgs",
"with",
"the",
"required",
"arguments",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/debugger/command.go#L495-L499
|
18,815
|
mafredri/cdp
|
protocol/debugger/command.go
|
NewSetScriptSourceArgs
|
func NewSetScriptSourceArgs(scriptID runtime.ScriptID, scriptSource string) *SetScriptSourceArgs {
args := new(SetScriptSourceArgs)
args.ScriptID = scriptID
args.ScriptSource = scriptSource
return args
}
|
go
|
func NewSetScriptSourceArgs(scriptID runtime.ScriptID, scriptSource string) *SetScriptSourceArgs {
args := new(SetScriptSourceArgs)
args.ScriptID = scriptID
args.ScriptSource = scriptSource
return args
}
|
[
"func",
"NewSetScriptSourceArgs",
"(",
"scriptID",
"runtime",
".",
"ScriptID",
",",
"scriptSource",
"string",
")",
"*",
"SetScriptSourceArgs",
"{",
"args",
":=",
"new",
"(",
"SetScriptSourceArgs",
")",
"\n",
"args",
".",
"ScriptID",
"=",
"scriptID",
"\n",
"args",
".",
"ScriptSource",
"=",
"scriptSource",
"\n",
"return",
"args",
"\n",
"}"
] |
// NewSetScriptSourceArgs initializes SetScriptSourceArgs with the required arguments.
|
[
"NewSetScriptSourceArgs",
"initializes",
"SetScriptSourceArgs",
"with",
"the",
"required",
"arguments",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/debugger/command.go#L509-L514
|
18,816
|
mafredri/cdp
|
protocol/debugger/command.go
|
SetDryRun
|
func (a *SetScriptSourceArgs) SetDryRun(dryRun bool) *SetScriptSourceArgs {
a.DryRun = &dryRun
return a
}
|
go
|
func (a *SetScriptSourceArgs) SetDryRun(dryRun bool) *SetScriptSourceArgs {
a.DryRun = &dryRun
return a
}
|
[
"func",
"(",
"a",
"*",
"SetScriptSourceArgs",
")",
"SetDryRun",
"(",
"dryRun",
"bool",
")",
"*",
"SetScriptSourceArgs",
"{",
"a",
".",
"DryRun",
"=",
"&",
"dryRun",
"\n",
"return",
"a",
"\n",
"}"
] |
// SetDryRun sets the DryRun optional argument. If true the change
// will not actually be applied. Dry run may be used to get result
// description without actually modifying the code.
|
[
"SetDryRun",
"sets",
"the",
"DryRun",
"optional",
"argument",
".",
"If",
"true",
"the",
"change",
"will",
"not",
"actually",
"be",
"applied",
".",
"Dry",
"run",
"may",
"be",
"used",
"to",
"get",
"result",
"description",
"without",
"actually",
"modifying",
"the",
"code",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/debugger/command.go#L519-L522
|
18,817
|
mafredri/cdp
|
protocol/debugger/command.go
|
NewSetSkipAllPausesArgs
|
func NewSetSkipAllPausesArgs(skip bool) *SetSkipAllPausesArgs {
args := new(SetSkipAllPausesArgs)
args.Skip = skip
return args
}
|
go
|
func NewSetSkipAllPausesArgs(skip bool) *SetSkipAllPausesArgs {
args := new(SetSkipAllPausesArgs)
args.Skip = skip
return args
}
|
[
"func",
"NewSetSkipAllPausesArgs",
"(",
"skip",
"bool",
")",
"*",
"SetSkipAllPausesArgs",
"{",
"args",
":=",
"new",
"(",
"SetSkipAllPausesArgs",
")",
"\n",
"args",
".",
"Skip",
"=",
"skip",
"\n",
"return",
"args",
"\n",
"}"
] |
// NewSetSkipAllPausesArgs initializes SetSkipAllPausesArgs with the required arguments.
|
[
"NewSetSkipAllPausesArgs",
"initializes",
"SetSkipAllPausesArgs",
"with",
"the",
"required",
"arguments",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/debugger/command.go#L542-L546
|
18,818
|
mafredri/cdp
|
protocol/debugger/command.go
|
NewSetVariableValueArgs
|
func NewSetVariableValueArgs(scopeNumber int, variableName string, newValue runtime.CallArgument, callFrameID CallFrameID) *SetVariableValueArgs {
args := new(SetVariableValueArgs)
args.ScopeNumber = scopeNumber
args.VariableName = variableName
args.NewValue = newValue
args.CallFrameID = callFrameID
return args
}
|
go
|
func NewSetVariableValueArgs(scopeNumber int, variableName string, newValue runtime.CallArgument, callFrameID CallFrameID) *SetVariableValueArgs {
args := new(SetVariableValueArgs)
args.ScopeNumber = scopeNumber
args.VariableName = variableName
args.NewValue = newValue
args.CallFrameID = callFrameID
return args
}
|
[
"func",
"NewSetVariableValueArgs",
"(",
"scopeNumber",
"int",
",",
"variableName",
"string",
",",
"newValue",
"runtime",
".",
"CallArgument",
",",
"callFrameID",
"CallFrameID",
")",
"*",
"SetVariableValueArgs",
"{",
"args",
":=",
"new",
"(",
"SetVariableValueArgs",
")",
"\n",
"args",
".",
"ScopeNumber",
"=",
"scopeNumber",
"\n",
"args",
".",
"VariableName",
"=",
"variableName",
"\n",
"args",
".",
"NewValue",
"=",
"newValue",
"\n",
"args",
".",
"CallFrameID",
"=",
"callFrameID",
"\n",
"return",
"args",
"\n",
"}"
] |
// NewSetVariableValueArgs initializes SetVariableValueArgs with the required arguments.
|
[
"NewSetVariableValueArgs",
"initializes",
"SetVariableValueArgs",
"with",
"the",
"required",
"arguments",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/debugger/command.go#L557-L564
|
18,819
|
mafredri/cdp
|
protocol/domsnapshot/command.go
|
NewGetSnapshotArgs
|
func NewGetSnapshotArgs(computedStyleWhitelist []string) *GetSnapshotArgs {
args := new(GetSnapshotArgs)
args.ComputedStyleWhitelist = computedStyleWhitelist
return args
}
|
go
|
func NewGetSnapshotArgs(computedStyleWhitelist []string) *GetSnapshotArgs {
args := new(GetSnapshotArgs)
args.ComputedStyleWhitelist = computedStyleWhitelist
return args
}
|
[
"func",
"NewGetSnapshotArgs",
"(",
"computedStyleWhitelist",
"[",
"]",
"string",
")",
"*",
"GetSnapshotArgs",
"{",
"args",
":=",
"new",
"(",
"GetSnapshotArgs",
")",
"\n",
"args",
".",
"ComputedStyleWhitelist",
"=",
"computedStyleWhitelist",
"\n",
"return",
"args",
"\n",
"}"
] |
// NewGetSnapshotArgs initializes GetSnapshotArgs with the required arguments.
|
[
"NewGetSnapshotArgs",
"initializes",
"GetSnapshotArgs",
"with",
"the",
"required",
"arguments",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/domsnapshot/command.go#L14-L18
|
18,820
|
mafredri/cdp
|
protocol/domsnapshot/command.go
|
NewCaptureSnapshotArgs
|
func NewCaptureSnapshotArgs(computedStyles []string) *CaptureSnapshotArgs {
args := new(CaptureSnapshotArgs)
args.ComputedStyles = computedStyles
return args
}
|
go
|
func NewCaptureSnapshotArgs(computedStyles []string) *CaptureSnapshotArgs {
args := new(CaptureSnapshotArgs)
args.ComputedStyles = computedStyles
return args
}
|
[
"func",
"NewCaptureSnapshotArgs",
"(",
"computedStyles",
"[",
"]",
"string",
")",
"*",
"CaptureSnapshotArgs",
"{",
"args",
":=",
"new",
"(",
"CaptureSnapshotArgs",
")",
"\n",
"args",
".",
"ComputedStyles",
"=",
"computedStyles",
"\n",
"return",
"args",
"\n",
"}"
] |
// NewCaptureSnapshotArgs initializes CaptureSnapshotArgs with the required arguments.
|
[
"NewCaptureSnapshotArgs",
"initializes",
"CaptureSnapshotArgs",
"with",
"the",
"required",
"arguments",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/domsnapshot/command.go#L55-L59
|
18,821
|
mafredri/cdp
|
protocol/audits/command.go
|
NewGetEncodedResponseArgs
|
func NewGetEncodedResponseArgs(requestID network.RequestID, encoding string) *GetEncodedResponseArgs {
args := new(GetEncodedResponseArgs)
args.RequestID = requestID
args.Encoding = encoding
return args
}
|
go
|
func NewGetEncodedResponseArgs(requestID network.RequestID, encoding string) *GetEncodedResponseArgs {
args := new(GetEncodedResponseArgs)
args.RequestID = requestID
args.Encoding = encoding
return args
}
|
[
"func",
"NewGetEncodedResponseArgs",
"(",
"requestID",
"network",
".",
"RequestID",
",",
"encoding",
"string",
")",
"*",
"GetEncodedResponseArgs",
"{",
"args",
":=",
"new",
"(",
"GetEncodedResponseArgs",
")",
"\n",
"args",
".",
"RequestID",
"=",
"requestID",
"\n",
"args",
".",
"Encoding",
"=",
"encoding",
"\n",
"return",
"args",
"\n",
"}"
] |
// NewGetEncodedResponseArgs initializes GetEncodedResponseArgs with the required arguments.
|
[
"NewGetEncodedResponseArgs",
"initializes",
"GetEncodedResponseArgs",
"with",
"the",
"required",
"arguments",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/audits/command.go#L21-L26
|
18,822
|
mafredri/cdp
|
protocol/cachestorage/domain.go
|
RequestCacheNames
|
func (d *domainClient) RequestCacheNames(ctx context.Context, args *RequestCacheNamesArgs) (reply *RequestCacheNamesReply, err error) {
reply = new(RequestCacheNamesReply)
if args != nil {
err = rpcc.Invoke(ctx, "CacheStorage.requestCacheNames", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "CacheStorage.requestCacheNames", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "CacheStorage", Op: "RequestCacheNames", Err: err}
}
return
}
|
go
|
func (d *domainClient) RequestCacheNames(ctx context.Context, args *RequestCacheNamesArgs) (reply *RequestCacheNamesReply, err error) {
reply = new(RequestCacheNamesReply)
if args != nil {
err = rpcc.Invoke(ctx, "CacheStorage.requestCacheNames", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "CacheStorage.requestCacheNames", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "CacheStorage", Op: "RequestCacheNames", Err: err}
}
return
}
|
[
"func",
"(",
"d",
"*",
"domainClient",
")",
"RequestCacheNames",
"(",
"ctx",
"context",
".",
"Context",
",",
"args",
"*",
"RequestCacheNamesArgs",
")",
"(",
"reply",
"*",
"RequestCacheNamesReply",
",",
"err",
"error",
")",
"{",
"reply",
"=",
"new",
"(",
"RequestCacheNamesReply",
")",
"\n",
"if",
"args",
"!=",
"nil",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"args",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"else",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"nil",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"err",
"=",
"&",
"internal",
".",
"OpError",
"{",
"Domain",
":",
"\"",
"\"",
",",
"Op",
":",
"\"",
"\"",
",",
"Err",
":",
"err",
"}",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] |
// RequestCacheNames invokes the CacheStorage method. Requests cache names.
|
[
"RequestCacheNames",
"invokes",
"the",
"CacheStorage",
"method",
".",
"Requests",
"cache",
"names",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/cachestorage/domain.go#L48-L59
|
18,823
|
mafredri/cdp
|
protocol/cachestorage/domain.go
|
RequestCachedResponse
|
func (d *domainClient) RequestCachedResponse(ctx context.Context, args *RequestCachedResponseArgs) (reply *RequestCachedResponseReply, err error) {
reply = new(RequestCachedResponseReply)
if args != nil {
err = rpcc.Invoke(ctx, "CacheStorage.requestCachedResponse", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "CacheStorage.requestCachedResponse", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "CacheStorage", Op: "RequestCachedResponse", Err: err}
}
return
}
|
go
|
func (d *domainClient) RequestCachedResponse(ctx context.Context, args *RequestCachedResponseArgs) (reply *RequestCachedResponseReply, err error) {
reply = new(RequestCachedResponseReply)
if args != nil {
err = rpcc.Invoke(ctx, "CacheStorage.requestCachedResponse", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "CacheStorage.requestCachedResponse", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "CacheStorage", Op: "RequestCachedResponse", Err: err}
}
return
}
|
[
"func",
"(",
"d",
"*",
"domainClient",
")",
"RequestCachedResponse",
"(",
"ctx",
"context",
".",
"Context",
",",
"args",
"*",
"RequestCachedResponseArgs",
")",
"(",
"reply",
"*",
"RequestCachedResponseReply",
",",
"err",
"error",
")",
"{",
"reply",
"=",
"new",
"(",
"RequestCachedResponseReply",
")",
"\n",
"if",
"args",
"!=",
"nil",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"args",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"else",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"nil",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"err",
"=",
"&",
"internal",
".",
"OpError",
"{",
"Domain",
":",
"\"",
"\"",
",",
"Op",
":",
"\"",
"\"",
",",
"Err",
":",
"err",
"}",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] |
// RequestCachedResponse invokes the CacheStorage method. Fetches cache entry.
|
[
"RequestCachedResponse",
"invokes",
"the",
"CacheStorage",
"method",
".",
"Fetches",
"cache",
"entry",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/cachestorage/domain.go#L62-L73
|
18,824
|
mafredri/cdp
|
protocol/cachestorage/domain.go
|
RequestEntries
|
func (d *domainClient) RequestEntries(ctx context.Context, args *RequestEntriesArgs) (reply *RequestEntriesReply, err error) {
reply = new(RequestEntriesReply)
if args != nil {
err = rpcc.Invoke(ctx, "CacheStorage.requestEntries", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "CacheStorage.requestEntries", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "CacheStorage", Op: "RequestEntries", Err: err}
}
return
}
|
go
|
func (d *domainClient) RequestEntries(ctx context.Context, args *RequestEntriesArgs) (reply *RequestEntriesReply, err error) {
reply = new(RequestEntriesReply)
if args != nil {
err = rpcc.Invoke(ctx, "CacheStorage.requestEntries", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "CacheStorage.requestEntries", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "CacheStorage", Op: "RequestEntries", Err: err}
}
return
}
|
[
"func",
"(",
"d",
"*",
"domainClient",
")",
"RequestEntries",
"(",
"ctx",
"context",
".",
"Context",
",",
"args",
"*",
"RequestEntriesArgs",
")",
"(",
"reply",
"*",
"RequestEntriesReply",
",",
"err",
"error",
")",
"{",
"reply",
"=",
"new",
"(",
"RequestEntriesReply",
")",
"\n",
"if",
"args",
"!=",
"nil",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"args",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"else",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"nil",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"err",
"=",
"&",
"internal",
".",
"OpError",
"{",
"Domain",
":",
"\"",
"\"",
",",
"Op",
":",
"\"",
"\"",
",",
"Err",
":",
"err",
"}",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] |
// RequestEntries invokes the CacheStorage method. Requests data from cache.
|
[
"RequestEntries",
"invokes",
"the",
"CacheStorage",
"method",
".",
"Requests",
"data",
"from",
"cache",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/cachestorage/domain.go#L76-L87
|
18,825
|
mafredri/cdp
|
protocol/tracing/command.go
|
NewRecordClockSyncMarkerArgs
|
func NewRecordClockSyncMarkerArgs(syncID string) *RecordClockSyncMarkerArgs {
args := new(RecordClockSyncMarkerArgs)
args.SyncID = syncID
return args
}
|
go
|
func NewRecordClockSyncMarkerArgs(syncID string) *RecordClockSyncMarkerArgs {
args := new(RecordClockSyncMarkerArgs)
args.SyncID = syncID
return args
}
|
[
"func",
"NewRecordClockSyncMarkerArgs",
"(",
"syncID",
"string",
")",
"*",
"RecordClockSyncMarkerArgs",
"{",
"args",
":=",
"new",
"(",
"RecordClockSyncMarkerArgs",
")",
"\n",
"args",
".",
"SyncID",
"=",
"syncID",
"\n",
"return",
"args",
"\n",
"}"
] |
// NewRecordClockSyncMarkerArgs initializes RecordClockSyncMarkerArgs with the required arguments.
|
[
"NewRecordClockSyncMarkerArgs",
"initializes",
"RecordClockSyncMarkerArgs",
"with",
"the",
"required",
"arguments",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/tracing/command.go#L16-L20
|
18,826
|
mafredri/cdp
|
protocol/tracing/command.go
|
SetBufferUsageReportingInterval
|
func (a *StartArgs) SetBufferUsageReportingInterval(bufferUsageReportingInterval float64) *StartArgs {
a.BufferUsageReportingInterval = &bufferUsageReportingInterval
return a
}
|
go
|
func (a *StartArgs) SetBufferUsageReportingInterval(bufferUsageReportingInterval float64) *StartArgs {
a.BufferUsageReportingInterval = &bufferUsageReportingInterval
return a
}
|
[
"func",
"(",
"a",
"*",
"StartArgs",
")",
"SetBufferUsageReportingInterval",
"(",
"bufferUsageReportingInterval",
"float64",
")",
"*",
"StartArgs",
"{",
"a",
".",
"BufferUsageReportingInterval",
"=",
"&",
"bufferUsageReportingInterval",
"\n",
"return",
"a",
"\n",
"}"
] |
// SetBufferUsageReportingInterval sets the BufferUsageReportingInterval optional argument.
// If set, the agent will issue bufferUsage events at this interval,
// specified in milliseconds
|
[
"SetBufferUsageReportingInterval",
"sets",
"the",
"BufferUsageReportingInterval",
"optional",
"argument",
".",
"If",
"set",
"the",
"agent",
"will",
"issue",
"bufferUsage",
"events",
"at",
"this",
"interval",
"specified",
"in",
"milliseconds"
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/tracing/command.go#L77-L80
|
18,827
|
mafredri/cdp
|
protocol/tracing/command.go
|
SetTraceConfig
|
func (a *StartArgs) SetTraceConfig(traceConfig TraceConfig) *StartArgs {
a.TraceConfig = &traceConfig
return a
}
|
go
|
func (a *StartArgs) SetTraceConfig(traceConfig TraceConfig) *StartArgs {
a.TraceConfig = &traceConfig
return a
}
|
[
"func",
"(",
"a",
"*",
"StartArgs",
")",
"SetTraceConfig",
"(",
"traceConfig",
"TraceConfig",
")",
"*",
"StartArgs",
"{",
"a",
".",
"TraceConfig",
"=",
"&",
"traceConfig",
"\n",
"return",
"a",
"\n",
"}"
] |
// SetTraceConfig sets the TraceConfig optional argument.
|
[
"SetTraceConfig",
"sets",
"the",
"TraceConfig",
"optional",
"argument",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/tracing/command.go#L109-L112
|
18,828
|
mafredri/cdp
|
protocol/indexeddb/domain.go
|
RequestData
|
func (d *domainClient) RequestData(ctx context.Context, args *RequestDataArgs) (reply *RequestDataReply, err error) {
reply = new(RequestDataReply)
if args != nil {
err = rpcc.Invoke(ctx, "IndexedDB.requestData", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "IndexedDB.requestData", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "IndexedDB", Op: "RequestData", Err: err}
}
return
}
|
go
|
func (d *domainClient) RequestData(ctx context.Context, args *RequestDataArgs) (reply *RequestDataReply, err error) {
reply = new(RequestDataReply)
if args != nil {
err = rpcc.Invoke(ctx, "IndexedDB.requestData", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "IndexedDB.requestData", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "IndexedDB", Op: "RequestData", Err: err}
}
return
}
|
[
"func",
"(",
"d",
"*",
"domainClient",
")",
"RequestData",
"(",
"ctx",
"context",
".",
"Context",
",",
"args",
"*",
"RequestDataArgs",
")",
"(",
"reply",
"*",
"RequestDataReply",
",",
"err",
"error",
")",
"{",
"reply",
"=",
"new",
"(",
"RequestDataReply",
")",
"\n",
"if",
"args",
"!=",
"nil",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"args",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"else",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"nil",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"err",
"=",
"&",
"internal",
".",
"OpError",
"{",
"Domain",
":",
"\"",
"\"",
",",
"Op",
":",
"\"",
"\"",
",",
"Err",
":",
"err",
"}",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] |
// RequestData invokes the IndexedDB method. Requests data from object store
// or index.
|
[
"RequestData",
"invokes",
"the",
"IndexedDB",
"method",
".",
"Requests",
"data",
"from",
"object",
"store",
"or",
"index",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/indexeddb/domain.go#L82-L93
|
18,829
|
mafredri/cdp
|
protocol/indexeddb/domain.go
|
GetMetadata
|
func (d *domainClient) GetMetadata(ctx context.Context, args *GetMetadataArgs) (reply *GetMetadataReply, err error) {
reply = new(GetMetadataReply)
if args != nil {
err = rpcc.Invoke(ctx, "IndexedDB.getMetadata", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "IndexedDB.getMetadata", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "IndexedDB", Op: "GetMetadata", Err: err}
}
return
}
|
go
|
func (d *domainClient) GetMetadata(ctx context.Context, args *GetMetadataArgs) (reply *GetMetadataReply, err error) {
reply = new(GetMetadataReply)
if args != nil {
err = rpcc.Invoke(ctx, "IndexedDB.getMetadata", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "IndexedDB.getMetadata", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "IndexedDB", Op: "GetMetadata", Err: err}
}
return
}
|
[
"func",
"(",
"d",
"*",
"domainClient",
")",
"GetMetadata",
"(",
"ctx",
"context",
".",
"Context",
",",
"args",
"*",
"GetMetadataArgs",
")",
"(",
"reply",
"*",
"GetMetadataReply",
",",
"err",
"error",
")",
"{",
"reply",
"=",
"new",
"(",
"GetMetadataReply",
")",
"\n",
"if",
"args",
"!=",
"nil",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"args",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"else",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"nil",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"err",
"=",
"&",
"internal",
".",
"OpError",
"{",
"Domain",
":",
"\"",
"\"",
",",
"Op",
":",
"\"",
"\"",
",",
"Err",
":",
"err",
"}",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] |
// GetMetadata invokes the IndexedDB method. Gets metadata of an object store
|
[
"GetMetadata",
"invokes",
"the",
"IndexedDB",
"method",
".",
"Gets",
"metadata",
"of",
"an",
"object",
"store"
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/indexeddb/domain.go#L96-L107
|
18,830
|
mafredri/cdp
|
protocol/indexeddb/domain.go
|
RequestDatabase
|
func (d *domainClient) RequestDatabase(ctx context.Context, args *RequestDatabaseArgs) (reply *RequestDatabaseReply, err error) {
reply = new(RequestDatabaseReply)
if args != nil {
err = rpcc.Invoke(ctx, "IndexedDB.requestDatabase", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "IndexedDB.requestDatabase", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "IndexedDB", Op: "RequestDatabase", Err: err}
}
return
}
|
go
|
func (d *domainClient) RequestDatabase(ctx context.Context, args *RequestDatabaseArgs) (reply *RequestDatabaseReply, err error) {
reply = new(RequestDatabaseReply)
if args != nil {
err = rpcc.Invoke(ctx, "IndexedDB.requestDatabase", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "IndexedDB.requestDatabase", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "IndexedDB", Op: "RequestDatabase", Err: err}
}
return
}
|
[
"func",
"(",
"d",
"*",
"domainClient",
")",
"RequestDatabase",
"(",
"ctx",
"context",
".",
"Context",
",",
"args",
"*",
"RequestDatabaseArgs",
")",
"(",
"reply",
"*",
"RequestDatabaseReply",
",",
"err",
"error",
")",
"{",
"reply",
"=",
"new",
"(",
"RequestDatabaseReply",
")",
"\n",
"if",
"args",
"!=",
"nil",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"args",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"else",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"nil",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"err",
"=",
"&",
"internal",
".",
"OpError",
"{",
"Domain",
":",
"\"",
"\"",
",",
"Op",
":",
"\"",
"\"",
",",
"Err",
":",
"err",
"}",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] |
// RequestDatabase invokes the IndexedDB method. Requests database with given
// name in given frame.
|
[
"RequestDatabase",
"invokes",
"the",
"IndexedDB",
"method",
".",
"Requests",
"database",
"with",
"given",
"name",
"in",
"given",
"frame",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/indexeddb/domain.go#L111-L122
|
18,831
|
mafredri/cdp
|
protocol/indexeddb/domain.go
|
RequestDatabaseNames
|
func (d *domainClient) RequestDatabaseNames(ctx context.Context, args *RequestDatabaseNamesArgs) (reply *RequestDatabaseNamesReply, err error) {
reply = new(RequestDatabaseNamesReply)
if args != nil {
err = rpcc.Invoke(ctx, "IndexedDB.requestDatabaseNames", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "IndexedDB.requestDatabaseNames", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "IndexedDB", Op: "RequestDatabaseNames", Err: err}
}
return
}
|
go
|
func (d *domainClient) RequestDatabaseNames(ctx context.Context, args *RequestDatabaseNamesArgs) (reply *RequestDatabaseNamesReply, err error) {
reply = new(RequestDatabaseNamesReply)
if args != nil {
err = rpcc.Invoke(ctx, "IndexedDB.requestDatabaseNames", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "IndexedDB.requestDatabaseNames", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "IndexedDB", Op: "RequestDatabaseNames", Err: err}
}
return
}
|
[
"func",
"(",
"d",
"*",
"domainClient",
")",
"RequestDatabaseNames",
"(",
"ctx",
"context",
".",
"Context",
",",
"args",
"*",
"RequestDatabaseNamesArgs",
")",
"(",
"reply",
"*",
"RequestDatabaseNamesReply",
",",
"err",
"error",
")",
"{",
"reply",
"=",
"new",
"(",
"RequestDatabaseNamesReply",
")",
"\n",
"if",
"args",
"!=",
"nil",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"args",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"else",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"nil",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"err",
"=",
"&",
"internal",
".",
"OpError",
"{",
"Domain",
":",
"\"",
"\"",
",",
"Op",
":",
"\"",
"\"",
",",
"Err",
":",
"err",
"}",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] |
// RequestDatabaseNames invokes the IndexedDB method. Requests database names
// for given security origin.
|
[
"RequestDatabaseNames",
"invokes",
"the",
"IndexedDB",
"method",
".",
"Requests",
"database",
"names",
"for",
"given",
"security",
"origin",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/indexeddb/domain.go#L126-L137
|
18,832
|
mafredri/cdp
|
cmd/cdpgen/main.go
|
Printf
|
func (g *Generator) Printf(format string, args ...interface{}) {
fmt.Fprintf(&g.buf, format, args...)
}
|
go
|
func (g *Generator) Printf(format string, args ...interface{}) {
fmt.Fprintf(&g.buf, format, args...)
}
|
[
"func",
"(",
"g",
"*",
"Generator",
")",
"Printf",
"(",
"format",
"string",
",",
"args",
"...",
"interface",
"{",
"}",
")",
"{",
"fmt",
".",
"Fprintf",
"(",
"&",
"g",
".",
"buf",
",",
"format",
",",
"args",
"...",
")",
"\n",
"}"
] |
// Printf prints to the Generator buffer.
|
[
"Printf",
"prints",
"to",
"the",
"Generator",
"buffer",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/cmd/cdpgen/main.go#L238-L240
|
18,833
|
mafredri/cdp
|
cmd/cdpgen/main.go
|
CdpClient
|
func (g *Generator) CdpClient(domains []proto.Domain) {
g.hasContent = true
var fields, newFields Generator
for _, d := range domains {
fields.Printf("\t%s %s\n", d.Name(), d.Type())
newFields.Printf("\t\t%s: %s.NewClient(conn),\n", d.Name(), strings.ToLower(d.Name()))
}
g.Printf(`
// Client represents a Chrome DevTools Protocol client that can be used to
// invoke methods or listen to events in every CDP domain. The Client consumes
// a rpcc connection, used to invoke the methods.
type Client struct {
%s
}
// NewClient returns a new Client that uses conn
// for communication with the debugging target.
func NewClient(conn *rpcc.Conn) *Client {
return &Client{
%s
}
}
`, fields.buf.Bytes(), newFields.buf.Bytes())
}
|
go
|
func (g *Generator) CdpClient(domains []proto.Domain) {
g.hasContent = true
var fields, newFields Generator
for _, d := range domains {
fields.Printf("\t%s %s\n", d.Name(), d.Type())
newFields.Printf("\t\t%s: %s.NewClient(conn),\n", d.Name(), strings.ToLower(d.Name()))
}
g.Printf(`
// Client represents a Chrome DevTools Protocol client that can be used to
// invoke methods or listen to events in every CDP domain. The Client consumes
// a rpcc connection, used to invoke the methods.
type Client struct {
%s
}
// NewClient returns a new Client that uses conn
// for communication with the debugging target.
func NewClient(conn *rpcc.Conn) *Client {
return &Client{
%s
}
}
`, fields.buf.Bytes(), newFields.buf.Bytes())
}
|
[
"func",
"(",
"g",
"*",
"Generator",
")",
"CdpClient",
"(",
"domains",
"[",
"]",
"proto",
".",
"Domain",
")",
"{",
"g",
".",
"hasContent",
"=",
"true",
"\n",
"var",
"fields",
",",
"newFields",
"Generator",
"\n",
"for",
"_",
",",
"d",
":=",
"range",
"domains",
"{",
"fields",
".",
"Printf",
"(",
"\"",
"\\t",
"\\n",
"\"",
",",
"d",
".",
"Name",
"(",
")",
",",
"d",
".",
"Type",
"(",
")",
")",
"\n",
"newFields",
".",
"Printf",
"(",
"\"",
"\\t",
"\\t",
"\\n",
"\"",
",",
"d",
".",
"Name",
"(",
")",
",",
"strings",
".",
"ToLower",
"(",
"d",
".",
"Name",
"(",
")",
")",
")",
"\n",
"}",
"\n",
"g",
".",
"Printf",
"(",
"`\n// Client represents a Chrome DevTools Protocol client that can be used to\n// invoke methods or listen to events in every CDP domain. The Client consumes\n// a rpcc connection, used to invoke the methods.\ntype Client struct {\n\t%s\n}\n\n// NewClient returns a new Client that uses conn\n// for communication with the debugging target.\nfunc NewClient(conn *rpcc.Conn) *Client {\n\treturn &Client{\n\t\t%s\n\t}\n}\n`",
",",
"fields",
".",
"buf",
".",
"Bytes",
"(",
")",
",",
"newFields",
".",
"buf",
".",
"Bytes",
"(",
")",
")",
"\n",
"}"
] |
// CdpClient creates the cdp.Client type.
|
[
"CdpClient",
"creates",
"the",
"cdp",
".",
"Client",
"type",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/cmd/cdpgen/main.go#L298-L321
|
18,834
|
mafredri/cdp
|
cmd/cdpgen/main.go
|
PackageHeader
|
func (g *Generator) PackageHeader(comment string) {
if g.hasHeader {
return
}
g.hasHeader = true
g.Printf(`// Code generated by cdpgen. DO NOT EDIT.
%s
package %s
import (
"context"
"encoding/json"
"fmt"
%s
)
`, comment, g.pkg, quotedImports(g.imports))
}
|
go
|
func (g *Generator) PackageHeader(comment string) {
if g.hasHeader {
return
}
g.hasHeader = true
g.Printf(`// Code generated by cdpgen. DO NOT EDIT.
%s
package %s
import (
"context"
"encoding/json"
"fmt"
%s
)
`, comment, g.pkg, quotedImports(g.imports))
}
|
[
"func",
"(",
"g",
"*",
"Generator",
")",
"PackageHeader",
"(",
"comment",
"string",
")",
"{",
"if",
"g",
".",
"hasHeader",
"{",
"return",
"\n",
"}",
"\n",
"g",
".",
"hasHeader",
"=",
"true",
"\n",
"g",
".",
"Printf",
"(",
"`// Code generated by cdpgen. DO NOT EDIT.\n\n%s\npackage %s\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t%s\n)\n`",
",",
"comment",
",",
"g",
".",
"pkg",
",",
"quotedImports",
"(",
"g",
".",
"imports",
")",
")",
"\n",
"}"
] |
// PackageHeader writes the header for a package.
|
[
"PackageHeader",
"writes",
"the",
"header",
"for",
"a",
"package",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/cmd/cdpgen/main.go#L324-L342
|
18,835
|
mafredri/cdp
|
cmd/cdpgen/main.go
|
DomainInterface
|
func (g *Generator) DomainInterface(d proto.Domain) {
g.hasContent = true
comment := "The " + d.Name() + " domain. "
desc := d.Desc(0, len(comment))
if d.Deprecated {
desc = "\n//\n// Deprecated: " + desc
}
if d.Experimental {
desc += "\n//\n// Note: This domain is experimental."
}
g.Printf(`
// %[1]s%[2]s
type %[3]s interface{`, comment, desc, d.Name())
for _, c := range d.Commands {
if c.Redirect != "" {
continue
}
request := ""
reply := "error"
if len(c.Parameters) > 0 {
request = ", *" + strings.ToLower(d.Name()) + "." + c.ArgsName(d)
}
if len(c.Returns) > 0 {
reply = fmt.Sprintf("(*%s.%s, error)", strings.ToLower(d.Name()), c.ReplyName(d))
}
desc := c.Desc(true, 8, 0)
if c.Deprecated {
desc = strings.Replace(c.Desc(true, 8, 12), "Deprecated, ", "", 1)
desc = "Deprecated: " + strings.ToUpper(desc[0:1]) + desc[1:]
}
if desc != "" {
desc = "\n\t//\n\t// " + desc
}
if c.Experimental {
desc += "\n\t//\n\t// Note: This command is experimental."
}
g.Printf("\n\t// Command %s%s\n\t%s(context.Context%s) %s\n", c.Name(), desc, c.Name(), request, reply)
}
for _, e := range d.Events {
eventClient := fmt.Sprintf("%sClient", e.EventName(d))
desc := e.Desc(true, 8, 0)
if e.Deprecated {
desc = strings.Replace(e.Desc(true, 8, 12), "Deprecated, ", "", 1)
desc = "Deprecated: " + strings.ToUpper(desc[0:1]) + desc[1:]
}
if desc != "" {
desc = "\n\t//\n\t// " + desc
}
if e.Experimental {
desc += "\n//\n// Note: This event is experimental."
}
g.Printf("\n\t// Event %s%s\n\t%s(context.Context) (%s.%s, error)\n", e.Name(), desc, e.Name(), strings.ToLower(d.Name()), eventClient)
}
g.Printf("}\n")
}
|
go
|
func (g *Generator) DomainInterface(d proto.Domain) {
g.hasContent = true
comment := "The " + d.Name() + " domain. "
desc := d.Desc(0, len(comment))
if d.Deprecated {
desc = "\n//\n// Deprecated: " + desc
}
if d.Experimental {
desc += "\n//\n// Note: This domain is experimental."
}
g.Printf(`
// %[1]s%[2]s
type %[3]s interface{`, comment, desc, d.Name())
for _, c := range d.Commands {
if c.Redirect != "" {
continue
}
request := ""
reply := "error"
if len(c.Parameters) > 0 {
request = ", *" + strings.ToLower(d.Name()) + "." + c.ArgsName(d)
}
if len(c.Returns) > 0 {
reply = fmt.Sprintf("(*%s.%s, error)", strings.ToLower(d.Name()), c.ReplyName(d))
}
desc := c.Desc(true, 8, 0)
if c.Deprecated {
desc = strings.Replace(c.Desc(true, 8, 12), "Deprecated, ", "", 1)
desc = "Deprecated: " + strings.ToUpper(desc[0:1]) + desc[1:]
}
if desc != "" {
desc = "\n\t//\n\t// " + desc
}
if c.Experimental {
desc += "\n\t//\n\t// Note: This command is experimental."
}
g.Printf("\n\t// Command %s%s\n\t%s(context.Context%s) %s\n", c.Name(), desc, c.Name(), request, reply)
}
for _, e := range d.Events {
eventClient := fmt.Sprintf("%sClient", e.EventName(d))
desc := e.Desc(true, 8, 0)
if e.Deprecated {
desc = strings.Replace(e.Desc(true, 8, 12), "Deprecated, ", "", 1)
desc = "Deprecated: " + strings.ToUpper(desc[0:1]) + desc[1:]
}
if desc != "" {
desc = "\n\t//\n\t// " + desc
}
if e.Experimental {
desc += "\n//\n// Note: This event is experimental."
}
g.Printf("\n\t// Event %s%s\n\t%s(context.Context) (%s.%s, error)\n", e.Name(), desc, e.Name(), strings.ToLower(d.Name()), eventClient)
}
g.Printf("}\n")
}
|
[
"func",
"(",
"g",
"*",
"Generator",
")",
"DomainInterface",
"(",
"d",
"proto",
".",
"Domain",
")",
"{",
"g",
".",
"hasContent",
"=",
"true",
"\n\n",
"comment",
":=",
"\"",
"\"",
"+",
"d",
".",
"Name",
"(",
")",
"+",
"\"",
"\"",
"\n",
"desc",
":=",
"d",
".",
"Desc",
"(",
"0",
",",
"len",
"(",
"comment",
")",
")",
"\n",
"if",
"d",
".",
"Deprecated",
"{",
"desc",
"=",
"\"",
"\\n",
"\\n",
"\"",
"+",
"desc",
"\n",
"}",
"\n",
"if",
"d",
".",
"Experimental",
"{",
"desc",
"+=",
"\"",
"\\n",
"\\n",
"\"",
"\n",
"}",
"\n",
"g",
".",
"Printf",
"(",
"`\n// %[1]s%[2]s\ntype %[3]s interface{`",
",",
"comment",
",",
"desc",
",",
"d",
".",
"Name",
"(",
")",
")",
"\n",
"for",
"_",
",",
"c",
":=",
"range",
"d",
".",
"Commands",
"{",
"if",
"c",
".",
"Redirect",
"!=",
"\"",
"\"",
"{",
"continue",
"\n",
"}",
"\n",
"request",
":=",
"\"",
"\"",
"\n",
"reply",
":=",
"\"",
"\"",
"\n",
"if",
"len",
"(",
"c",
".",
"Parameters",
")",
">",
"0",
"{",
"request",
"=",
"\"",
"\"",
"+",
"strings",
".",
"ToLower",
"(",
"d",
".",
"Name",
"(",
")",
")",
"+",
"\"",
"\"",
"+",
"c",
".",
"ArgsName",
"(",
"d",
")",
"\n",
"}",
"\n",
"if",
"len",
"(",
"c",
".",
"Returns",
")",
">",
"0",
"{",
"reply",
"=",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"strings",
".",
"ToLower",
"(",
"d",
".",
"Name",
"(",
")",
")",
",",
"c",
".",
"ReplyName",
"(",
"d",
")",
")",
"\n",
"}",
"\n",
"desc",
":=",
"c",
".",
"Desc",
"(",
"true",
",",
"8",
",",
"0",
")",
"\n",
"if",
"c",
".",
"Deprecated",
"{",
"desc",
"=",
"strings",
".",
"Replace",
"(",
"c",
".",
"Desc",
"(",
"true",
",",
"8",
",",
"12",
")",
",",
"\"",
"\"",
",",
"\"",
"\"",
",",
"1",
")",
"\n",
"desc",
"=",
"\"",
"\"",
"+",
"strings",
".",
"ToUpper",
"(",
"desc",
"[",
"0",
":",
"1",
"]",
")",
"+",
"desc",
"[",
"1",
":",
"]",
"\n",
"}",
"\n",
"if",
"desc",
"!=",
"\"",
"\"",
"{",
"desc",
"=",
"\"",
"\\n",
"\\t",
"\\n",
"\\t",
"\"",
"+",
"desc",
"\n",
"}",
"\n",
"if",
"c",
".",
"Experimental",
"{",
"desc",
"+=",
"\"",
"\\n",
"\\t",
"\\n",
"\\t",
"\"",
"\n",
"}",
"\n",
"g",
".",
"Printf",
"(",
"\"",
"\\n",
"\\t",
"\\n",
"\\t",
"\\n",
"\"",
",",
"c",
".",
"Name",
"(",
")",
",",
"desc",
",",
"c",
".",
"Name",
"(",
")",
",",
"request",
",",
"reply",
")",
"\n",
"}",
"\n",
"for",
"_",
",",
"e",
":=",
"range",
"d",
".",
"Events",
"{",
"eventClient",
":=",
"fmt",
".",
"Sprintf",
"(",
"\"",
"\"",
",",
"e",
".",
"EventName",
"(",
"d",
")",
")",
"\n",
"desc",
":=",
"e",
".",
"Desc",
"(",
"true",
",",
"8",
",",
"0",
")",
"\n",
"if",
"e",
".",
"Deprecated",
"{",
"desc",
"=",
"strings",
".",
"Replace",
"(",
"e",
".",
"Desc",
"(",
"true",
",",
"8",
",",
"12",
")",
",",
"\"",
"\"",
",",
"\"",
"\"",
",",
"1",
")",
"\n",
"desc",
"=",
"\"",
"\"",
"+",
"strings",
".",
"ToUpper",
"(",
"desc",
"[",
"0",
":",
"1",
"]",
")",
"+",
"desc",
"[",
"1",
":",
"]",
"\n",
"}",
"\n",
"if",
"desc",
"!=",
"\"",
"\"",
"{",
"desc",
"=",
"\"",
"\\n",
"\\t",
"\\n",
"\\t",
"\"",
"+",
"desc",
"\n",
"}",
"\n",
"if",
"e",
".",
"Experimental",
"{",
"desc",
"+=",
"\"",
"\\n",
"\\n",
"\"",
"\n",
"}",
"\n",
"g",
".",
"Printf",
"(",
"\"",
"\\n",
"\\t",
"\\n",
"\\t",
"\\n",
"\"",
",",
"e",
".",
"Name",
"(",
")",
",",
"desc",
",",
"e",
".",
"Name",
"(",
")",
",",
"strings",
".",
"ToLower",
"(",
"d",
".",
"Name",
"(",
")",
")",
",",
"eventClient",
")",
"\n",
"}",
"\n",
"g",
".",
"Printf",
"(",
"\"",
"\\n",
"\"",
")",
"\n",
"}"
] |
// DomainInterface defines the domain interface.
|
[
"DomainInterface",
"defines",
"the",
"domain",
"interface",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/cmd/cdpgen/main.go#L345-L400
|
18,836
|
mafredri/cdp
|
cmd/cdpgen/main.go
|
DomainType
|
func (g *Generator) DomainType(d proto.Domain, t proto.AnyType) {
g.hasContent = true
var comment string
if d.Name() == "Page" && (t.Name(d) == "FrameID") {
comment = "//"
g.Printf(`
// %[1]s %[2]s
//
// Provided as an alias to prevent circular dependencies.
type %[1]s = internal.Page%[1]s
`, t.Name(d), t.Desc(0, len(t.Name(d))+1))
}
desc := t.Desc(0, len(t.Name(d))+1)
if t.Deprecated {
desc = "\n//\n// Deprecated: " + t.Desc(0, 12)
}
if t.Experimental {
desc = desc + "\n//\n// Note: This type is experimental."
}
g.Printf(`
// %[1]s %[2]s
%[3]stype %[1]s `, t.Name(d), desc, comment)
typ := t.GoType(g.pkg, d)
switch typ {
case "struct":
g.domainTypeStruct(d, t)
case "enum":
g.domainTypeEnum(d, t)
case "time.Time":
g.domainTypeTime(d, t)
case "RawMessage":
g.domainTypeRawMessage(d, t)
default:
g.Printf(typ)
}
g.Printf("\n\n")
}
|
go
|
func (g *Generator) DomainType(d proto.Domain, t proto.AnyType) {
g.hasContent = true
var comment string
if d.Name() == "Page" && (t.Name(d) == "FrameID") {
comment = "//"
g.Printf(`
// %[1]s %[2]s
//
// Provided as an alias to prevent circular dependencies.
type %[1]s = internal.Page%[1]s
`, t.Name(d), t.Desc(0, len(t.Name(d))+1))
}
desc := t.Desc(0, len(t.Name(d))+1)
if t.Deprecated {
desc = "\n//\n// Deprecated: " + t.Desc(0, 12)
}
if t.Experimental {
desc = desc + "\n//\n// Note: This type is experimental."
}
g.Printf(`
// %[1]s %[2]s
%[3]stype %[1]s `, t.Name(d), desc, comment)
typ := t.GoType(g.pkg, d)
switch typ {
case "struct":
g.domainTypeStruct(d, t)
case "enum":
g.domainTypeEnum(d, t)
case "time.Time":
g.domainTypeTime(d, t)
case "RawMessage":
g.domainTypeRawMessage(d, t)
default:
g.Printf(typ)
}
g.Printf("\n\n")
}
|
[
"func",
"(",
"g",
"*",
"Generator",
")",
"DomainType",
"(",
"d",
"proto",
".",
"Domain",
",",
"t",
"proto",
".",
"AnyType",
")",
"{",
"g",
".",
"hasContent",
"=",
"true",
"\n\n",
"var",
"comment",
"string",
"\n",
"if",
"d",
".",
"Name",
"(",
")",
"==",
"\"",
"\"",
"&&",
"(",
"t",
".",
"Name",
"(",
"d",
")",
"==",
"\"",
"\"",
")",
"{",
"comment",
"=",
"\"",
"\"",
"\n",
"g",
".",
"Printf",
"(",
"`\n// %[1]s %[2]s\n//\n// Provided as an alias to prevent circular dependencies.\ntype %[1]s = internal.Page%[1]s\n`",
",",
"t",
".",
"Name",
"(",
"d",
")",
",",
"t",
".",
"Desc",
"(",
"0",
",",
"len",
"(",
"t",
".",
"Name",
"(",
"d",
")",
")",
"+",
"1",
")",
")",
"\n",
"}",
"\n",
"desc",
":=",
"t",
".",
"Desc",
"(",
"0",
",",
"len",
"(",
"t",
".",
"Name",
"(",
"d",
")",
")",
"+",
"1",
")",
"\n",
"if",
"t",
".",
"Deprecated",
"{",
"desc",
"=",
"\"",
"\\n",
"\\n",
"\"",
"+",
"t",
".",
"Desc",
"(",
"0",
",",
"12",
")",
"\n",
"}",
"\n",
"if",
"t",
".",
"Experimental",
"{",
"desc",
"=",
"desc",
"+",
"\"",
"\\n",
"\\n",
"\"",
"\n",
"}",
"\n",
"g",
".",
"Printf",
"(",
"`\n// %[1]s %[2]s\n%[3]stype %[1]s `",
",",
"t",
".",
"Name",
"(",
"d",
")",
",",
"desc",
",",
"comment",
")",
"\n\n",
"typ",
":=",
"t",
".",
"GoType",
"(",
"g",
".",
"pkg",
",",
"d",
")",
"\n",
"switch",
"typ",
"{",
"case",
"\"",
"\"",
":",
"g",
".",
"domainTypeStruct",
"(",
"d",
",",
"t",
")",
"\n",
"case",
"\"",
"\"",
":",
"g",
".",
"domainTypeEnum",
"(",
"d",
",",
"t",
")",
"\n",
"case",
"\"",
"\"",
":",
"g",
".",
"domainTypeTime",
"(",
"d",
",",
"t",
")",
"\n",
"case",
"\"",
"\"",
":",
"g",
".",
"domainTypeRawMessage",
"(",
"d",
",",
"t",
")",
"\n",
"default",
":",
"g",
".",
"Printf",
"(",
"typ",
")",
"\n",
"}",
"\n",
"g",
".",
"Printf",
"(",
"\"",
"\\n",
"\\n",
"\"",
")",
"\n",
"}"
] |
// DomainType creates the type definition.
|
[
"DomainType",
"creates",
"the",
"type",
"definition",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/cmd/cdpgen/main.go#L583-L621
|
18,837
|
mafredri/cdp
|
cmd/cdpgen/main.go
|
CmdType
|
func (g *Generator) CmdType(doms []proto.Domain) {
g.hasContent = true
g.Printf(`
// CmdType is the type for CDP methods names.
type CmdType string
func (c CmdType) String() string {
return string(c)
}
// Cmd methods.
const (`)
for _, d := range doms {
for _, c := range d.Commands {
g.Printf("\n\t%s CmdType = %q", c.CmdName(d, true), d.Domain+"."+c.NameName)
}
}
g.Printf("\n)\n")
}
|
go
|
func (g *Generator) CmdType(doms []proto.Domain) {
g.hasContent = true
g.Printf(`
// CmdType is the type for CDP methods names.
type CmdType string
func (c CmdType) String() string {
return string(c)
}
// Cmd methods.
const (`)
for _, d := range doms {
for _, c := range d.Commands {
g.Printf("\n\t%s CmdType = %q", c.CmdName(d, true), d.Domain+"."+c.NameName)
}
}
g.Printf("\n)\n")
}
|
[
"func",
"(",
"g",
"*",
"Generator",
")",
"CmdType",
"(",
"doms",
"[",
"]",
"proto",
".",
"Domain",
")",
"{",
"g",
".",
"hasContent",
"=",
"true",
"\n",
"g",
".",
"Printf",
"(",
"`\n// CmdType is the type for CDP methods names.\ntype CmdType string\n\nfunc (c CmdType) String() string {\n\treturn string(c)\n}\n\n// Cmd methods.\nconst (`",
")",
"\n",
"for",
"_",
",",
"d",
":=",
"range",
"doms",
"{",
"for",
"_",
",",
"c",
":=",
"range",
"d",
".",
"Commands",
"{",
"g",
".",
"Printf",
"(",
"\"",
"\\n",
"\\t",
"\"",
",",
"c",
".",
"CmdName",
"(",
"d",
",",
"true",
")",
",",
"d",
".",
"Domain",
"+",
"\"",
"\"",
"+",
"c",
".",
"NameName",
")",
"\n",
"}",
"\n",
"}",
"\n",
"g",
".",
"Printf",
"(",
"\"",
"\\n",
"\\n",
"\"",
")",
"\n",
"}"
] |
// CmdType generates the type for CDP methods names.
|
[
"CmdType",
"generates",
"the",
"type",
"for",
"CDP",
"methods",
"names",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/cmd/cdpgen/main.go#L961-L979
|
18,838
|
mafredri/cdp
|
cmd/cdpgen/main.go
|
DomainCmd
|
func (g *Generator) DomainCmd(d proto.Domain, c proto.Command) {
if len(c.Parameters) > 0 {
g.hasContent = true
g.domainCmdArgs(d, c)
}
if len(c.Returns) > 0 {
g.hasContent = true
g.domainCmdReply(d, c)
}
}
|
go
|
func (g *Generator) DomainCmd(d proto.Domain, c proto.Command) {
if len(c.Parameters) > 0 {
g.hasContent = true
g.domainCmdArgs(d, c)
}
if len(c.Returns) > 0 {
g.hasContent = true
g.domainCmdReply(d, c)
}
}
|
[
"func",
"(",
"g",
"*",
"Generator",
")",
"DomainCmd",
"(",
"d",
"proto",
".",
"Domain",
",",
"c",
"proto",
".",
"Command",
")",
"{",
"if",
"len",
"(",
"c",
".",
"Parameters",
")",
">",
"0",
"{",
"g",
".",
"hasContent",
"=",
"true",
"\n",
"g",
".",
"domainCmdArgs",
"(",
"d",
",",
"c",
")",
"\n",
"}",
"\n",
"if",
"len",
"(",
"c",
".",
"Returns",
")",
">",
"0",
"{",
"g",
".",
"hasContent",
"=",
"true",
"\n",
"g",
".",
"domainCmdReply",
"(",
"d",
",",
"c",
")",
"\n",
"}",
"\n",
"}"
] |
// DomainCmd defines the command args and reply.
|
[
"DomainCmd",
"defines",
"the",
"command",
"args",
"and",
"reply",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/cmd/cdpgen/main.go#L982-L991
|
18,839
|
mafredri/cdp
|
cmd/cdpgen/main.go
|
EventType
|
func (g *Generator) EventType(doms []proto.Domain) {
g.hasContent = true
g.Printf(`
// EventType is the type for CDP event names.
type EventType string
func (e EventType) String() string {
return string(e)
}
// Event methods.
const (`)
for _, d := range doms {
for _, e := range d.Events {
g.Printf("\n\t%s EventType = %q", e.EventName(d), d.Domain+"."+e.NameName)
}
}
g.Printf("\n)\n")
}
|
go
|
func (g *Generator) EventType(doms []proto.Domain) {
g.hasContent = true
g.Printf(`
// EventType is the type for CDP event names.
type EventType string
func (e EventType) String() string {
return string(e)
}
// Event methods.
const (`)
for _, d := range doms {
for _, e := range d.Events {
g.Printf("\n\t%s EventType = %q", e.EventName(d), d.Domain+"."+e.NameName)
}
}
g.Printf("\n)\n")
}
|
[
"func",
"(",
"g",
"*",
"Generator",
")",
"EventType",
"(",
"doms",
"[",
"]",
"proto",
".",
"Domain",
")",
"{",
"g",
".",
"hasContent",
"=",
"true",
"\n",
"g",
".",
"Printf",
"(",
"`\n// EventType is the type for CDP event names.\ntype EventType string\n\nfunc (e EventType) String() string {\n\treturn string(e)\n}\n\n// Event methods.\nconst (`",
")",
"\n",
"for",
"_",
",",
"d",
":=",
"range",
"doms",
"{",
"for",
"_",
",",
"e",
":=",
"range",
"d",
".",
"Events",
"{",
"g",
".",
"Printf",
"(",
"\"",
"\\n",
"\\t",
"\"",
",",
"e",
".",
"EventName",
"(",
"d",
")",
",",
"d",
".",
"Domain",
"+",
"\"",
"\"",
"+",
"e",
".",
"NameName",
")",
"\n",
"}",
"\n",
"}",
"\n",
"g",
".",
"Printf",
"(",
"\"",
"\\n",
"\\n",
"\"",
")",
"\n",
"}"
] |
// EventType generates the type for CDP event names.
|
[
"EventType",
"generates",
"the",
"type",
"for",
"CDP",
"event",
"names",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/cmd/cdpgen/main.go#L1084-L1102
|
18,840
|
mafredri/cdp
|
cmd/cdpgen/main.go
|
DomainEvent
|
func (g *Generator) DomainEvent(d proto.Domain, e proto.Event) {
g.hasContent = true
g.domainEventClient(d, e)
g.domainEventReply(d, e)
}
|
go
|
func (g *Generator) DomainEvent(d proto.Domain, e proto.Event) {
g.hasContent = true
g.domainEventClient(d, e)
g.domainEventReply(d, e)
}
|
[
"func",
"(",
"g",
"*",
"Generator",
")",
"DomainEvent",
"(",
"d",
"proto",
".",
"Domain",
",",
"e",
"proto",
".",
"Event",
")",
"{",
"g",
".",
"hasContent",
"=",
"true",
"\n",
"g",
".",
"domainEventClient",
"(",
"d",
",",
"e",
")",
"\n\n",
"g",
".",
"domainEventReply",
"(",
"d",
",",
"e",
")",
"\n",
"}"
] |
// DomainEvent defines the event client and reply.
|
[
"DomainEvent",
"defines",
"the",
"event",
"client",
"and",
"reply",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/cmd/cdpgen/main.go#L1105-L1110
|
18,841
|
mafredri/cdp
|
protocol/layertree/domain.go
|
CompositingReasons
|
func (d *domainClient) CompositingReasons(ctx context.Context, args *CompositingReasonsArgs) (reply *CompositingReasonsReply, err error) {
reply = new(CompositingReasonsReply)
if args != nil {
err = rpcc.Invoke(ctx, "LayerTree.compositingReasons", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "LayerTree.compositingReasons", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "LayerTree", Op: "CompositingReasons", Err: err}
}
return
}
|
go
|
func (d *domainClient) CompositingReasons(ctx context.Context, args *CompositingReasonsArgs) (reply *CompositingReasonsReply, err error) {
reply = new(CompositingReasonsReply)
if args != nil {
err = rpcc.Invoke(ctx, "LayerTree.compositingReasons", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "LayerTree.compositingReasons", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "LayerTree", Op: "CompositingReasons", Err: err}
}
return
}
|
[
"func",
"(",
"d",
"*",
"domainClient",
")",
"CompositingReasons",
"(",
"ctx",
"context",
".",
"Context",
",",
"args",
"*",
"CompositingReasonsArgs",
")",
"(",
"reply",
"*",
"CompositingReasonsReply",
",",
"err",
"error",
")",
"{",
"reply",
"=",
"new",
"(",
"CompositingReasonsReply",
")",
"\n",
"if",
"args",
"!=",
"nil",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"args",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"else",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"nil",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"err",
"=",
"&",
"internal",
".",
"OpError",
"{",
"Domain",
":",
"\"",
"\"",
",",
"Op",
":",
"\"",
"\"",
",",
"Err",
":",
"err",
"}",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] |
// CompositingReasons invokes the LayerTree method. Provides the reasons why
// the given layer was composited.
|
[
"CompositingReasons",
"invokes",
"the",
"LayerTree",
"method",
".",
"Provides",
"the",
"reasons",
"why",
"the",
"given",
"layer",
"was",
"composited",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/layertree/domain.go#L23-L34
|
18,842
|
mafredri/cdp
|
protocol/layertree/domain.go
|
LoadSnapshot
|
func (d *domainClient) LoadSnapshot(ctx context.Context, args *LoadSnapshotArgs) (reply *LoadSnapshotReply, err error) {
reply = new(LoadSnapshotReply)
if args != nil {
err = rpcc.Invoke(ctx, "LayerTree.loadSnapshot", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "LayerTree.loadSnapshot", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "LayerTree", Op: "LoadSnapshot", Err: err}
}
return
}
|
go
|
func (d *domainClient) LoadSnapshot(ctx context.Context, args *LoadSnapshotArgs) (reply *LoadSnapshotReply, err error) {
reply = new(LoadSnapshotReply)
if args != nil {
err = rpcc.Invoke(ctx, "LayerTree.loadSnapshot", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "LayerTree.loadSnapshot", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "LayerTree", Op: "LoadSnapshot", Err: err}
}
return
}
|
[
"func",
"(",
"d",
"*",
"domainClient",
")",
"LoadSnapshot",
"(",
"ctx",
"context",
".",
"Context",
",",
"args",
"*",
"LoadSnapshotArgs",
")",
"(",
"reply",
"*",
"LoadSnapshotReply",
",",
"err",
"error",
")",
"{",
"reply",
"=",
"new",
"(",
"LoadSnapshotReply",
")",
"\n",
"if",
"args",
"!=",
"nil",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"args",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"else",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"nil",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"err",
"=",
"&",
"internal",
".",
"OpError",
"{",
"Domain",
":",
"\"",
"\"",
",",
"Op",
":",
"\"",
"\"",
",",
"Err",
":",
"err",
"}",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] |
// LoadSnapshot invokes the LayerTree method. Returns the snapshot identifier.
|
[
"LoadSnapshot",
"invokes",
"the",
"LayerTree",
"method",
".",
"Returns",
"the",
"snapshot",
"identifier",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/layertree/domain.go#L55-L66
|
18,843
|
mafredri/cdp
|
protocol/layertree/domain.go
|
MakeSnapshot
|
func (d *domainClient) MakeSnapshot(ctx context.Context, args *MakeSnapshotArgs) (reply *MakeSnapshotReply, err error) {
reply = new(MakeSnapshotReply)
if args != nil {
err = rpcc.Invoke(ctx, "LayerTree.makeSnapshot", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "LayerTree.makeSnapshot", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "LayerTree", Op: "MakeSnapshot", Err: err}
}
return
}
|
go
|
func (d *domainClient) MakeSnapshot(ctx context.Context, args *MakeSnapshotArgs) (reply *MakeSnapshotReply, err error) {
reply = new(MakeSnapshotReply)
if args != nil {
err = rpcc.Invoke(ctx, "LayerTree.makeSnapshot", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "LayerTree.makeSnapshot", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "LayerTree", Op: "MakeSnapshot", Err: err}
}
return
}
|
[
"func",
"(",
"d",
"*",
"domainClient",
")",
"MakeSnapshot",
"(",
"ctx",
"context",
".",
"Context",
",",
"args",
"*",
"MakeSnapshotArgs",
")",
"(",
"reply",
"*",
"MakeSnapshotReply",
",",
"err",
"error",
")",
"{",
"reply",
"=",
"new",
"(",
"MakeSnapshotReply",
")",
"\n",
"if",
"args",
"!=",
"nil",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"args",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"else",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"nil",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"err",
"=",
"&",
"internal",
".",
"OpError",
"{",
"Domain",
":",
"\"",
"\"",
",",
"Op",
":",
"\"",
"\"",
",",
"Err",
":",
"err",
"}",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] |
// MakeSnapshot invokes the LayerTree method. Returns the layer snapshot
// identifier.
|
[
"MakeSnapshot",
"invokes",
"the",
"LayerTree",
"method",
".",
"Returns",
"the",
"layer",
"snapshot",
"identifier",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/layertree/domain.go#L70-L81
|
18,844
|
mafredri/cdp
|
protocol/layertree/domain.go
|
ProfileSnapshot
|
func (d *domainClient) ProfileSnapshot(ctx context.Context, args *ProfileSnapshotArgs) (reply *ProfileSnapshotReply, err error) {
reply = new(ProfileSnapshotReply)
if args != nil {
err = rpcc.Invoke(ctx, "LayerTree.profileSnapshot", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "LayerTree.profileSnapshot", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "LayerTree", Op: "ProfileSnapshot", Err: err}
}
return
}
|
go
|
func (d *domainClient) ProfileSnapshot(ctx context.Context, args *ProfileSnapshotArgs) (reply *ProfileSnapshotReply, err error) {
reply = new(ProfileSnapshotReply)
if args != nil {
err = rpcc.Invoke(ctx, "LayerTree.profileSnapshot", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "LayerTree.profileSnapshot", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "LayerTree", Op: "ProfileSnapshot", Err: err}
}
return
}
|
[
"func",
"(",
"d",
"*",
"domainClient",
")",
"ProfileSnapshot",
"(",
"ctx",
"context",
".",
"Context",
",",
"args",
"*",
"ProfileSnapshotArgs",
")",
"(",
"reply",
"*",
"ProfileSnapshotReply",
",",
"err",
"error",
")",
"{",
"reply",
"=",
"new",
"(",
"ProfileSnapshotReply",
")",
"\n",
"if",
"args",
"!=",
"nil",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"args",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"else",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"nil",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"err",
"=",
"&",
"internal",
".",
"OpError",
"{",
"Domain",
":",
"\"",
"\"",
",",
"Op",
":",
"\"",
"\"",
",",
"Err",
":",
"err",
"}",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] |
// ProfileSnapshot invokes the LayerTree method.
|
[
"ProfileSnapshot",
"invokes",
"the",
"LayerTree",
"method",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/layertree/domain.go#L84-L95
|
18,845
|
mafredri/cdp
|
protocol/layertree/domain.go
|
ReplaySnapshot
|
func (d *domainClient) ReplaySnapshot(ctx context.Context, args *ReplaySnapshotArgs) (reply *ReplaySnapshotReply, err error) {
reply = new(ReplaySnapshotReply)
if args != nil {
err = rpcc.Invoke(ctx, "LayerTree.replaySnapshot", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "LayerTree.replaySnapshot", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "LayerTree", Op: "ReplaySnapshot", Err: err}
}
return
}
|
go
|
func (d *domainClient) ReplaySnapshot(ctx context.Context, args *ReplaySnapshotArgs) (reply *ReplaySnapshotReply, err error) {
reply = new(ReplaySnapshotReply)
if args != nil {
err = rpcc.Invoke(ctx, "LayerTree.replaySnapshot", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "LayerTree.replaySnapshot", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "LayerTree", Op: "ReplaySnapshot", Err: err}
}
return
}
|
[
"func",
"(",
"d",
"*",
"domainClient",
")",
"ReplaySnapshot",
"(",
"ctx",
"context",
".",
"Context",
",",
"args",
"*",
"ReplaySnapshotArgs",
")",
"(",
"reply",
"*",
"ReplaySnapshotReply",
",",
"err",
"error",
")",
"{",
"reply",
"=",
"new",
"(",
"ReplaySnapshotReply",
")",
"\n",
"if",
"args",
"!=",
"nil",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"args",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"else",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"nil",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"err",
"=",
"&",
"internal",
".",
"OpError",
"{",
"Domain",
":",
"\"",
"\"",
",",
"Op",
":",
"\"",
"\"",
",",
"Err",
":",
"err",
"}",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] |
// ReplaySnapshot invokes the LayerTree method. Replays the layer snapshot and
// returns the resulting bitmap.
|
[
"ReplaySnapshot",
"invokes",
"the",
"LayerTree",
"method",
".",
"Replays",
"the",
"layer",
"snapshot",
"and",
"returns",
"the",
"resulting",
"bitmap",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/layertree/domain.go#L113-L124
|
18,846
|
mafredri/cdp
|
protocol/layertree/domain.go
|
SnapshotCommandLog
|
func (d *domainClient) SnapshotCommandLog(ctx context.Context, args *SnapshotCommandLogArgs) (reply *SnapshotCommandLogReply, err error) {
reply = new(SnapshotCommandLogReply)
if args != nil {
err = rpcc.Invoke(ctx, "LayerTree.snapshotCommandLog", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "LayerTree.snapshotCommandLog", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "LayerTree", Op: "SnapshotCommandLog", Err: err}
}
return
}
|
go
|
func (d *domainClient) SnapshotCommandLog(ctx context.Context, args *SnapshotCommandLogArgs) (reply *SnapshotCommandLogReply, err error) {
reply = new(SnapshotCommandLogReply)
if args != nil {
err = rpcc.Invoke(ctx, "LayerTree.snapshotCommandLog", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "LayerTree.snapshotCommandLog", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "LayerTree", Op: "SnapshotCommandLog", Err: err}
}
return
}
|
[
"func",
"(",
"d",
"*",
"domainClient",
")",
"SnapshotCommandLog",
"(",
"ctx",
"context",
".",
"Context",
",",
"args",
"*",
"SnapshotCommandLogArgs",
")",
"(",
"reply",
"*",
"SnapshotCommandLogReply",
",",
"err",
"error",
")",
"{",
"reply",
"=",
"new",
"(",
"SnapshotCommandLogReply",
")",
"\n",
"if",
"args",
"!=",
"nil",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"args",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"else",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"nil",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"err",
"=",
"&",
"internal",
".",
"OpError",
"{",
"Domain",
":",
"\"",
"\"",
",",
"Op",
":",
"\"",
"\"",
",",
"Err",
":",
"err",
"}",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] |
// SnapshotCommandLog invokes the LayerTree method. Replays the layer snapshot
// and returns canvas log.
|
[
"SnapshotCommandLog",
"invokes",
"the",
"LayerTree",
"method",
".",
"Replays",
"the",
"layer",
"snapshot",
"and",
"returns",
"canvas",
"log",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/layertree/domain.go#L128-L139
|
18,847
|
mafredri/cdp
|
protocol/applicationcache/command.go
|
NewGetApplicationCacheForFrameArgs
|
func NewGetApplicationCacheForFrameArgs(frameID page.FrameID) *GetApplicationCacheForFrameArgs {
args := new(GetApplicationCacheForFrameArgs)
args.FrameID = frameID
return args
}
|
go
|
func NewGetApplicationCacheForFrameArgs(frameID page.FrameID) *GetApplicationCacheForFrameArgs {
args := new(GetApplicationCacheForFrameArgs)
args.FrameID = frameID
return args
}
|
[
"func",
"NewGetApplicationCacheForFrameArgs",
"(",
"frameID",
"page",
".",
"FrameID",
")",
"*",
"GetApplicationCacheForFrameArgs",
"{",
"args",
":=",
"new",
"(",
"GetApplicationCacheForFrameArgs",
")",
"\n",
"args",
".",
"FrameID",
"=",
"frameID",
"\n",
"return",
"args",
"\n",
"}"
] |
// NewGetApplicationCacheForFrameArgs initializes GetApplicationCacheForFrameArgs with the required arguments.
|
[
"NewGetApplicationCacheForFrameArgs",
"initializes",
"GetApplicationCacheForFrameArgs",
"with",
"the",
"required",
"arguments",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/applicationcache/command.go#L15-L19
|
18,848
|
mafredri/cdp
|
protocol/applicationcache/command.go
|
NewGetManifestForFrameArgs
|
func NewGetManifestForFrameArgs(frameID page.FrameID) *GetManifestForFrameArgs {
args := new(GetManifestForFrameArgs)
args.FrameID = frameID
return args
}
|
go
|
func NewGetManifestForFrameArgs(frameID page.FrameID) *GetManifestForFrameArgs {
args := new(GetManifestForFrameArgs)
args.FrameID = frameID
return args
}
|
[
"func",
"NewGetManifestForFrameArgs",
"(",
"frameID",
"page",
".",
"FrameID",
")",
"*",
"GetManifestForFrameArgs",
"{",
"args",
":=",
"new",
"(",
"GetManifestForFrameArgs",
")",
"\n",
"args",
".",
"FrameID",
"=",
"frameID",
"\n",
"return",
"args",
"\n",
"}"
] |
// NewGetManifestForFrameArgs initializes GetManifestForFrameArgs with the required arguments.
|
[
"NewGetManifestForFrameArgs",
"initializes",
"GetManifestForFrameArgs",
"with",
"the",
"required",
"arguments",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/applicationcache/command.go#L37-L41
|
18,849
|
mafredri/cdp
|
protocol/dom/domain.go
|
CollectClassNamesFromSubtree
|
func (d *domainClient) CollectClassNamesFromSubtree(ctx context.Context, args *CollectClassNamesFromSubtreeArgs) (reply *CollectClassNamesFromSubtreeReply, err error) {
reply = new(CollectClassNamesFromSubtreeReply)
if args != nil {
err = rpcc.Invoke(ctx, "DOM.collectClassNamesFromSubtree", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "DOM.collectClassNamesFromSubtree", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "DOM", Op: "CollectClassNamesFromSubtree", Err: err}
}
return
}
|
go
|
func (d *domainClient) CollectClassNamesFromSubtree(ctx context.Context, args *CollectClassNamesFromSubtreeArgs) (reply *CollectClassNamesFromSubtreeReply, err error) {
reply = new(CollectClassNamesFromSubtreeReply)
if args != nil {
err = rpcc.Invoke(ctx, "DOM.collectClassNamesFromSubtree", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "DOM.collectClassNamesFromSubtree", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "DOM", Op: "CollectClassNamesFromSubtree", Err: err}
}
return
}
|
[
"func",
"(",
"d",
"*",
"domainClient",
")",
"CollectClassNamesFromSubtree",
"(",
"ctx",
"context",
".",
"Context",
",",
"args",
"*",
"CollectClassNamesFromSubtreeArgs",
")",
"(",
"reply",
"*",
"CollectClassNamesFromSubtreeReply",
",",
"err",
"error",
")",
"{",
"reply",
"=",
"new",
"(",
"CollectClassNamesFromSubtreeReply",
")",
"\n",
"if",
"args",
"!=",
"nil",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"args",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"else",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"nil",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"err",
"=",
"&",
"internal",
".",
"OpError",
"{",
"Domain",
":",
"\"",
"\"",
",",
"Op",
":",
"\"",
"\"",
",",
"Err",
":",
"err",
"}",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] |
// CollectClassNamesFromSubtree invokes the DOM method. Collects class names
// for the node with given id and all of it's child nodes.
|
[
"CollectClassNamesFromSubtree",
"invokes",
"the",
"DOM",
"method",
".",
"Collects",
"class",
"names",
"for",
"the",
"node",
"with",
"given",
"id",
"and",
"all",
"of",
"it",
"s",
"child",
"nodes",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/dom/domain.go#L43-L54
|
18,850
|
mafredri/cdp
|
protocol/dom/domain.go
|
CopyTo
|
func (d *domainClient) CopyTo(ctx context.Context, args *CopyToArgs) (reply *CopyToReply, err error) {
reply = new(CopyToReply)
if args != nil {
err = rpcc.Invoke(ctx, "DOM.copyTo", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "DOM.copyTo", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "DOM", Op: "CopyTo", Err: err}
}
return
}
|
go
|
func (d *domainClient) CopyTo(ctx context.Context, args *CopyToArgs) (reply *CopyToReply, err error) {
reply = new(CopyToReply)
if args != nil {
err = rpcc.Invoke(ctx, "DOM.copyTo", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "DOM.copyTo", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "DOM", Op: "CopyTo", Err: err}
}
return
}
|
[
"func",
"(",
"d",
"*",
"domainClient",
")",
"CopyTo",
"(",
"ctx",
"context",
".",
"Context",
",",
"args",
"*",
"CopyToArgs",
")",
"(",
"reply",
"*",
"CopyToReply",
",",
"err",
"error",
")",
"{",
"reply",
"=",
"new",
"(",
"CopyToReply",
")",
"\n",
"if",
"args",
"!=",
"nil",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"args",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"else",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"nil",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"err",
"=",
"&",
"internal",
".",
"OpError",
"{",
"Domain",
":",
"\"",
"\"",
",",
"Op",
":",
"\"",
"\"",
",",
"Err",
":",
"err",
"}",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] |
// CopyTo invokes the DOM method. Creates a deep copy of the specified node
// and places it into the target container before the given anchor.
|
[
"CopyTo",
"invokes",
"the",
"DOM",
"method",
".",
"Creates",
"a",
"deep",
"copy",
"of",
"the",
"specified",
"node",
"and",
"places",
"it",
"into",
"the",
"target",
"container",
"before",
"the",
"given",
"anchor",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/dom/domain.go#L58-L69
|
18,851
|
mafredri/cdp
|
protocol/dom/domain.go
|
DescribeNode
|
func (d *domainClient) DescribeNode(ctx context.Context, args *DescribeNodeArgs) (reply *DescribeNodeReply, err error) {
reply = new(DescribeNodeReply)
if args != nil {
err = rpcc.Invoke(ctx, "DOM.describeNode", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "DOM.describeNode", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "DOM", Op: "DescribeNode", Err: err}
}
return
}
|
go
|
func (d *domainClient) DescribeNode(ctx context.Context, args *DescribeNodeArgs) (reply *DescribeNodeReply, err error) {
reply = new(DescribeNodeReply)
if args != nil {
err = rpcc.Invoke(ctx, "DOM.describeNode", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "DOM.describeNode", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "DOM", Op: "DescribeNode", Err: err}
}
return
}
|
[
"func",
"(",
"d",
"*",
"domainClient",
")",
"DescribeNode",
"(",
"ctx",
"context",
".",
"Context",
",",
"args",
"*",
"DescribeNodeArgs",
")",
"(",
"reply",
"*",
"DescribeNodeReply",
",",
"err",
"error",
")",
"{",
"reply",
"=",
"new",
"(",
"DescribeNodeReply",
")",
"\n",
"if",
"args",
"!=",
"nil",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"args",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"else",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"nil",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"err",
"=",
"&",
"internal",
".",
"OpError",
"{",
"Domain",
":",
"\"",
"\"",
",",
"Op",
":",
"\"",
"\"",
",",
"Err",
":",
"err",
"}",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] |
// DescribeNode invokes the DOM method. Describes node given its id, does not
// require domain to be enabled. Does not start tracking any objects, can be
// used for automation.
|
[
"DescribeNode",
"invokes",
"the",
"DOM",
"method",
".",
"Describes",
"node",
"given",
"its",
"id",
"does",
"not",
"require",
"domain",
"to",
"be",
"enabled",
".",
"Does",
"not",
"start",
"tracking",
"any",
"objects",
"can",
"be",
"used",
"for",
"automation",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/dom/domain.go#L74-L85
|
18,852
|
mafredri/cdp
|
protocol/dom/domain.go
|
GetAttributes
|
func (d *domainClient) GetAttributes(ctx context.Context, args *GetAttributesArgs) (reply *GetAttributesReply, err error) {
reply = new(GetAttributesReply)
if args != nil {
err = rpcc.Invoke(ctx, "DOM.getAttributes", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "DOM.getAttributes", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "DOM", Op: "GetAttributes", Err: err}
}
return
}
|
go
|
func (d *domainClient) GetAttributes(ctx context.Context, args *GetAttributesArgs) (reply *GetAttributesReply, err error) {
reply = new(GetAttributesReply)
if args != nil {
err = rpcc.Invoke(ctx, "DOM.getAttributes", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "DOM.getAttributes", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "DOM", Op: "GetAttributes", Err: err}
}
return
}
|
[
"func",
"(",
"d",
"*",
"domainClient",
")",
"GetAttributes",
"(",
"ctx",
"context",
".",
"Context",
",",
"args",
"*",
"GetAttributesArgs",
")",
"(",
"reply",
"*",
"GetAttributesReply",
",",
"err",
"error",
")",
"{",
"reply",
"=",
"new",
"(",
"GetAttributesReply",
")",
"\n",
"if",
"args",
"!=",
"nil",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"args",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"else",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"nil",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"err",
"=",
"&",
"internal",
".",
"OpError",
"{",
"Domain",
":",
"\"",
"\"",
",",
"Op",
":",
"\"",
"\"",
",",
"Err",
":",
"err",
"}",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] |
// GetAttributes invokes the DOM method. Returns attributes for the specified
// node.
|
[
"GetAttributes",
"invokes",
"the",
"DOM",
"method",
".",
"Returns",
"attributes",
"for",
"the",
"specified",
"node",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/dom/domain.go#L135-L146
|
18,853
|
mafredri/cdp
|
protocol/dom/domain.go
|
GetBoxModel
|
func (d *domainClient) GetBoxModel(ctx context.Context, args *GetBoxModelArgs) (reply *GetBoxModelReply, err error) {
reply = new(GetBoxModelReply)
if args != nil {
err = rpcc.Invoke(ctx, "DOM.getBoxModel", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "DOM.getBoxModel", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "DOM", Op: "GetBoxModel", Err: err}
}
return
}
|
go
|
func (d *domainClient) GetBoxModel(ctx context.Context, args *GetBoxModelArgs) (reply *GetBoxModelReply, err error) {
reply = new(GetBoxModelReply)
if args != nil {
err = rpcc.Invoke(ctx, "DOM.getBoxModel", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "DOM.getBoxModel", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "DOM", Op: "GetBoxModel", Err: err}
}
return
}
|
[
"func",
"(",
"d",
"*",
"domainClient",
")",
"GetBoxModel",
"(",
"ctx",
"context",
".",
"Context",
",",
"args",
"*",
"GetBoxModelArgs",
")",
"(",
"reply",
"*",
"GetBoxModelReply",
",",
"err",
"error",
")",
"{",
"reply",
"=",
"new",
"(",
"GetBoxModelReply",
")",
"\n",
"if",
"args",
"!=",
"nil",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"args",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"else",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"nil",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"err",
"=",
"&",
"internal",
".",
"OpError",
"{",
"Domain",
":",
"\"",
"\"",
",",
"Op",
":",
"\"",
"\"",
",",
"Err",
":",
"err",
"}",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] |
// GetBoxModel invokes the DOM method. Returns boxes for the given node.
|
[
"GetBoxModel",
"invokes",
"the",
"DOM",
"method",
".",
"Returns",
"boxes",
"for",
"the",
"given",
"node",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/dom/domain.go#L149-L160
|
18,854
|
mafredri/cdp
|
protocol/dom/domain.go
|
GetContentQuads
|
func (d *domainClient) GetContentQuads(ctx context.Context, args *GetContentQuadsArgs) (reply *GetContentQuadsReply, err error) {
reply = new(GetContentQuadsReply)
if args != nil {
err = rpcc.Invoke(ctx, "DOM.getContentQuads", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "DOM.getContentQuads", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "DOM", Op: "GetContentQuads", Err: err}
}
return
}
|
go
|
func (d *domainClient) GetContentQuads(ctx context.Context, args *GetContentQuadsArgs) (reply *GetContentQuadsReply, err error) {
reply = new(GetContentQuadsReply)
if args != nil {
err = rpcc.Invoke(ctx, "DOM.getContentQuads", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "DOM.getContentQuads", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "DOM", Op: "GetContentQuads", Err: err}
}
return
}
|
[
"func",
"(",
"d",
"*",
"domainClient",
")",
"GetContentQuads",
"(",
"ctx",
"context",
".",
"Context",
",",
"args",
"*",
"GetContentQuadsArgs",
")",
"(",
"reply",
"*",
"GetContentQuadsReply",
",",
"err",
"error",
")",
"{",
"reply",
"=",
"new",
"(",
"GetContentQuadsReply",
")",
"\n",
"if",
"args",
"!=",
"nil",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"args",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"else",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"nil",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"err",
"=",
"&",
"internal",
".",
"OpError",
"{",
"Domain",
":",
"\"",
"\"",
",",
"Op",
":",
"\"",
"\"",
",",
"Err",
":",
"err",
"}",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] |
// GetContentQuads invokes the DOM method. Returns quads that describe node
// position on the page. This method might return multiple quads for inline
// nodes.
|
[
"GetContentQuads",
"invokes",
"the",
"DOM",
"method",
".",
"Returns",
"quads",
"that",
"describe",
"node",
"position",
"on",
"the",
"page",
".",
"This",
"method",
"might",
"return",
"multiple",
"quads",
"for",
"inline",
"nodes",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/dom/domain.go#L165-L176
|
18,855
|
mafredri/cdp
|
protocol/dom/domain.go
|
GetNodeForLocation
|
func (d *domainClient) GetNodeForLocation(ctx context.Context, args *GetNodeForLocationArgs) (reply *GetNodeForLocationReply, err error) {
reply = new(GetNodeForLocationReply)
if args != nil {
err = rpcc.Invoke(ctx, "DOM.getNodeForLocation", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "DOM.getNodeForLocation", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "DOM", Op: "GetNodeForLocation", Err: err}
}
return
}
|
go
|
func (d *domainClient) GetNodeForLocation(ctx context.Context, args *GetNodeForLocationArgs) (reply *GetNodeForLocationReply, err error) {
reply = new(GetNodeForLocationReply)
if args != nil {
err = rpcc.Invoke(ctx, "DOM.getNodeForLocation", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "DOM.getNodeForLocation", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "DOM", Op: "GetNodeForLocation", Err: err}
}
return
}
|
[
"func",
"(",
"d",
"*",
"domainClient",
")",
"GetNodeForLocation",
"(",
"ctx",
"context",
".",
"Context",
",",
"args",
"*",
"GetNodeForLocationArgs",
")",
"(",
"reply",
"*",
"GetNodeForLocationReply",
",",
"err",
"error",
")",
"{",
"reply",
"=",
"new",
"(",
"GetNodeForLocationReply",
")",
"\n",
"if",
"args",
"!=",
"nil",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"args",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"else",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"nil",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"err",
"=",
"&",
"internal",
".",
"OpError",
"{",
"Domain",
":",
"\"",
"\"",
",",
"Op",
":",
"\"",
"\"",
",",
"Err",
":",
"err",
"}",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] |
// GetNodeForLocation invokes the DOM method. Returns node id at given
// location. Depending on whether DOM domain is enabled, nodeId is either
// returned or not.
|
[
"GetNodeForLocation",
"invokes",
"the",
"DOM",
"method",
".",
"Returns",
"node",
"id",
"at",
"given",
"location",
".",
"Depending",
"on",
"whether",
"DOM",
"domain",
"is",
"enabled",
"nodeId",
"is",
"either",
"returned",
"or",
"not",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/dom/domain.go#L211-L222
|
18,856
|
mafredri/cdp
|
protocol/dom/domain.go
|
GetOuterHTML
|
func (d *domainClient) GetOuterHTML(ctx context.Context, args *GetOuterHTMLArgs) (reply *GetOuterHTMLReply, err error) {
reply = new(GetOuterHTMLReply)
if args != nil {
err = rpcc.Invoke(ctx, "DOM.getOuterHTML", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "DOM.getOuterHTML", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "DOM", Op: "GetOuterHTML", Err: err}
}
return
}
|
go
|
func (d *domainClient) GetOuterHTML(ctx context.Context, args *GetOuterHTMLArgs) (reply *GetOuterHTMLReply, err error) {
reply = new(GetOuterHTMLReply)
if args != nil {
err = rpcc.Invoke(ctx, "DOM.getOuterHTML", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "DOM.getOuterHTML", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "DOM", Op: "GetOuterHTML", Err: err}
}
return
}
|
[
"func",
"(",
"d",
"*",
"domainClient",
")",
"GetOuterHTML",
"(",
"ctx",
"context",
".",
"Context",
",",
"args",
"*",
"GetOuterHTMLArgs",
")",
"(",
"reply",
"*",
"GetOuterHTMLReply",
",",
"err",
"error",
")",
"{",
"reply",
"=",
"new",
"(",
"GetOuterHTMLReply",
")",
"\n",
"if",
"args",
"!=",
"nil",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"args",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"else",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"nil",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"err",
"=",
"&",
"internal",
".",
"OpError",
"{",
"Domain",
":",
"\"",
"\"",
",",
"Op",
":",
"\"",
"\"",
",",
"Err",
":",
"err",
"}",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] |
// GetOuterHTML invokes the DOM method. Returns node's HTML markup.
|
[
"GetOuterHTML",
"invokes",
"the",
"DOM",
"method",
".",
"Returns",
"node",
"s",
"HTML",
"markup",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/dom/domain.go#L225-L236
|
18,857
|
mafredri/cdp
|
protocol/dom/domain.go
|
GetRelayoutBoundary
|
func (d *domainClient) GetRelayoutBoundary(ctx context.Context, args *GetRelayoutBoundaryArgs) (reply *GetRelayoutBoundaryReply, err error) {
reply = new(GetRelayoutBoundaryReply)
if args != nil {
err = rpcc.Invoke(ctx, "DOM.getRelayoutBoundary", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "DOM.getRelayoutBoundary", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "DOM", Op: "GetRelayoutBoundary", Err: err}
}
return
}
|
go
|
func (d *domainClient) GetRelayoutBoundary(ctx context.Context, args *GetRelayoutBoundaryArgs) (reply *GetRelayoutBoundaryReply, err error) {
reply = new(GetRelayoutBoundaryReply)
if args != nil {
err = rpcc.Invoke(ctx, "DOM.getRelayoutBoundary", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "DOM.getRelayoutBoundary", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "DOM", Op: "GetRelayoutBoundary", Err: err}
}
return
}
|
[
"func",
"(",
"d",
"*",
"domainClient",
")",
"GetRelayoutBoundary",
"(",
"ctx",
"context",
".",
"Context",
",",
"args",
"*",
"GetRelayoutBoundaryArgs",
")",
"(",
"reply",
"*",
"GetRelayoutBoundaryReply",
",",
"err",
"error",
")",
"{",
"reply",
"=",
"new",
"(",
"GetRelayoutBoundaryReply",
")",
"\n",
"if",
"args",
"!=",
"nil",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"args",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"else",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"nil",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"err",
"=",
"&",
"internal",
".",
"OpError",
"{",
"Domain",
":",
"\"",
"\"",
",",
"Op",
":",
"\"",
"\"",
",",
"Err",
":",
"err",
"}",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] |
// GetRelayoutBoundary invokes the DOM method. Returns the id of the nearest
// ancestor that is a relayout boundary.
|
[
"GetRelayoutBoundary",
"invokes",
"the",
"DOM",
"method",
".",
"Returns",
"the",
"id",
"of",
"the",
"nearest",
"ancestor",
"that",
"is",
"a",
"relayout",
"boundary",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/dom/domain.go#L240-L251
|
18,858
|
mafredri/cdp
|
protocol/dom/domain.go
|
GetSearchResults
|
func (d *domainClient) GetSearchResults(ctx context.Context, args *GetSearchResultsArgs) (reply *GetSearchResultsReply, err error) {
reply = new(GetSearchResultsReply)
if args != nil {
err = rpcc.Invoke(ctx, "DOM.getSearchResults", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "DOM.getSearchResults", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "DOM", Op: "GetSearchResults", Err: err}
}
return
}
|
go
|
func (d *domainClient) GetSearchResults(ctx context.Context, args *GetSearchResultsArgs) (reply *GetSearchResultsReply, err error) {
reply = new(GetSearchResultsReply)
if args != nil {
err = rpcc.Invoke(ctx, "DOM.getSearchResults", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "DOM.getSearchResults", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "DOM", Op: "GetSearchResults", Err: err}
}
return
}
|
[
"func",
"(",
"d",
"*",
"domainClient",
")",
"GetSearchResults",
"(",
"ctx",
"context",
".",
"Context",
",",
"args",
"*",
"GetSearchResultsArgs",
")",
"(",
"reply",
"*",
"GetSearchResultsReply",
",",
"err",
"error",
")",
"{",
"reply",
"=",
"new",
"(",
"GetSearchResultsReply",
")",
"\n",
"if",
"args",
"!=",
"nil",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"args",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"else",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"nil",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"err",
"=",
"&",
"internal",
".",
"OpError",
"{",
"Domain",
":",
"\"",
"\"",
",",
"Op",
":",
"\"",
"\"",
",",
"Err",
":",
"err",
"}",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] |
// GetSearchResults invokes the DOM method. Returns search results from given
// `fromIndex` to given `toIndex` from the search with the given identifier.
|
[
"GetSearchResults",
"invokes",
"the",
"DOM",
"method",
".",
"Returns",
"search",
"results",
"from",
"given",
"fromIndex",
"to",
"given",
"toIndex",
"from",
"the",
"search",
"with",
"the",
"given",
"identifier",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/dom/domain.go#L255-L266
|
18,859
|
mafredri/cdp
|
protocol/dom/domain.go
|
MoveTo
|
func (d *domainClient) MoveTo(ctx context.Context, args *MoveToArgs) (reply *MoveToReply, err error) {
reply = new(MoveToReply)
if args != nil {
err = rpcc.Invoke(ctx, "DOM.moveTo", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "DOM.moveTo", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "DOM", Op: "MoveTo", Err: err}
}
return
}
|
go
|
func (d *domainClient) MoveTo(ctx context.Context, args *MoveToArgs) (reply *MoveToReply, err error) {
reply = new(MoveToReply)
if args != nil {
err = rpcc.Invoke(ctx, "DOM.moveTo", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "DOM.moveTo", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "DOM", Op: "MoveTo", Err: err}
}
return
}
|
[
"func",
"(",
"d",
"*",
"domainClient",
")",
"MoveTo",
"(",
"ctx",
"context",
".",
"Context",
",",
"args",
"*",
"MoveToArgs",
")",
"(",
"reply",
"*",
"MoveToReply",
",",
"err",
"error",
")",
"{",
"reply",
"=",
"new",
"(",
"MoveToReply",
")",
"\n",
"if",
"args",
"!=",
"nil",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"args",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"else",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"nil",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"err",
"=",
"&",
"internal",
".",
"OpError",
"{",
"Domain",
":",
"\"",
"\"",
",",
"Op",
":",
"\"",
"\"",
",",
"Err",
":",
"err",
"}",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] |
// MoveTo invokes the DOM method. Moves node into the new container, places it
// before the given anchor.
|
[
"MoveTo",
"invokes",
"the",
"DOM",
"method",
".",
"Moves",
"node",
"into",
"the",
"new",
"container",
"places",
"it",
"before",
"the",
"given",
"anchor",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/dom/domain.go#L279-L290
|
18,860
|
mafredri/cdp
|
protocol/dom/domain.go
|
PerformSearch
|
func (d *domainClient) PerformSearch(ctx context.Context, args *PerformSearchArgs) (reply *PerformSearchReply, err error) {
reply = new(PerformSearchReply)
if args != nil {
err = rpcc.Invoke(ctx, "DOM.performSearch", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "DOM.performSearch", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "DOM", Op: "PerformSearch", Err: err}
}
return
}
|
go
|
func (d *domainClient) PerformSearch(ctx context.Context, args *PerformSearchArgs) (reply *PerformSearchReply, err error) {
reply = new(PerformSearchReply)
if args != nil {
err = rpcc.Invoke(ctx, "DOM.performSearch", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "DOM.performSearch", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "DOM", Op: "PerformSearch", Err: err}
}
return
}
|
[
"func",
"(",
"d",
"*",
"domainClient",
")",
"PerformSearch",
"(",
"ctx",
"context",
".",
"Context",
",",
"args",
"*",
"PerformSearchArgs",
")",
"(",
"reply",
"*",
"PerformSearchReply",
",",
"err",
"error",
")",
"{",
"reply",
"=",
"new",
"(",
"PerformSearchReply",
")",
"\n",
"if",
"args",
"!=",
"nil",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"args",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"else",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"nil",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"err",
"=",
"&",
"internal",
".",
"OpError",
"{",
"Domain",
":",
"\"",
"\"",
",",
"Op",
":",
"\"",
"\"",
",",
"Err",
":",
"err",
"}",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] |
// PerformSearch invokes the DOM method. Searches for a given string in the
// DOM tree. Use `getSearchResults` to access search results or `cancelSearch`
// to end this search session.
|
[
"PerformSearch",
"invokes",
"the",
"DOM",
"method",
".",
"Searches",
"for",
"a",
"given",
"string",
"in",
"the",
"DOM",
"tree",
".",
"Use",
"getSearchResults",
"to",
"access",
"search",
"results",
"or",
"cancelSearch",
"to",
"end",
"this",
"search",
"session",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/dom/domain.go#L295-L306
|
18,861
|
mafredri/cdp
|
protocol/dom/domain.go
|
PushNodesByBackendIDsToFrontend
|
func (d *domainClient) PushNodesByBackendIDsToFrontend(ctx context.Context, args *PushNodesByBackendIDsToFrontendArgs) (reply *PushNodesByBackendIDsToFrontendReply, err error) {
reply = new(PushNodesByBackendIDsToFrontendReply)
if args != nil {
err = rpcc.Invoke(ctx, "DOM.pushNodesByBackendIdsToFrontend", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "DOM.pushNodesByBackendIdsToFrontend", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "DOM", Op: "PushNodesByBackendIDsToFrontend", Err: err}
}
return
}
|
go
|
func (d *domainClient) PushNodesByBackendIDsToFrontend(ctx context.Context, args *PushNodesByBackendIDsToFrontendArgs) (reply *PushNodesByBackendIDsToFrontendReply, err error) {
reply = new(PushNodesByBackendIDsToFrontendReply)
if args != nil {
err = rpcc.Invoke(ctx, "DOM.pushNodesByBackendIdsToFrontend", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "DOM.pushNodesByBackendIdsToFrontend", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "DOM", Op: "PushNodesByBackendIDsToFrontend", Err: err}
}
return
}
|
[
"func",
"(",
"d",
"*",
"domainClient",
")",
"PushNodesByBackendIDsToFrontend",
"(",
"ctx",
"context",
".",
"Context",
",",
"args",
"*",
"PushNodesByBackendIDsToFrontendArgs",
")",
"(",
"reply",
"*",
"PushNodesByBackendIDsToFrontendReply",
",",
"err",
"error",
")",
"{",
"reply",
"=",
"new",
"(",
"PushNodesByBackendIDsToFrontendReply",
")",
"\n",
"if",
"args",
"!=",
"nil",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"args",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"else",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"nil",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"err",
"=",
"&",
"internal",
".",
"OpError",
"{",
"Domain",
":",
"\"",
"\"",
",",
"Op",
":",
"\"",
"\"",
",",
"Err",
":",
"err",
"}",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] |
// PushNodesByBackendIDsToFrontend invokes the DOM method. Requests that a
// batch of nodes is sent to the caller given their backend node ids.
|
[
"PushNodesByBackendIDsToFrontend",
"invokes",
"the",
"DOM",
"method",
".",
"Requests",
"that",
"a",
"batch",
"of",
"nodes",
"is",
"sent",
"to",
"the",
"caller",
"given",
"their",
"backend",
"node",
"ids",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/dom/domain.go#L325-L336
|
18,862
|
mafredri/cdp
|
protocol/dom/domain.go
|
QuerySelector
|
func (d *domainClient) QuerySelector(ctx context.Context, args *QuerySelectorArgs) (reply *QuerySelectorReply, err error) {
reply = new(QuerySelectorReply)
if args != nil {
err = rpcc.Invoke(ctx, "DOM.querySelector", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "DOM.querySelector", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "DOM", Op: "QuerySelector", Err: err}
}
return
}
|
go
|
func (d *domainClient) QuerySelector(ctx context.Context, args *QuerySelectorArgs) (reply *QuerySelectorReply, err error) {
reply = new(QuerySelectorReply)
if args != nil {
err = rpcc.Invoke(ctx, "DOM.querySelector", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "DOM.querySelector", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "DOM", Op: "QuerySelector", Err: err}
}
return
}
|
[
"func",
"(",
"d",
"*",
"domainClient",
")",
"QuerySelector",
"(",
"ctx",
"context",
".",
"Context",
",",
"args",
"*",
"QuerySelectorArgs",
")",
"(",
"reply",
"*",
"QuerySelectorReply",
",",
"err",
"error",
")",
"{",
"reply",
"=",
"new",
"(",
"QuerySelectorReply",
")",
"\n",
"if",
"args",
"!=",
"nil",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"args",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"else",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"nil",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"err",
"=",
"&",
"internal",
".",
"OpError",
"{",
"Domain",
":",
"\"",
"\"",
",",
"Op",
":",
"\"",
"\"",
",",
"Err",
":",
"err",
"}",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] |
// QuerySelector invokes the DOM method. Executes `querySelector` on a given
// node.
|
[
"QuerySelector",
"invokes",
"the",
"DOM",
"method",
".",
"Executes",
"querySelector",
"on",
"a",
"given",
"node",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/dom/domain.go#L340-L351
|
18,863
|
mafredri/cdp
|
protocol/dom/domain.go
|
QuerySelectorAll
|
func (d *domainClient) QuerySelectorAll(ctx context.Context, args *QuerySelectorAllArgs) (reply *QuerySelectorAllReply, err error) {
reply = new(QuerySelectorAllReply)
if args != nil {
err = rpcc.Invoke(ctx, "DOM.querySelectorAll", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "DOM.querySelectorAll", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "DOM", Op: "QuerySelectorAll", Err: err}
}
return
}
|
go
|
func (d *domainClient) QuerySelectorAll(ctx context.Context, args *QuerySelectorAllArgs) (reply *QuerySelectorAllReply, err error) {
reply = new(QuerySelectorAllReply)
if args != nil {
err = rpcc.Invoke(ctx, "DOM.querySelectorAll", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "DOM.querySelectorAll", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "DOM", Op: "QuerySelectorAll", Err: err}
}
return
}
|
[
"func",
"(",
"d",
"*",
"domainClient",
")",
"QuerySelectorAll",
"(",
"ctx",
"context",
".",
"Context",
",",
"args",
"*",
"QuerySelectorAllArgs",
")",
"(",
"reply",
"*",
"QuerySelectorAllReply",
",",
"err",
"error",
")",
"{",
"reply",
"=",
"new",
"(",
"QuerySelectorAllReply",
")",
"\n",
"if",
"args",
"!=",
"nil",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"args",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"else",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"nil",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"err",
"=",
"&",
"internal",
".",
"OpError",
"{",
"Domain",
":",
"\"",
"\"",
",",
"Op",
":",
"\"",
"\"",
",",
"Err",
":",
"err",
"}",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] |
// QuerySelectorAll invokes the DOM method. Executes `querySelectorAll` on a
// given node.
|
[
"QuerySelectorAll",
"invokes",
"the",
"DOM",
"method",
".",
"Executes",
"querySelectorAll",
"on",
"a",
"given",
"node",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/dom/domain.go#L355-L366
|
18,864
|
mafredri/cdp
|
protocol/dom/domain.go
|
RequestNode
|
func (d *domainClient) RequestNode(ctx context.Context, args *RequestNodeArgs) (reply *RequestNodeReply, err error) {
reply = new(RequestNodeReply)
if args != nil {
err = rpcc.Invoke(ctx, "DOM.requestNode", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "DOM.requestNode", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "DOM", Op: "RequestNode", Err: err}
}
return
}
|
go
|
func (d *domainClient) RequestNode(ctx context.Context, args *RequestNodeArgs) (reply *RequestNodeReply, err error) {
reply = new(RequestNodeReply)
if args != nil {
err = rpcc.Invoke(ctx, "DOM.requestNode", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "DOM.requestNode", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "DOM", Op: "RequestNode", Err: err}
}
return
}
|
[
"func",
"(",
"d",
"*",
"domainClient",
")",
"RequestNode",
"(",
"ctx",
"context",
".",
"Context",
",",
"args",
"*",
"RequestNodeArgs",
")",
"(",
"reply",
"*",
"RequestNodeReply",
",",
"err",
"error",
")",
"{",
"reply",
"=",
"new",
"(",
"RequestNodeReply",
")",
"\n",
"if",
"args",
"!=",
"nil",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"args",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"else",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"nil",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"err",
"=",
"&",
"internal",
".",
"OpError",
"{",
"Domain",
":",
"\"",
"\"",
",",
"Op",
":",
"\"",
"\"",
",",
"Err",
":",
"err",
"}",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] |
// RequestNode invokes the DOM method. Requests that the node is sent to the
// caller given the JavaScript node object reference. All nodes that form the
// path from the node to the root are also sent to the client as a series of
// `setChildNodes` notifications.
|
[
"RequestNode",
"invokes",
"the",
"DOM",
"method",
".",
"Requests",
"that",
"the",
"node",
"is",
"sent",
"to",
"the",
"caller",
"given",
"the",
"JavaScript",
"node",
"object",
"reference",
".",
"All",
"nodes",
"that",
"form",
"the",
"path",
"from",
"the",
"node",
"to",
"the",
"root",
"are",
"also",
"sent",
"to",
"the",
"client",
"as",
"a",
"series",
"of",
"setChildNodes",
"notifications",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/dom/domain.go#L424-L435
|
18,865
|
mafredri/cdp
|
protocol/dom/domain.go
|
ResolveNode
|
func (d *domainClient) ResolveNode(ctx context.Context, args *ResolveNodeArgs) (reply *ResolveNodeReply, err error) {
reply = new(ResolveNodeReply)
if args != nil {
err = rpcc.Invoke(ctx, "DOM.resolveNode", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "DOM.resolveNode", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "DOM", Op: "ResolveNode", Err: err}
}
return
}
|
go
|
func (d *domainClient) ResolveNode(ctx context.Context, args *ResolveNodeArgs) (reply *ResolveNodeReply, err error) {
reply = new(ResolveNodeReply)
if args != nil {
err = rpcc.Invoke(ctx, "DOM.resolveNode", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "DOM.resolveNode", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "DOM", Op: "ResolveNode", Err: err}
}
return
}
|
[
"func",
"(",
"d",
"*",
"domainClient",
")",
"ResolveNode",
"(",
"ctx",
"context",
".",
"Context",
",",
"args",
"*",
"ResolveNodeArgs",
")",
"(",
"reply",
"*",
"ResolveNodeReply",
",",
"err",
"error",
")",
"{",
"reply",
"=",
"new",
"(",
"ResolveNodeReply",
")",
"\n",
"if",
"args",
"!=",
"nil",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"args",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"else",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"nil",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"err",
"=",
"&",
"internal",
".",
"OpError",
"{",
"Domain",
":",
"\"",
"\"",
",",
"Op",
":",
"\"",
"\"",
",",
"Err",
":",
"err",
"}",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] |
// ResolveNode invokes the DOM method. Resolves the JavaScript node object for
// a given NodeId or BackendNodeId.
|
[
"ResolveNode",
"invokes",
"the",
"DOM",
"method",
".",
"Resolves",
"the",
"JavaScript",
"node",
"object",
"for",
"a",
"given",
"NodeId",
"or",
"BackendNodeId",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/dom/domain.go#L439-L450
|
18,866
|
mafredri/cdp
|
protocol/dom/domain.go
|
GetFileInfo
|
func (d *domainClient) GetFileInfo(ctx context.Context, args *GetFileInfoArgs) (reply *GetFileInfoReply, err error) {
reply = new(GetFileInfoReply)
if args != nil {
err = rpcc.Invoke(ctx, "DOM.getFileInfo", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "DOM.getFileInfo", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "DOM", Op: "GetFileInfo", Err: err}
}
return
}
|
go
|
func (d *domainClient) GetFileInfo(ctx context.Context, args *GetFileInfoArgs) (reply *GetFileInfoReply, err error) {
reply = new(GetFileInfoReply)
if args != nil {
err = rpcc.Invoke(ctx, "DOM.getFileInfo", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "DOM.getFileInfo", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "DOM", Op: "GetFileInfo", Err: err}
}
return
}
|
[
"func",
"(",
"d",
"*",
"domainClient",
")",
"GetFileInfo",
"(",
"ctx",
"context",
".",
"Context",
",",
"args",
"*",
"GetFileInfoArgs",
")",
"(",
"reply",
"*",
"GetFileInfoReply",
",",
"err",
"error",
")",
"{",
"reply",
"=",
"new",
"(",
"GetFileInfoReply",
")",
"\n",
"if",
"args",
"!=",
"nil",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"args",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"else",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"nil",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"err",
"=",
"&",
"internal",
".",
"OpError",
"{",
"Domain",
":",
"\"",
"\"",
",",
"Op",
":",
"\"",
"\"",
",",
"Err",
":",
"err",
"}",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] |
// GetFileInfo invokes the DOM method. Returns file information for the given
// File wrapper.
|
[
"GetFileInfo",
"invokes",
"the",
"DOM",
"method",
".",
"Returns",
"file",
"information",
"for",
"the",
"given",
"File",
"wrapper",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/dom/domain.go#L497-L508
|
18,867
|
mafredri/cdp
|
protocol/dom/domain.go
|
SetNodeName
|
func (d *domainClient) SetNodeName(ctx context.Context, args *SetNodeNameArgs) (reply *SetNodeNameReply, err error) {
reply = new(SetNodeNameReply)
if args != nil {
err = rpcc.Invoke(ctx, "DOM.setNodeName", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "DOM.setNodeName", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "DOM", Op: "SetNodeName", Err: err}
}
return
}
|
go
|
func (d *domainClient) SetNodeName(ctx context.Context, args *SetNodeNameArgs) (reply *SetNodeNameReply, err error) {
reply = new(SetNodeNameReply)
if args != nil {
err = rpcc.Invoke(ctx, "DOM.setNodeName", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "DOM.setNodeName", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "DOM", Op: "SetNodeName", Err: err}
}
return
}
|
[
"func",
"(",
"d",
"*",
"domainClient",
")",
"SetNodeName",
"(",
"ctx",
"context",
".",
"Context",
",",
"args",
"*",
"SetNodeNameArgs",
")",
"(",
"reply",
"*",
"SetNodeNameReply",
",",
"err",
"error",
")",
"{",
"reply",
"=",
"new",
"(",
"SetNodeNameReply",
")",
"\n",
"if",
"args",
"!=",
"nil",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"args",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"else",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"nil",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"err",
"=",
"&",
"internal",
".",
"OpError",
"{",
"Domain",
":",
"\"",
"\"",
",",
"Op",
":",
"\"",
"\"",
",",
"Err",
":",
"err",
"}",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] |
// SetNodeName invokes the DOM method. Sets node name for a node with given
// id.
|
[
"SetNodeName",
"invokes",
"the",
"DOM",
"method",
".",
"Sets",
"node",
"name",
"for",
"a",
"node",
"with",
"given",
"id",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/dom/domain.go#L527-L538
|
18,868
|
mafredri/cdp
|
protocol/dom/domain.go
|
GetFrameOwner
|
func (d *domainClient) GetFrameOwner(ctx context.Context, args *GetFrameOwnerArgs) (reply *GetFrameOwnerReply, err error) {
reply = new(GetFrameOwnerReply)
if args != nil {
err = rpcc.Invoke(ctx, "DOM.getFrameOwner", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "DOM.getFrameOwner", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "DOM", Op: "GetFrameOwner", Err: err}
}
return
}
|
go
|
func (d *domainClient) GetFrameOwner(ctx context.Context, args *GetFrameOwnerArgs) (reply *GetFrameOwnerReply, err error) {
reply = new(GetFrameOwnerReply)
if args != nil {
err = rpcc.Invoke(ctx, "DOM.getFrameOwner", args, reply, d.conn)
} else {
err = rpcc.Invoke(ctx, "DOM.getFrameOwner", nil, reply, d.conn)
}
if err != nil {
err = &internal.OpError{Domain: "DOM", Op: "GetFrameOwner", Err: err}
}
return
}
|
[
"func",
"(",
"d",
"*",
"domainClient",
")",
"GetFrameOwner",
"(",
"ctx",
"context",
".",
"Context",
",",
"args",
"*",
"GetFrameOwnerArgs",
")",
"(",
"reply",
"*",
"GetFrameOwnerReply",
",",
"err",
"error",
")",
"{",
"reply",
"=",
"new",
"(",
"GetFrameOwnerReply",
")",
"\n",
"if",
"args",
"!=",
"nil",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"args",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"else",
"{",
"err",
"=",
"rpcc",
".",
"Invoke",
"(",
"ctx",
",",
"\"",
"\"",
",",
"nil",
",",
"reply",
",",
"d",
".",
"conn",
")",
"\n",
"}",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"err",
"=",
"&",
"internal",
".",
"OpError",
"{",
"Domain",
":",
"\"",
"\"",
",",
"Op",
":",
"\"",
"\"",
",",
"Err",
":",
"err",
"}",
"\n",
"}",
"\n",
"return",
"\n",
"}"
] |
// GetFrameOwner invokes the DOM method. Returns iframe node that owns iframe
// with the given domain.
|
[
"GetFrameOwner",
"invokes",
"the",
"DOM",
"method",
".",
"Returns",
"iframe",
"node",
"that",
"owns",
"iframe",
"with",
"the",
"given",
"domain",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/dom/domain.go#L579-L590
|
18,869
|
mafredri/cdp
|
rpcc/socket.go
|
Read
|
func (cw *wsReadWriteCloser) Read(p []byte) (n int, err error) {
if cw.r != nil {
// Check if previous reader still has data in the buffer.
// Otherwise pass on to next reader.
n, err = cw.r.Read(p)
if err != io.EOF {
return n, err
}
}
_, r, err := cw.wsConn.NextReader()
if err != nil {
return 0, err
}
cw.r = r // Store reader for next call to Read.
n, err = r.Read(p)
return n, err
}
|
go
|
func (cw *wsReadWriteCloser) Read(p []byte) (n int, err error) {
if cw.r != nil {
// Check if previous reader still has data in the buffer.
// Otherwise pass on to next reader.
n, err = cw.r.Read(p)
if err != io.EOF {
return n, err
}
}
_, r, err := cw.wsConn.NextReader()
if err != nil {
return 0, err
}
cw.r = r // Store reader for next call to Read.
n, err = r.Read(p)
return n, err
}
|
[
"func",
"(",
"cw",
"*",
"wsReadWriteCloser",
")",
"Read",
"(",
"p",
"[",
"]",
"byte",
")",
"(",
"n",
"int",
",",
"err",
"error",
")",
"{",
"if",
"cw",
".",
"r",
"!=",
"nil",
"{",
"// Check if previous reader still has data in the buffer.",
"// Otherwise pass on to next reader.",
"n",
",",
"err",
"=",
"cw",
".",
"r",
".",
"Read",
"(",
"p",
")",
"\n",
"if",
"err",
"!=",
"io",
".",
"EOF",
"{",
"return",
"n",
",",
"err",
"\n",
"}",
"\n",
"}",
"\n",
"_",
",",
"r",
",",
"err",
":=",
"cw",
".",
"wsConn",
".",
"NextReader",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"0",
",",
"err",
"\n",
"}",
"\n",
"cw",
".",
"r",
"=",
"r",
"// Store reader for next call to Read.",
"\n\n",
"n",
",",
"err",
"=",
"r",
".",
"Read",
"(",
"p",
")",
"\n",
"return",
"n",
",",
"err",
"\n",
"}"
] |
// Read calls Read on the WebSocket Reader and requests the NextReader
// when io.EOF is encountered. Imlpements io.Reader.
|
[
"Read",
"calls",
"Read",
"on",
"the",
"WebSocket",
"Reader",
"and",
"requests",
"the",
"NextReader",
"when",
"io",
".",
"EOF",
"is",
"encountered",
".",
"Imlpements",
"io",
".",
"Reader",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/rpcc/socket.go#L28-L45
|
18,870
|
mafredri/cdp
|
rpcc/socket.go
|
Write
|
func (cw *wsReadWriteCloser) Write(p []byte) (n int, err error) {
w, err := cw.wsConn.NextWriter(websocket.TextMessage)
if err != nil {
return 0, err
}
if n, err = w.Write(p); err != nil {
return n, err
}
err = w.Close()
return n, err
}
|
go
|
func (cw *wsReadWriteCloser) Write(p []byte) (n int, err error) {
w, err := cw.wsConn.NextWriter(websocket.TextMessage)
if err != nil {
return 0, err
}
if n, err = w.Write(p); err != nil {
return n, err
}
err = w.Close()
return n, err
}
|
[
"func",
"(",
"cw",
"*",
"wsReadWriteCloser",
")",
"Write",
"(",
"p",
"[",
"]",
"byte",
")",
"(",
"n",
"int",
",",
"err",
"error",
")",
"{",
"w",
",",
"err",
":=",
"cw",
".",
"wsConn",
".",
"NextWriter",
"(",
"websocket",
".",
"TextMessage",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"0",
",",
"err",
"\n",
"}",
"\n",
"if",
"n",
",",
"err",
"=",
"w",
".",
"Write",
"(",
"p",
")",
";",
"err",
"!=",
"nil",
"{",
"return",
"n",
",",
"err",
"\n",
"}",
"\n",
"err",
"=",
"w",
".",
"Close",
"(",
")",
"\n",
"return",
"n",
",",
"err",
"\n",
"}"
] |
// Write requests the NextWriter for the WebSocket and writes the
// message. Implements io.Writer.
|
[
"Write",
"requests",
"the",
"NextWriter",
"for",
"the",
"WebSocket",
"and",
"writes",
"the",
"message",
".",
"Implements",
"io",
".",
"Writer",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/rpcc/socket.go#L49-L59
|
18,871
|
mafredri/cdp
|
internal/errors/errors.go
|
Errorf
|
func Errorf(format string, a ...interface{}) error {
return New(fmt.Sprintf(format, a...))
}
|
go
|
func Errorf(format string, a ...interface{}) error {
return New(fmt.Sprintf(format, a...))
}
|
[
"func",
"Errorf",
"(",
"format",
"string",
",",
"a",
"...",
"interface",
"{",
"}",
")",
"error",
"{",
"return",
"New",
"(",
"fmt",
".",
"Sprintf",
"(",
"format",
",",
"a",
"...",
")",
")",
"\n",
"}"
] |
// Errorf wraps New and fmt.Sprintf.
|
[
"Errorf",
"wraps",
"New",
"and",
"fmt",
".",
"Sprintf",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/internal/errors/errors.go#L32-L34
|
18,872
|
mafredri/cdp
|
internal/errors/errors.go
|
Wrapf
|
func Wrapf(err error, format string, a ...interface{}) error {
if err == nil {
return nil
}
return &wrapped{
err: err,
msg: fmt.Sprintf(format, a...),
}
}
|
go
|
func Wrapf(err error, format string, a ...interface{}) error {
if err == nil {
return nil
}
return &wrapped{
err: err,
msg: fmt.Sprintf(format, a...),
}
}
|
[
"func",
"Wrapf",
"(",
"err",
"error",
",",
"format",
"string",
",",
"a",
"...",
"interface",
"{",
"}",
")",
"error",
"{",
"if",
"err",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"return",
"&",
"wrapped",
"{",
"err",
":",
"err",
",",
"msg",
":",
"fmt",
".",
"Sprintf",
"(",
"format",
",",
"a",
"...",
")",
",",
"}",
"\n",
"}"
] |
// Wrapf wraps an error with a message. Wrapf returns nil if error is nil.
|
[
"Wrapf",
"wraps",
"an",
"error",
"with",
"a",
"message",
".",
"Wrapf",
"returns",
"nil",
"if",
"error",
"is",
"nil",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/internal/errors/errors.go#L37-L45
|
18,873
|
mafredri/cdp
|
internal/errors/errors.go
|
Merge
|
func Merge(err ...error) error {
var errs []error
for _, e := range err {
if e != nil {
errs = append(errs, e)
}
}
if len(errs) == 0 {
return nil
}
return &merged{s: err}
}
|
go
|
func Merge(err ...error) error {
var errs []error
for _, e := range err {
if e != nil {
errs = append(errs, e)
}
}
if len(errs) == 0 {
return nil
}
return &merged{s: err}
}
|
[
"func",
"Merge",
"(",
"err",
"...",
"error",
")",
"error",
"{",
"var",
"errs",
"[",
"]",
"error",
"\n",
"for",
"_",
",",
"e",
":=",
"range",
"err",
"{",
"if",
"e",
"!=",
"nil",
"{",
"errs",
"=",
"append",
"(",
"errs",
",",
"e",
")",
"\n",
"}",
"\n",
"}",
"\n",
"if",
"len",
"(",
"errs",
")",
"==",
"0",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"return",
"&",
"merged",
"{",
"s",
":",
"err",
"}",
"\n",
"}"
] |
// Merge merges multiple errors into one.
// Merge returns nil if all errors are nil.
|
[
"Merge",
"merges",
"multiple",
"errors",
"into",
"one",
".",
"Merge",
"returns",
"nil",
"if",
"all",
"errors",
"are",
"nil",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/internal/errors/errors.go#L65-L76
|
18,874
|
mafredri/cdp
|
protocol/dom/command.go
|
NewCollectClassNamesFromSubtreeArgs
|
func NewCollectClassNamesFromSubtreeArgs(nodeID NodeID) *CollectClassNamesFromSubtreeArgs {
args := new(CollectClassNamesFromSubtreeArgs)
args.NodeID = nodeID
return args
}
|
go
|
func NewCollectClassNamesFromSubtreeArgs(nodeID NodeID) *CollectClassNamesFromSubtreeArgs {
args := new(CollectClassNamesFromSubtreeArgs)
args.NodeID = nodeID
return args
}
|
[
"func",
"NewCollectClassNamesFromSubtreeArgs",
"(",
"nodeID",
"NodeID",
")",
"*",
"CollectClassNamesFromSubtreeArgs",
"{",
"args",
":=",
"new",
"(",
"CollectClassNamesFromSubtreeArgs",
")",
"\n",
"args",
".",
"NodeID",
"=",
"nodeID",
"\n",
"return",
"args",
"\n",
"}"
] |
// NewCollectClassNamesFromSubtreeArgs initializes CollectClassNamesFromSubtreeArgs with the required arguments.
|
[
"NewCollectClassNamesFromSubtreeArgs",
"initializes",
"CollectClassNamesFromSubtreeArgs",
"with",
"the",
"required",
"arguments",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/dom/command.go#L16-L20
|
18,875
|
mafredri/cdp
|
protocol/dom/command.go
|
NewCopyToArgs
|
func NewCopyToArgs(nodeID NodeID, targetNodeID NodeID) *CopyToArgs {
args := new(CopyToArgs)
args.NodeID = nodeID
args.TargetNodeID = targetNodeID
return args
}
|
go
|
func NewCopyToArgs(nodeID NodeID, targetNodeID NodeID) *CopyToArgs {
args := new(CopyToArgs)
args.NodeID = nodeID
args.TargetNodeID = targetNodeID
return args
}
|
[
"func",
"NewCopyToArgs",
"(",
"nodeID",
"NodeID",
",",
"targetNodeID",
"NodeID",
")",
"*",
"CopyToArgs",
"{",
"args",
":=",
"new",
"(",
"CopyToArgs",
")",
"\n",
"args",
".",
"NodeID",
"=",
"nodeID",
"\n",
"args",
".",
"TargetNodeID",
"=",
"targetNodeID",
"\n",
"return",
"args",
"\n",
"}"
] |
// NewCopyToArgs initializes CopyToArgs with the required arguments.
|
[
"NewCopyToArgs",
"initializes",
"CopyToArgs",
"with",
"the",
"required",
"arguments",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/dom/command.go#L35-L40
|
18,876
|
mafredri/cdp
|
protocol/dom/command.go
|
NewDiscardSearchResultsArgs
|
func NewDiscardSearchResultsArgs(searchID string) *DiscardSearchResultsArgs {
args := new(DiscardSearchResultsArgs)
args.SearchID = searchID
return args
}
|
go
|
func NewDiscardSearchResultsArgs(searchID string) *DiscardSearchResultsArgs {
args := new(DiscardSearchResultsArgs)
args.SearchID = searchID
return args
}
|
[
"func",
"NewDiscardSearchResultsArgs",
"(",
"searchID",
"string",
")",
"*",
"DiscardSearchResultsArgs",
"{",
"args",
":=",
"new",
"(",
"DiscardSearchResultsArgs",
")",
"\n",
"args",
".",
"SearchID",
"=",
"searchID",
"\n",
"return",
"args",
"\n",
"}"
] |
// NewDiscardSearchResultsArgs initializes DiscardSearchResultsArgs with the required arguments.
|
[
"NewDiscardSearchResultsArgs",
"initializes",
"DiscardSearchResultsArgs",
"with",
"the",
"required",
"arguments",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/dom/command.go#L119-L123
|
18,877
|
mafredri/cdp
|
protocol/dom/command.go
|
NewGetAttributesArgs
|
func NewGetAttributesArgs(nodeID NodeID) *GetAttributesArgs {
args := new(GetAttributesArgs)
args.NodeID = nodeID
return args
}
|
go
|
func NewGetAttributesArgs(nodeID NodeID) *GetAttributesArgs {
args := new(GetAttributesArgs)
args.NodeID = nodeID
return args
}
|
[
"func",
"NewGetAttributesArgs",
"(",
"nodeID",
"NodeID",
")",
"*",
"GetAttributesArgs",
"{",
"args",
":=",
"new",
"(",
"GetAttributesArgs",
")",
"\n",
"args",
".",
"NodeID",
"=",
"nodeID",
"\n",
"return",
"args",
"\n",
"}"
] |
// NewGetAttributesArgs initializes GetAttributesArgs with the required arguments.
|
[
"NewGetAttributesArgs",
"initializes",
"GetAttributesArgs",
"with",
"the",
"required",
"arguments",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/dom/command.go#L166-L170
|
18,878
|
mafredri/cdp
|
protocol/dom/command.go
|
NewGetNodeForLocationArgs
|
func NewGetNodeForLocationArgs(x int, y int) *GetNodeForLocationArgs {
args := new(GetNodeForLocationArgs)
args.X = x
args.Y = y
return args
}
|
go
|
func NewGetNodeForLocationArgs(x int, y int) *GetNodeForLocationArgs {
args := new(GetNodeForLocationArgs)
args.X = x
args.Y = y
return args
}
|
[
"func",
"NewGetNodeForLocationArgs",
"(",
"x",
"int",
",",
"y",
"int",
")",
"*",
"GetNodeForLocationArgs",
"{",
"args",
":=",
"new",
"(",
"GetNodeForLocationArgs",
")",
"\n",
"args",
".",
"X",
"=",
"x",
"\n",
"args",
".",
"Y",
"=",
"y",
"\n",
"return",
"args",
"\n",
"}"
] |
// NewGetNodeForLocationArgs initializes GetNodeForLocationArgs with the required arguments.
|
[
"NewGetNodeForLocationArgs",
"initializes",
"GetNodeForLocationArgs",
"with",
"the",
"required",
"arguments",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/dom/command.go#L333-L338
|
18,879
|
mafredri/cdp
|
protocol/dom/command.go
|
NewGetRelayoutBoundaryArgs
|
func NewGetRelayoutBoundaryArgs(nodeID NodeID) *GetRelayoutBoundaryArgs {
args := new(GetRelayoutBoundaryArgs)
args.NodeID = nodeID
return args
}
|
go
|
func NewGetRelayoutBoundaryArgs(nodeID NodeID) *GetRelayoutBoundaryArgs {
args := new(GetRelayoutBoundaryArgs)
args.NodeID = nodeID
return args
}
|
[
"func",
"NewGetRelayoutBoundaryArgs",
"(",
"nodeID",
"NodeID",
")",
"*",
"GetRelayoutBoundaryArgs",
"{",
"args",
":=",
"new",
"(",
"GetRelayoutBoundaryArgs",
")",
"\n",
"args",
".",
"NodeID",
"=",
"nodeID",
"\n",
"return",
"args",
"\n",
"}"
] |
// NewGetRelayoutBoundaryArgs initializes GetRelayoutBoundaryArgs with the required arguments.
|
[
"NewGetRelayoutBoundaryArgs",
"initializes",
"GetRelayoutBoundaryArgs",
"with",
"the",
"required",
"arguments",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/dom/command.go#L400-L404
|
18,880
|
mafredri/cdp
|
protocol/dom/command.go
|
NewGetSearchResultsArgs
|
func NewGetSearchResultsArgs(searchID string, fromIndex int, toIndex int) *GetSearchResultsArgs {
args := new(GetSearchResultsArgs)
args.SearchID = searchID
args.FromIndex = fromIndex
args.ToIndex = toIndex
return args
}
|
go
|
func NewGetSearchResultsArgs(searchID string, fromIndex int, toIndex int) *GetSearchResultsArgs {
args := new(GetSearchResultsArgs)
args.SearchID = searchID
args.FromIndex = fromIndex
args.ToIndex = toIndex
return args
}
|
[
"func",
"NewGetSearchResultsArgs",
"(",
"searchID",
"string",
",",
"fromIndex",
"int",
",",
"toIndex",
"int",
")",
"*",
"GetSearchResultsArgs",
"{",
"args",
":=",
"new",
"(",
"GetSearchResultsArgs",
")",
"\n",
"args",
".",
"SearchID",
"=",
"searchID",
"\n",
"args",
".",
"FromIndex",
"=",
"fromIndex",
"\n",
"args",
".",
"ToIndex",
"=",
"toIndex",
"\n",
"return",
"args",
"\n",
"}"
] |
// NewGetSearchResultsArgs initializes GetSearchResultsArgs with the required arguments.
|
[
"NewGetSearchResultsArgs",
"initializes",
"GetSearchResultsArgs",
"with",
"the",
"required",
"arguments",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/dom/command.go#L419-L425
|
18,881
|
mafredri/cdp
|
protocol/dom/command.go
|
NewMoveToArgs
|
func NewMoveToArgs(nodeID NodeID, targetNodeID NodeID) *MoveToArgs {
args := new(MoveToArgs)
args.NodeID = nodeID
args.TargetNodeID = targetNodeID
return args
}
|
go
|
func NewMoveToArgs(nodeID NodeID, targetNodeID NodeID) *MoveToArgs {
args := new(MoveToArgs)
args.NodeID = nodeID
args.TargetNodeID = targetNodeID
return args
}
|
[
"func",
"NewMoveToArgs",
"(",
"nodeID",
"NodeID",
",",
"targetNodeID",
"NodeID",
")",
"*",
"MoveToArgs",
"{",
"args",
":=",
"new",
"(",
"MoveToArgs",
")",
"\n",
"args",
".",
"NodeID",
"=",
"nodeID",
"\n",
"args",
".",
"TargetNodeID",
"=",
"targetNodeID",
"\n",
"return",
"args",
"\n",
"}"
] |
// NewMoveToArgs initializes MoveToArgs with the required arguments.
|
[
"NewMoveToArgs",
"initializes",
"MoveToArgs",
"with",
"the",
"required",
"arguments",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/dom/command.go#L440-L445
|
18,882
|
mafredri/cdp
|
protocol/dom/command.go
|
NewPerformSearchArgs
|
func NewPerformSearchArgs(query string) *PerformSearchArgs {
args := new(PerformSearchArgs)
args.Query = query
return args
}
|
go
|
func NewPerformSearchArgs(query string) *PerformSearchArgs {
args := new(PerformSearchArgs)
args.Query = query
return args
}
|
[
"func",
"NewPerformSearchArgs",
"(",
"query",
"string",
")",
"*",
"PerformSearchArgs",
"{",
"args",
":=",
"new",
"(",
"PerformSearchArgs",
")",
"\n",
"args",
".",
"Query",
"=",
"query",
"\n",
"return",
"args",
"\n",
"}"
] |
// NewPerformSearchArgs initializes PerformSearchArgs with the required arguments.
|
[
"NewPerformSearchArgs",
"initializes",
"PerformSearchArgs",
"with",
"the",
"required",
"arguments",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/dom/command.go#L467-L471
|
18,883
|
mafredri/cdp
|
protocol/dom/command.go
|
SetIncludeUserAgentShadowDOM
|
func (a *PerformSearchArgs) SetIncludeUserAgentShadowDOM(includeUserAgentShadowDOM bool) *PerformSearchArgs {
a.IncludeUserAgentShadowDOM = &includeUserAgentShadowDOM
return a
}
|
go
|
func (a *PerformSearchArgs) SetIncludeUserAgentShadowDOM(includeUserAgentShadowDOM bool) *PerformSearchArgs {
a.IncludeUserAgentShadowDOM = &includeUserAgentShadowDOM
return a
}
|
[
"func",
"(",
"a",
"*",
"PerformSearchArgs",
")",
"SetIncludeUserAgentShadowDOM",
"(",
"includeUserAgentShadowDOM",
"bool",
")",
"*",
"PerformSearchArgs",
"{",
"a",
".",
"IncludeUserAgentShadowDOM",
"=",
"&",
"includeUserAgentShadowDOM",
"\n",
"return",
"a",
"\n",
"}"
] |
// SetIncludeUserAgentShadowDOM sets the IncludeUserAgentShadowDOM optional argument.
// True to search in user agent shadow DOM.
|
[
"SetIncludeUserAgentShadowDOM",
"sets",
"the",
"IncludeUserAgentShadowDOM",
"optional",
"argument",
".",
"True",
"to",
"search",
"in",
"user",
"agent",
"shadow",
"DOM",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/dom/command.go#L475-L478
|
18,884
|
mafredri/cdp
|
protocol/dom/command.go
|
NewPushNodeByPathToFrontendArgs
|
func NewPushNodeByPathToFrontendArgs(path string) *PushNodeByPathToFrontendArgs {
args := new(PushNodeByPathToFrontendArgs)
args.Path = path
return args
}
|
go
|
func NewPushNodeByPathToFrontendArgs(path string) *PushNodeByPathToFrontendArgs {
args := new(PushNodeByPathToFrontendArgs)
args.Path = path
return args
}
|
[
"func",
"NewPushNodeByPathToFrontendArgs",
"(",
"path",
"string",
")",
"*",
"PushNodeByPathToFrontendArgs",
"{",
"args",
":=",
"new",
"(",
"PushNodeByPathToFrontendArgs",
")",
"\n",
"args",
".",
"Path",
"=",
"path",
"\n",
"return",
"args",
"\n",
"}"
] |
// NewPushNodeByPathToFrontendArgs initializes PushNodeByPathToFrontendArgs with the required arguments.
|
[
"NewPushNodeByPathToFrontendArgs",
"initializes",
"PushNodeByPathToFrontendArgs",
"with",
"the",
"required",
"arguments",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/dom/command.go#L492-L496
|
18,885
|
mafredri/cdp
|
protocol/dom/command.go
|
NewPushNodesByBackendIDsToFrontendArgs
|
func NewPushNodesByBackendIDsToFrontendArgs(backendNodeIDs []BackendNodeID) *PushNodesByBackendIDsToFrontendArgs {
args := new(PushNodesByBackendIDsToFrontendArgs)
args.BackendNodeIDs = backendNodeIDs
return args
}
|
go
|
func NewPushNodesByBackendIDsToFrontendArgs(backendNodeIDs []BackendNodeID) *PushNodesByBackendIDsToFrontendArgs {
args := new(PushNodesByBackendIDsToFrontendArgs)
args.BackendNodeIDs = backendNodeIDs
return args
}
|
[
"func",
"NewPushNodesByBackendIDsToFrontendArgs",
"(",
"backendNodeIDs",
"[",
"]",
"BackendNodeID",
")",
"*",
"PushNodesByBackendIDsToFrontendArgs",
"{",
"args",
":=",
"new",
"(",
"PushNodesByBackendIDsToFrontendArgs",
")",
"\n",
"args",
".",
"BackendNodeIDs",
"=",
"backendNodeIDs",
"\n",
"return",
"args",
"\n",
"}"
] |
// NewPushNodesByBackendIDsToFrontendArgs initializes PushNodesByBackendIDsToFrontendArgs with the required arguments.
|
[
"NewPushNodesByBackendIDsToFrontendArgs",
"initializes",
"PushNodesByBackendIDsToFrontendArgs",
"with",
"the",
"required",
"arguments",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/dom/command.go#L509-L513
|
18,886
|
mafredri/cdp
|
protocol/dom/command.go
|
NewQuerySelectorArgs
|
func NewQuerySelectorArgs(nodeID NodeID, selector string) *QuerySelectorArgs {
args := new(QuerySelectorArgs)
args.NodeID = nodeID
args.Selector = selector
return args
}
|
go
|
func NewQuerySelectorArgs(nodeID NodeID, selector string) *QuerySelectorArgs {
args := new(QuerySelectorArgs)
args.NodeID = nodeID
args.Selector = selector
return args
}
|
[
"func",
"NewQuerySelectorArgs",
"(",
"nodeID",
"NodeID",
",",
"selector",
"string",
")",
"*",
"QuerySelectorArgs",
"{",
"args",
":=",
"new",
"(",
"QuerySelectorArgs",
")",
"\n",
"args",
".",
"NodeID",
"=",
"nodeID",
"\n",
"args",
".",
"Selector",
"=",
"selector",
"\n",
"return",
"args",
"\n",
"}"
] |
// NewQuerySelectorArgs initializes QuerySelectorArgs with the required arguments.
|
[
"NewQuerySelectorArgs",
"initializes",
"QuerySelectorArgs",
"with",
"the",
"required",
"arguments",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/dom/command.go#L527-L532
|
18,887
|
mafredri/cdp
|
protocol/dom/command.go
|
NewQuerySelectorAllArgs
|
func NewQuerySelectorAllArgs(nodeID NodeID, selector string) *QuerySelectorAllArgs {
args := new(QuerySelectorAllArgs)
args.NodeID = nodeID
args.Selector = selector
return args
}
|
go
|
func NewQuerySelectorAllArgs(nodeID NodeID, selector string) *QuerySelectorAllArgs {
args := new(QuerySelectorAllArgs)
args.NodeID = nodeID
args.Selector = selector
return args
}
|
[
"func",
"NewQuerySelectorAllArgs",
"(",
"nodeID",
"NodeID",
",",
"selector",
"string",
")",
"*",
"QuerySelectorAllArgs",
"{",
"args",
":=",
"new",
"(",
"QuerySelectorAllArgs",
")",
"\n",
"args",
".",
"NodeID",
"=",
"nodeID",
"\n",
"args",
".",
"Selector",
"=",
"selector",
"\n",
"return",
"args",
"\n",
"}"
] |
// NewQuerySelectorAllArgs initializes QuerySelectorAllArgs with the required arguments.
|
[
"NewQuerySelectorAllArgs",
"initializes",
"QuerySelectorAllArgs",
"with",
"the",
"required",
"arguments",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/dom/command.go#L546-L551
|
18,888
|
mafredri/cdp
|
protocol/dom/command.go
|
NewRemoveAttributeArgs
|
func NewRemoveAttributeArgs(nodeID NodeID, name string) *RemoveAttributeArgs {
args := new(RemoveAttributeArgs)
args.NodeID = nodeID
args.Name = name
return args
}
|
go
|
func NewRemoveAttributeArgs(nodeID NodeID, name string) *RemoveAttributeArgs {
args := new(RemoveAttributeArgs)
args.NodeID = nodeID
args.Name = name
return args
}
|
[
"func",
"NewRemoveAttributeArgs",
"(",
"nodeID",
"NodeID",
",",
"name",
"string",
")",
"*",
"RemoveAttributeArgs",
"{",
"args",
":=",
"new",
"(",
"RemoveAttributeArgs",
")",
"\n",
"args",
".",
"NodeID",
"=",
"nodeID",
"\n",
"args",
".",
"Name",
"=",
"name",
"\n",
"return",
"args",
"\n",
"}"
] |
// NewRemoveAttributeArgs initializes RemoveAttributeArgs with the required arguments.
|
[
"NewRemoveAttributeArgs",
"initializes",
"RemoveAttributeArgs",
"with",
"the",
"required",
"arguments",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/dom/command.go#L565-L570
|
18,889
|
mafredri/cdp
|
protocol/dom/command.go
|
NewRemoveNodeArgs
|
func NewRemoveNodeArgs(nodeID NodeID) *RemoveNodeArgs {
args := new(RemoveNodeArgs)
args.NodeID = nodeID
return args
}
|
go
|
func NewRemoveNodeArgs(nodeID NodeID) *RemoveNodeArgs {
args := new(RemoveNodeArgs)
args.NodeID = nodeID
return args
}
|
[
"func",
"NewRemoveNodeArgs",
"(",
"nodeID",
"NodeID",
")",
"*",
"RemoveNodeArgs",
"{",
"args",
":=",
"new",
"(",
"RemoveNodeArgs",
")",
"\n",
"args",
".",
"NodeID",
"=",
"nodeID",
"\n",
"return",
"args",
"\n",
"}"
] |
// NewRemoveNodeArgs initializes RemoveNodeArgs with the required arguments.
|
[
"NewRemoveNodeArgs",
"initializes",
"RemoveNodeArgs",
"with",
"the",
"required",
"arguments",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/dom/command.go#L578-L582
|
18,890
|
mafredri/cdp
|
protocol/dom/command.go
|
NewRequestChildNodesArgs
|
func NewRequestChildNodesArgs(nodeID NodeID) *RequestChildNodesArgs {
args := new(RequestChildNodesArgs)
args.NodeID = nodeID
return args
}
|
go
|
func NewRequestChildNodesArgs(nodeID NodeID) *RequestChildNodesArgs {
args := new(RequestChildNodesArgs)
args.NodeID = nodeID
return args
}
|
[
"func",
"NewRequestChildNodesArgs",
"(",
"nodeID",
"NodeID",
")",
"*",
"RequestChildNodesArgs",
"{",
"args",
":=",
"new",
"(",
"RequestChildNodesArgs",
")",
"\n",
"args",
".",
"NodeID",
"=",
"nodeID",
"\n",
"return",
"args",
"\n",
"}"
] |
// NewRequestChildNodesArgs initializes RequestChildNodesArgs with the required arguments.
|
[
"NewRequestChildNodesArgs",
"initializes",
"RequestChildNodesArgs",
"with",
"the",
"required",
"arguments",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/dom/command.go#L592-L596
|
18,891
|
mafredri/cdp
|
protocol/dom/command.go
|
NewRequestNodeArgs
|
func NewRequestNodeArgs(objectID runtime.RemoteObjectID) *RequestNodeArgs {
args := new(RequestNodeArgs)
args.ObjectID = objectID
return args
}
|
go
|
func NewRequestNodeArgs(objectID runtime.RemoteObjectID) *RequestNodeArgs {
args := new(RequestNodeArgs)
args.ObjectID = objectID
return args
}
|
[
"func",
"NewRequestNodeArgs",
"(",
"objectID",
"runtime",
".",
"RemoteObjectID",
")",
"*",
"RequestNodeArgs",
"{",
"args",
":=",
"new",
"(",
"RequestNodeArgs",
")",
"\n",
"args",
".",
"ObjectID",
"=",
"objectID",
"\n",
"return",
"args",
"\n",
"}"
] |
// NewRequestNodeArgs initializes RequestNodeArgs with the required arguments.
|
[
"NewRequestNodeArgs",
"initializes",
"RequestNodeArgs",
"with",
"the",
"required",
"arguments",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/dom/command.go#L620-L624
|
18,892
|
mafredri/cdp
|
protocol/dom/command.go
|
SetNodeID
|
func (a *ResolveNodeArgs) SetNodeID(nodeID NodeID) *ResolveNodeArgs {
a.NodeID = &nodeID
return a
}
|
go
|
func (a *ResolveNodeArgs) SetNodeID(nodeID NodeID) *ResolveNodeArgs {
a.NodeID = &nodeID
return a
}
|
[
"func",
"(",
"a",
"*",
"ResolveNodeArgs",
")",
"SetNodeID",
"(",
"nodeID",
"NodeID",
")",
"*",
"ResolveNodeArgs",
"{",
"a",
".",
"NodeID",
"=",
"&",
"nodeID",
"\n",
"return",
"a",
"\n",
"}"
] |
// SetNodeID sets the NodeID optional argument. Id of the node to
// resolve.
|
[
"SetNodeID",
"sets",
"the",
"NodeID",
"optional",
"argument",
".",
"Id",
"of",
"the",
"node",
"to",
"resolve",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/dom/command.go#L648-L651
|
18,893
|
mafredri/cdp
|
protocol/dom/command.go
|
SetBackendNodeID
|
func (a *ResolveNodeArgs) SetBackendNodeID(backendNodeID BackendNodeID) *ResolveNodeArgs {
a.BackendNodeID = &backendNodeID
return a
}
|
go
|
func (a *ResolveNodeArgs) SetBackendNodeID(backendNodeID BackendNodeID) *ResolveNodeArgs {
a.BackendNodeID = &backendNodeID
return a
}
|
[
"func",
"(",
"a",
"*",
"ResolveNodeArgs",
")",
"SetBackendNodeID",
"(",
"backendNodeID",
"BackendNodeID",
")",
"*",
"ResolveNodeArgs",
"{",
"a",
".",
"BackendNodeID",
"=",
"&",
"backendNodeID",
"\n",
"return",
"a",
"\n",
"}"
] |
// SetBackendNodeID sets the BackendNodeID optional argument. Backend
// identifier of the node to resolve.
|
[
"SetBackendNodeID",
"sets",
"the",
"BackendNodeID",
"optional",
"argument",
".",
"Backend",
"identifier",
"of",
"the",
"node",
"to",
"resolve",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/dom/command.go#L655-L658
|
18,894
|
mafredri/cdp
|
protocol/dom/command.go
|
SetExecutionContextID
|
func (a *ResolveNodeArgs) SetExecutionContextID(executionContextID runtime.ExecutionContextID) *ResolveNodeArgs {
a.ExecutionContextID = &executionContextID
return a
}
|
go
|
func (a *ResolveNodeArgs) SetExecutionContextID(executionContextID runtime.ExecutionContextID) *ResolveNodeArgs {
a.ExecutionContextID = &executionContextID
return a
}
|
[
"func",
"(",
"a",
"*",
"ResolveNodeArgs",
")",
"SetExecutionContextID",
"(",
"executionContextID",
"runtime",
".",
"ExecutionContextID",
")",
"*",
"ResolveNodeArgs",
"{",
"a",
".",
"ExecutionContextID",
"=",
"&",
"executionContextID",
"\n",
"return",
"a",
"\n",
"}"
] |
// SetExecutionContextID sets the ExecutionContextID optional argument.
// Execution context in which to resolve the node.
|
[
"SetExecutionContextID",
"sets",
"the",
"ExecutionContextID",
"optional",
"argument",
".",
"Execution",
"context",
"in",
"which",
"to",
"resolve",
"the",
"node",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/dom/command.go#L669-L672
|
18,895
|
mafredri/cdp
|
protocol/dom/command.go
|
NewSetAttributeValueArgs
|
func NewSetAttributeValueArgs(nodeID NodeID, name string, value string) *SetAttributeValueArgs {
args := new(SetAttributeValueArgs)
args.NodeID = nodeID
args.Name = name
args.Value = value
return args
}
|
go
|
func NewSetAttributeValueArgs(nodeID NodeID, name string, value string) *SetAttributeValueArgs {
args := new(SetAttributeValueArgs)
args.NodeID = nodeID
args.Name = name
args.Value = value
return args
}
|
[
"func",
"NewSetAttributeValueArgs",
"(",
"nodeID",
"NodeID",
",",
"name",
"string",
",",
"value",
"string",
")",
"*",
"SetAttributeValueArgs",
"{",
"args",
":=",
"new",
"(",
"SetAttributeValueArgs",
")",
"\n",
"args",
".",
"NodeID",
"=",
"nodeID",
"\n",
"args",
".",
"Name",
"=",
"name",
"\n",
"args",
".",
"Value",
"=",
"value",
"\n",
"return",
"args",
"\n",
"}"
] |
// NewSetAttributeValueArgs initializes SetAttributeValueArgs with the required arguments.
|
[
"NewSetAttributeValueArgs",
"initializes",
"SetAttributeValueArgs",
"with",
"the",
"required",
"arguments",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/dom/command.go#L687-L693
|
18,896
|
mafredri/cdp
|
protocol/dom/command.go
|
NewSetAttributesAsTextArgs
|
func NewSetAttributesAsTextArgs(nodeID NodeID, text string) *SetAttributesAsTextArgs {
args := new(SetAttributesAsTextArgs)
args.NodeID = nodeID
args.Text = text
return args
}
|
go
|
func NewSetAttributesAsTextArgs(nodeID NodeID, text string) *SetAttributesAsTextArgs {
args := new(SetAttributesAsTextArgs)
args.NodeID = nodeID
args.Text = text
return args
}
|
[
"func",
"NewSetAttributesAsTextArgs",
"(",
"nodeID",
"NodeID",
",",
"text",
"string",
")",
"*",
"SetAttributesAsTextArgs",
"{",
"args",
":=",
"new",
"(",
"SetAttributesAsTextArgs",
")",
"\n",
"args",
".",
"NodeID",
"=",
"nodeID",
"\n",
"args",
".",
"Text",
"=",
"text",
"\n",
"return",
"args",
"\n",
"}"
] |
// NewSetAttributesAsTextArgs initializes SetAttributesAsTextArgs with the required arguments.
|
[
"NewSetAttributesAsTextArgs",
"initializes",
"SetAttributesAsTextArgs",
"with",
"the",
"required",
"arguments",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/dom/command.go#L703-L708
|
18,897
|
mafredri/cdp
|
protocol/dom/command.go
|
SetName
|
func (a *SetAttributesAsTextArgs) SetName(name string) *SetAttributesAsTextArgs {
a.Name = &name
return a
}
|
go
|
func (a *SetAttributesAsTextArgs) SetName(name string) *SetAttributesAsTextArgs {
a.Name = &name
return a
}
|
[
"func",
"(",
"a",
"*",
"SetAttributesAsTextArgs",
")",
"SetName",
"(",
"name",
"string",
")",
"*",
"SetAttributesAsTextArgs",
"{",
"a",
".",
"Name",
"=",
"&",
"name",
"\n",
"return",
"a",
"\n",
"}"
] |
// SetName sets the Name optional argument. Attribute name to replace
// with new attributes derived from text in case text parsed
// successfully.
|
[
"SetName",
"sets",
"the",
"Name",
"optional",
"argument",
".",
"Attribute",
"name",
"to",
"replace",
"with",
"new",
"attributes",
"derived",
"from",
"text",
"in",
"case",
"text",
"parsed",
"successfully",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/dom/command.go#L713-L716
|
18,898
|
mafredri/cdp
|
protocol/dom/command.go
|
NewSetFileInputFilesArgs
|
func NewSetFileInputFilesArgs(files []string) *SetFileInputFilesArgs {
args := new(SetFileInputFilesArgs)
args.Files = files
return args
}
|
go
|
func NewSetFileInputFilesArgs(files []string) *SetFileInputFilesArgs {
args := new(SetFileInputFilesArgs)
args.Files = files
return args
}
|
[
"func",
"NewSetFileInputFilesArgs",
"(",
"files",
"[",
"]",
"string",
")",
"*",
"SetFileInputFilesArgs",
"{",
"args",
":=",
"new",
"(",
"SetFileInputFilesArgs",
")",
"\n",
"args",
".",
"Files",
"=",
"files",
"\n",
"return",
"args",
"\n",
"}"
] |
// NewSetFileInputFilesArgs initializes SetFileInputFilesArgs with the required arguments.
|
[
"NewSetFileInputFilesArgs",
"initializes",
"SetFileInputFilesArgs",
"with",
"the",
"required",
"arguments",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/dom/command.go#L727-L731
|
18,899
|
mafredri/cdp
|
protocol/dom/command.go
|
NewGetFileInfoArgs
|
func NewGetFileInfoArgs(objectID runtime.RemoteObjectID) *GetFileInfoArgs {
args := new(GetFileInfoArgs)
args.ObjectID = objectID
return args
}
|
go
|
func NewGetFileInfoArgs(objectID runtime.RemoteObjectID) *GetFileInfoArgs {
args := new(GetFileInfoArgs)
args.ObjectID = objectID
return args
}
|
[
"func",
"NewGetFileInfoArgs",
"(",
"objectID",
"runtime",
".",
"RemoteObjectID",
")",
"*",
"GetFileInfoArgs",
"{",
"args",
":=",
"new",
"(",
"GetFileInfoArgs",
")",
"\n",
"args",
".",
"ObjectID",
"=",
"objectID",
"\n",
"return",
"args",
"\n",
"}"
] |
// NewGetFileInfoArgs initializes GetFileInfoArgs with the required arguments.
|
[
"NewGetFileInfoArgs",
"initializes",
"GetFileInfoArgs",
"with",
"the",
"required",
"arguments",
"."
] |
a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514
|
https://github.com/mafredri/cdp/blob/a3cd6cc58c0b7537b9614e7fa5da84bdd3c18514/protocol/dom/command.go#L760-L764
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.