repo
stringlengths 5
67
| path
stringlengths 4
218
| func_name
stringlengths 0
151
| original_string
stringlengths 52
373k
| language
stringclasses 6
values | code
stringlengths 52
373k
| code_tokens
listlengths 10
512
| docstring
stringlengths 3
47.2k
| docstring_tokens
listlengths 3
234
| sha
stringlengths 40
40
| url
stringlengths 85
339
| partition
stringclasses 3
values |
|---|---|---|---|---|---|---|---|---|---|---|---|
chromedp/cdproto
|
cdp/types.go
|
WithExecutor
|
func WithExecutor(parent context.Context, executor Executor) context.Context {
return context.WithValue(parent, executorKey, executor)
}
|
go
|
func WithExecutor(parent context.Context, executor Executor) context.Context {
return context.WithValue(parent, executorKey, executor)
}
|
[
"func",
"WithExecutor",
"(",
"parent",
"context",
".",
"Context",
",",
"executor",
"Executor",
")",
"context",
".",
"Context",
"{",
"return",
"context",
".",
"WithValue",
"(",
"parent",
",",
"executorKey",
",",
"executor",
")",
"\n",
"}"
] |
// WithExecutor sets the message executor for the context.
|
[
"WithExecutor",
"sets",
"the",
"message",
"executor",
"for",
"the",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/cdp/types.go#L35-L37
|
test
|
chromedp/cdproto
|
cdp/types.go
|
Execute
|
func Execute(ctx context.Context, method string, params easyjson.Marshaler, res easyjson.Unmarshaler) error {
if executor := ctx.Value(executorKey); executor != nil {
return executor.(Executor).Execute(ctx, method, params, res)
}
return ErrInvalidContext
}
|
go
|
func Execute(ctx context.Context, method string, params easyjson.Marshaler, res easyjson.Unmarshaler) error {
if executor := ctx.Value(executorKey); executor != nil {
return executor.(Executor).Execute(ctx, method, params, res)
}
return ErrInvalidContext
}
|
[
"func",
"Execute",
"(",
"ctx",
"context",
".",
"Context",
",",
"method",
"string",
",",
"params",
"easyjson",
".",
"Marshaler",
",",
"res",
"easyjson",
".",
"Unmarshaler",
")",
"error",
"{",
"if",
"executor",
":=",
"ctx",
".",
"Value",
"(",
"executorKey",
")",
";",
"executor",
"!=",
"nil",
"{",
"return",
"executor",
".",
"(",
"Executor",
")",
".",
"Execute",
"(",
"ctx",
",",
"method",
",",
"params",
",",
"res",
")",
"\n",
"}",
"\n",
"return",
"ErrInvalidContext",
"\n",
"}"
] |
// Execute uses the context's message executor to send a command or event
// method marshaling the provided parameters, and unmarshaling to res.
|
[
"Execute",
"uses",
"the",
"context",
"s",
"message",
"executor",
"to",
"send",
"a",
"command",
"or",
"event",
"method",
"marshaling",
"the",
"provided",
"parameters",
"and",
"unmarshaling",
"to",
"res",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/cdp/types.go#L46-L51
|
test
|
chromedp/cdproto
|
cdp/types.go
|
AttributeValue
|
func (n *Node) AttributeValue(name string) string {
n.RLock()
defer n.RUnlock()
for i := 0; i < len(n.Attributes); i += 2 {
if n.Attributes[i] == name {
return n.Attributes[i+1]
}
}
return ""
}
|
go
|
func (n *Node) AttributeValue(name string) string {
n.RLock()
defer n.RUnlock()
for i := 0; i < len(n.Attributes); i += 2 {
if n.Attributes[i] == name {
return n.Attributes[i+1]
}
}
return ""
}
|
[
"func",
"(",
"n",
"*",
"Node",
")",
"AttributeValue",
"(",
"name",
"string",
")",
"string",
"{",
"n",
".",
"RLock",
"(",
")",
"\n",
"defer",
"n",
".",
"RUnlock",
"(",
")",
"\n",
"for",
"i",
":=",
"0",
";",
"i",
"<",
"len",
"(",
"n",
".",
"Attributes",
")",
";",
"i",
"+=",
"2",
"{",
"if",
"n",
".",
"Attributes",
"[",
"i",
"]",
"==",
"name",
"{",
"return",
"n",
".",
"Attributes",
"[",
"i",
"+",
"1",
"]",
"\n",
"}",
"\n",
"}",
"\n",
"return",
"\"\"",
"\n",
"}"
] |
// AttributeValue returns the named attribute for the node.
|
[
"AttributeValue",
"returns",
"the",
"named",
"attribute",
"for",
"the",
"node",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/cdp/types.go#L318-L329
|
test
|
chromedp/cdproto
|
cdp/types.go
|
xpath
|
func (n *Node) xpath(stopAtDocument, stopAtID bool) string {
n.RLock()
defer n.RUnlock()
p := ""
pos := ""
id := n.AttributeValue("id")
switch {
case n.Parent == nil:
return n.LocalName
case stopAtDocument && n.NodeType == NodeTypeDocument:
return ""
case stopAtID && id != "":
p = "/"
pos = `[@id='` + id + `']`
case n.Parent != nil:
var i int
var found bool
n.Parent.RLock()
for j := 0; j < len(n.Parent.Children); j++ {
if n.Parent.Children[j].LocalName == n.LocalName {
i++
}
if n.Parent.Children[j].NodeID == n.NodeID {
found = true
break
}
}
n.Parent.RUnlock()
if found {
pos = "[" + strconv.Itoa(i) + "]"
}
p = n.Parent.xpath(stopAtDocument, stopAtID)
}
return p + "/" + n.LocalName + pos
}
|
go
|
func (n *Node) xpath(stopAtDocument, stopAtID bool) string {
n.RLock()
defer n.RUnlock()
p := ""
pos := ""
id := n.AttributeValue("id")
switch {
case n.Parent == nil:
return n.LocalName
case stopAtDocument && n.NodeType == NodeTypeDocument:
return ""
case stopAtID && id != "":
p = "/"
pos = `[@id='` + id + `']`
case n.Parent != nil:
var i int
var found bool
n.Parent.RLock()
for j := 0; j < len(n.Parent.Children); j++ {
if n.Parent.Children[j].LocalName == n.LocalName {
i++
}
if n.Parent.Children[j].NodeID == n.NodeID {
found = true
break
}
}
n.Parent.RUnlock()
if found {
pos = "[" + strconv.Itoa(i) + "]"
}
p = n.Parent.xpath(stopAtDocument, stopAtID)
}
return p + "/" + n.LocalName + pos
}
|
[
"func",
"(",
"n",
"*",
"Node",
")",
"xpath",
"(",
"stopAtDocument",
",",
"stopAtID",
"bool",
")",
"string",
"{",
"n",
".",
"RLock",
"(",
")",
"\n",
"defer",
"n",
".",
"RUnlock",
"(",
")",
"\n",
"p",
":=",
"\"\"",
"\n",
"pos",
":=",
"\"\"",
"\n",
"id",
":=",
"n",
".",
"AttributeValue",
"(",
"\"id\"",
")",
"\n",
"switch",
"{",
"case",
"n",
".",
"Parent",
"==",
"nil",
":",
"return",
"n",
".",
"LocalName",
"\n",
"case",
"stopAtDocument",
"&&",
"n",
".",
"NodeType",
"==",
"NodeTypeDocument",
":",
"return",
"\"\"",
"\n",
"case",
"stopAtID",
"&&",
"id",
"!=",
"\"\"",
":",
"p",
"=",
"\"/\"",
"\n",
"pos",
"=",
"`[@id='`",
"+",
"id",
"+",
"`']`",
"\n",
"case",
"n",
".",
"Parent",
"!=",
"nil",
":",
"var",
"i",
"int",
"\n",
"var",
"found",
"bool",
"\n",
"n",
".",
"Parent",
".",
"RLock",
"(",
")",
"\n",
"for",
"j",
":=",
"0",
";",
"j",
"<",
"len",
"(",
"n",
".",
"Parent",
".",
"Children",
")",
";",
"j",
"++",
"{",
"if",
"n",
".",
"Parent",
".",
"Children",
"[",
"j",
"]",
".",
"LocalName",
"==",
"n",
".",
"LocalName",
"{",
"i",
"++",
"\n",
"}",
"\n",
"if",
"n",
".",
"Parent",
".",
"Children",
"[",
"j",
"]",
".",
"NodeID",
"==",
"n",
".",
"NodeID",
"{",
"found",
"=",
"true",
"\n",
"break",
"\n",
"}",
"\n",
"}",
"\n",
"n",
".",
"Parent",
".",
"RUnlock",
"(",
")",
"\n",
"if",
"found",
"{",
"pos",
"=",
"\"[\"",
"+",
"strconv",
".",
"Itoa",
"(",
"i",
")",
"+",
"\"]\"",
"\n",
"}",
"\n",
"p",
"=",
"n",
".",
"Parent",
".",
"xpath",
"(",
"stopAtDocument",
",",
"stopAtID",
")",
"\n",
"}",
"\n",
"return",
"p",
"+",
"\"/\"",
"+",
"n",
".",
"LocalName",
"+",
"pos",
"\n",
"}"
] |
// xpath builds the xpath string.
|
[
"xpath",
"builds",
"the",
"xpath",
"string",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/cdp/types.go#L332-L374
|
test
|
chromedp/cdproto
|
cdp/types.go
|
String
|
func (t NodeType) String() string {
switch t {
case NodeTypeElement:
return "Element"
case NodeTypeAttribute:
return "Attribute"
case NodeTypeText:
return "Text"
case NodeTypeCDATA:
return "CDATA"
case NodeTypeEntityReference:
return "EntityReference"
case NodeTypeEntity:
return "Entity"
case NodeTypeProcessingInstruction:
return "ProcessingInstruction"
case NodeTypeComment:
return "Comment"
case NodeTypeDocument:
return "Document"
case NodeTypeDocumentType:
return "DocumentType"
case NodeTypeDocumentFragment:
return "DocumentFragment"
case NodeTypeNotation:
return "Notation"
}
return fmt.Sprintf("NodeType(%d)", t)
}
|
go
|
func (t NodeType) String() string {
switch t {
case NodeTypeElement:
return "Element"
case NodeTypeAttribute:
return "Attribute"
case NodeTypeText:
return "Text"
case NodeTypeCDATA:
return "CDATA"
case NodeTypeEntityReference:
return "EntityReference"
case NodeTypeEntity:
return "Entity"
case NodeTypeProcessingInstruction:
return "ProcessingInstruction"
case NodeTypeComment:
return "Comment"
case NodeTypeDocument:
return "Document"
case NodeTypeDocumentType:
return "DocumentType"
case NodeTypeDocumentFragment:
return "DocumentFragment"
case NodeTypeNotation:
return "Notation"
}
return fmt.Sprintf("NodeType(%d)", t)
}
|
[
"func",
"(",
"t",
"NodeType",
")",
"String",
"(",
")",
"string",
"{",
"switch",
"t",
"{",
"case",
"NodeTypeElement",
":",
"return",
"\"Element\"",
"\n",
"case",
"NodeTypeAttribute",
":",
"return",
"\"Attribute\"",
"\n",
"case",
"NodeTypeText",
":",
"return",
"\"Text\"",
"\n",
"case",
"NodeTypeCDATA",
":",
"return",
"\"CDATA\"",
"\n",
"case",
"NodeTypeEntityReference",
":",
"return",
"\"EntityReference\"",
"\n",
"case",
"NodeTypeEntity",
":",
"return",
"\"Entity\"",
"\n",
"case",
"NodeTypeProcessingInstruction",
":",
"return",
"\"ProcessingInstruction\"",
"\n",
"case",
"NodeTypeComment",
":",
"return",
"\"Comment\"",
"\n",
"case",
"NodeTypeDocument",
":",
"return",
"\"Document\"",
"\n",
"case",
"NodeTypeDocumentType",
":",
"return",
"\"DocumentType\"",
"\n",
"case",
"NodeTypeDocumentFragment",
":",
"return",
"\"DocumentFragment\"",
"\n",
"case",
"NodeTypeNotation",
":",
"return",
"\"Notation\"",
"\n",
"}",
"\n",
"return",
"fmt",
".",
"Sprintf",
"(",
"\"NodeType(%d)\"",
",",
"t",
")",
"\n",
"}"
] |
// String returns the NodeType as string value.
|
[
"String",
"returns",
"the",
"NodeType",
"as",
"string",
"value",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/cdp/types.go#L468-L497
|
test
|
chromedp/cdproto
|
cast/cast.go
|
Do
|
func (p *SetSinkToUseParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandSetSinkToUse, p, nil)
}
|
go
|
func (p *SetSinkToUseParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandSetSinkToUse, p, nil)
}
|
[
"func",
"(",
"p",
"*",
"SetSinkToUseParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandSetSinkToUse",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes Cast.setSinkToUse against the provided context.
|
[
"Do",
"executes",
"Cast",
".",
"setSinkToUse",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/cast/cast.go#L87-L89
|
test
|
chromedp/cdproto
|
cast/cast.go
|
Do
|
func (p *StartTabMirroringParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandStartTabMirroring, p, nil)
}
|
go
|
func (p *StartTabMirroringParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandStartTabMirroring, p, nil)
}
|
[
"func",
"(",
"p",
"*",
"StartTabMirroringParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandStartTabMirroring",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes Cast.startTabMirroring against the provided context.
|
[
"Do",
"executes",
"Cast",
".",
"startTabMirroring",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/cast/cast.go#L109-L111
|
test
|
chromedp/cdproto
|
cast/cast.go
|
Do
|
func (p *StopCastingParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandStopCasting, p, nil)
}
|
go
|
func (p *StopCastingParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandStopCasting, p, nil)
}
|
[
"func",
"(",
"p",
"*",
"StopCastingParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandStopCasting",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes Cast.stopCasting against the provided context.
|
[
"Do",
"executes",
"Cast",
".",
"stopCasting",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/cast/cast.go#L131-L133
|
test
|
chromedp/cdproto
|
backgroundservice/backgroundservice.go
|
Do
|
func (p *StartObservingParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandStartObserving, p, nil)
}
|
go
|
func (p *StartObservingParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandStartObserving, p, nil)
}
|
[
"func",
"(",
"p",
"*",
"StartObservingParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandStartObserving",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes BackgroundService.startObserving against the provided context.
|
[
"Do",
"executes",
"BackgroundService",
".",
"startObserving",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/backgroundservice/backgroundservice.go#L35-L37
|
test
|
chromedp/cdproto
|
backgroundservice/backgroundservice.go
|
Do
|
func (p *StopObservingParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandStopObserving, p, nil)
}
|
go
|
func (p *StopObservingParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandStopObserving, p, nil)
}
|
[
"func",
"(",
"p",
"*",
"StopObservingParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandStopObserving",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes BackgroundService.stopObserving against the provided context.
|
[
"Do",
"executes",
"BackgroundService",
".",
"stopObserving",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/backgroundservice/backgroundservice.go#L57-L59
|
test
|
chromedp/cdproto
|
backgroundservice/backgroundservice.go
|
Do
|
func (p *SetRecordingParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandSetRecording, p, nil)
}
|
go
|
func (p *SetRecordingParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandSetRecording, p, nil)
}
|
[
"func",
"(",
"p",
"*",
"SetRecordingParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandSetRecording",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes BackgroundService.setRecording against the provided context.
|
[
"Do",
"executes",
"BackgroundService",
".",
"setRecording",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/backgroundservice/backgroundservice.go#L82-L84
|
test
|
chromedp/cdproto
|
backgroundservice/backgroundservice.go
|
Do
|
func (p *ClearEventsParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandClearEvents, p, nil)
}
|
go
|
func (p *ClearEventsParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandClearEvents, p, nil)
}
|
[
"func",
"(",
"p",
"*",
"ClearEventsParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandClearEvents",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes BackgroundService.clearEvents against the provided context.
|
[
"Do",
"executes",
"BackgroundService",
".",
"clearEvents",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/backgroundservice/backgroundservice.go#L104-L106
|
test
|
chromedp/cdproto
|
runtime/runtime.go
|
WithObjectID
|
func (p CallFunctionOnParams) WithObjectID(objectID RemoteObjectID) *CallFunctionOnParams {
p.ObjectID = objectID
return &p
}
|
go
|
func (p CallFunctionOnParams) WithObjectID(objectID RemoteObjectID) *CallFunctionOnParams {
p.ObjectID = objectID
return &p
}
|
[
"func",
"(",
"p",
"CallFunctionOnParams",
")",
"WithObjectID",
"(",
"objectID",
"RemoteObjectID",
")",
"*",
"CallFunctionOnParams",
"{",
"p",
".",
"ObjectID",
"=",
"objectID",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
// WithObjectID identifier of the object to call function on. Either objectId
// or executionContextId should be specified.
|
[
"WithObjectID",
"identifier",
"of",
"the",
"object",
"to",
"call",
"function",
"on",
".",
"Either",
"objectId",
"or",
"executionContextId",
"should",
"be",
"specified",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/runtime/runtime.go#L106-L109
|
test
|
chromedp/cdproto
|
runtime/runtime.go
|
WithArguments
|
func (p CallFunctionOnParams) WithArguments(arguments []*CallArgument) *CallFunctionOnParams {
p.Arguments = arguments
return &p
}
|
go
|
func (p CallFunctionOnParams) WithArguments(arguments []*CallArgument) *CallFunctionOnParams {
p.Arguments = arguments
return &p
}
|
[
"func",
"(",
"p",
"CallFunctionOnParams",
")",
"WithArguments",
"(",
"arguments",
"[",
"]",
"*",
"CallArgument",
")",
"*",
"CallFunctionOnParams",
"{",
"p",
".",
"Arguments",
"=",
"arguments",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
// WithArguments call arguments. All call arguments must belong to the same
// JavaScript world as the target object.
|
[
"WithArguments",
"call",
"arguments",
".",
"All",
"call",
"arguments",
"must",
"belong",
"to",
"the",
"same",
"JavaScript",
"world",
"as",
"the",
"target",
"object",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/runtime/runtime.go#L113-L116
|
test
|
chromedp/cdproto
|
runtime/runtime.go
|
WithExecutionContextID
|
func (p CallFunctionOnParams) WithExecutionContextID(executionContextID ExecutionContextID) *CallFunctionOnParams {
p.ExecutionContextID = executionContextID
return &p
}
|
go
|
func (p CallFunctionOnParams) WithExecutionContextID(executionContextID ExecutionContextID) *CallFunctionOnParams {
p.ExecutionContextID = executionContextID
return &p
}
|
[
"func",
"(",
"p",
"CallFunctionOnParams",
")",
"WithExecutionContextID",
"(",
"executionContextID",
"ExecutionContextID",
")",
"*",
"CallFunctionOnParams",
"{",
"p",
".",
"ExecutionContextID",
"=",
"executionContextID",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
// WithExecutionContextID specifies execution context which global object
// will be used to call function on. Either executionContextId or objectId
// should be specified.
|
[
"WithExecutionContextID",
"specifies",
"execution",
"context",
"which",
"global",
"object",
"will",
"be",
"used",
"to",
"call",
"function",
"on",
".",
"Either",
"executionContextId",
"or",
"objectId",
"should",
"be",
"specified",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/runtime/runtime.go#L155-L158
|
test
|
chromedp/cdproto
|
runtime/runtime.go
|
WithObjectGroup
|
func (p CallFunctionOnParams) WithObjectGroup(objectGroup string) *CallFunctionOnParams {
p.ObjectGroup = objectGroup
return &p
}
|
go
|
func (p CallFunctionOnParams) WithObjectGroup(objectGroup string) *CallFunctionOnParams {
p.ObjectGroup = objectGroup
return &p
}
|
[
"func",
"(",
"p",
"CallFunctionOnParams",
")",
"WithObjectGroup",
"(",
"objectGroup",
"string",
")",
"*",
"CallFunctionOnParams",
"{",
"p",
".",
"ObjectGroup",
"=",
"objectGroup",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
// WithObjectGroup symbolic group name that can be used to release multiple
// objects. If objectGroup is not specified and objectId is, objectGroup will be
// inherited from object.
|
[
"WithObjectGroup",
"symbolic",
"group",
"name",
"that",
"can",
"be",
"used",
"to",
"release",
"multiple",
"objects",
".",
"If",
"objectGroup",
"is",
"not",
"specified",
"and",
"objectId",
"is",
"objectGroup",
"will",
"be",
"inherited",
"from",
"object",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/runtime/runtime.go#L163-L166
|
test
|
chromedp/cdproto
|
runtime/runtime.go
|
Do
|
func (p *DiscardConsoleEntriesParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandDiscardConsoleEntries, nil, nil)
}
|
go
|
func (p *DiscardConsoleEntriesParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandDiscardConsoleEntries, nil, nil)
}
|
[
"func",
"(",
"p",
"*",
"DiscardConsoleEntriesParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandDiscardConsoleEntries",
",",
"nil",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes Runtime.discardConsoleEntries against the provided context.
|
[
"Do",
"executes",
"Runtime",
".",
"discardConsoleEntries",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/runtime/runtime.go#L271-L273
|
test
|
chromedp/cdproto
|
runtime/runtime.go
|
WithContextID
|
func (p EvaluateParams) WithContextID(contextID ExecutionContextID) *EvaluateParams {
p.ContextID = contextID
return &p
}
|
go
|
func (p EvaluateParams) WithContextID(contextID ExecutionContextID) *EvaluateParams {
p.ContextID = contextID
return &p
}
|
[
"func",
"(",
"p",
"EvaluateParams",
")",
"WithContextID",
"(",
"contextID",
"ExecutionContextID",
")",
"*",
"EvaluateParams",
"{",
"p",
".",
"ContextID",
"=",
"contextID",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
// WithContextID specifies in which execution context to perform evaluation.
// If the parameter is omitted the evaluation will be performed in the context
// of the inspected page.
|
[
"WithContextID",
"specifies",
"in",
"which",
"execution",
"context",
"to",
"perform",
"evaluation",
".",
"If",
"the",
"parameter",
"is",
"omitted",
"the",
"evaluation",
"will",
"be",
"performed",
"in",
"the",
"context",
"of",
"the",
"inspected",
"page",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/runtime/runtime.go#L345-L348
|
test
|
chromedp/cdproto
|
runtime/runtime.go
|
WithOwnProperties
|
func (p GetPropertiesParams) WithOwnProperties(ownProperties bool) *GetPropertiesParams {
p.OwnProperties = ownProperties
return &p
}
|
go
|
func (p GetPropertiesParams) WithOwnProperties(ownProperties bool) *GetPropertiesParams {
p.OwnProperties = ownProperties
return &p
}
|
[
"func",
"(",
"p",
"GetPropertiesParams",
")",
"WithOwnProperties",
"(",
"ownProperties",
"bool",
")",
"*",
"GetPropertiesParams",
"{",
"p",
".",
"OwnProperties",
"=",
"ownProperties",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
// WithOwnProperties if true, returns properties belonging only to the
// element itself, not to its prototype chain.
|
[
"WithOwnProperties",
"if",
"true",
"returns",
"properties",
"belonging",
"only",
"to",
"the",
"element",
"itself",
"not",
"to",
"its",
"prototype",
"chain",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/runtime/runtime.go#L500-L503
|
test
|
chromedp/cdproto
|
runtime/runtime.go
|
WithGeneratePreview
|
func (p GetPropertiesParams) WithGeneratePreview(generatePreview bool) *GetPropertiesParams {
p.GeneratePreview = generatePreview
return &p
}
|
go
|
func (p GetPropertiesParams) WithGeneratePreview(generatePreview bool) *GetPropertiesParams {
p.GeneratePreview = generatePreview
return &p
}
|
[
"func",
"(",
"p",
"GetPropertiesParams",
")",
"WithGeneratePreview",
"(",
"generatePreview",
"bool",
")",
"*",
"GetPropertiesParams",
"{",
"p",
".",
"GeneratePreview",
"=",
"generatePreview",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
// WithGeneratePreview whether preview should be generated for the results.
|
[
"WithGeneratePreview",
"whether",
"preview",
"should",
"be",
"generated",
"for",
"the",
"results",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/runtime/runtime.go#L513-L516
|
test
|
chromedp/cdproto
|
runtime/runtime.go
|
WithExecutionContextID
|
func (p GlobalLexicalScopeNamesParams) WithExecutionContextID(executionContextID ExecutionContextID) *GlobalLexicalScopeNamesParams {
p.ExecutionContextID = executionContextID
return &p
}
|
go
|
func (p GlobalLexicalScopeNamesParams) WithExecutionContextID(executionContextID ExecutionContextID) *GlobalLexicalScopeNamesParams {
p.ExecutionContextID = executionContextID
return &p
}
|
[
"func",
"(",
"p",
"GlobalLexicalScopeNamesParams",
")",
"WithExecutionContextID",
"(",
"executionContextID",
"ExecutionContextID",
")",
"*",
"GlobalLexicalScopeNamesParams",
"{",
"p",
".",
"ExecutionContextID",
"=",
"executionContextID",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
// WithExecutionContextID specifies in which execution context to lookup
// global scope variables.
|
[
"WithExecutionContextID",
"specifies",
"in",
"which",
"execution",
"context",
"to",
"lookup",
"global",
"scope",
"variables",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/runtime/runtime.go#L562-L565
|
test
|
chromedp/cdproto
|
runtime/runtime.go
|
WithObjectGroup
|
func (p QueryObjectsParams) WithObjectGroup(objectGroup string) *QueryObjectsParams {
p.ObjectGroup = objectGroup
return &p
}
|
go
|
func (p QueryObjectsParams) WithObjectGroup(objectGroup string) *QueryObjectsParams {
p.ObjectGroup = objectGroup
return &p
}
|
[
"func",
"(",
"p",
"QueryObjectsParams",
")",
"WithObjectGroup",
"(",
"objectGroup",
"string",
")",
"*",
"QueryObjectsParams",
"{",
"p",
".",
"ObjectGroup",
"=",
"objectGroup",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
// WithObjectGroup symbolic group name that can be used to release the
// results.
|
[
"WithObjectGroup",
"symbolic",
"group",
"name",
"that",
"can",
"be",
"used",
"to",
"release",
"the",
"results",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/runtime/runtime.go#L607-L610
|
test
|
chromedp/cdproto
|
runtime/runtime.go
|
Do
|
func (p *ReleaseObjectParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandReleaseObject, p, nil)
}
|
go
|
func (p *ReleaseObjectParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandReleaseObject, p, nil)
}
|
[
"func",
"(",
"p",
"*",
"ReleaseObjectParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandReleaseObject",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes Runtime.releaseObject against the provided context.
|
[
"Do",
"executes",
"Runtime",
".",
"releaseObject",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/runtime/runtime.go#L650-L652
|
test
|
chromedp/cdproto
|
runtime/runtime.go
|
Do
|
func (p *ReleaseObjectGroupParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandReleaseObjectGroup, p, nil)
}
|
go
|
func (p *ReleaseObjectGroupParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandReleaseObjectGroup, p, nil)
}
|
[
"func",
"(",
"p",
"*",
"ReleaseObjectGroupParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandReleaseObjectGroup",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes Runtime.releaseObjectGroup against the provided context.
|
[
"Do",
"executes",
"Runtime",
".",
"releaseObjectGroup",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/runtime/runtime.go#L674-L676
|
test
|
chromedp/cdproto
|
runtime/runtime.go
|
Do
|
func (p *RunIfWaitingForDebuggerParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandRunIfWaitingForDebugger, nil, nil)
}
|
go
|
func (p *RunIfWaitingForDebuggerParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandRunIfWaitingForDebugger, nil, nil)
}
|
[
"func",
"(",
"p",
"*",
"RunIfWaitingForDebuggerParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandRunIfWaitingForDebugger",
",",
"nil",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes Runtime.runIfWaitingForDebugger against the provided context.
|
[
"Do",
"executes",
"Runtime",
".",
"runIfWaitingForDebugger",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/runtime/runtime.go#L691-L693
|
test
|
chromedp/cdproto
|
runtime/runtime.go
|
Do
|
func (p *SetCustomObjectFormatterEnabledParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandSetCustomObjectFormatterEnabled, p, nil)
}
|
go
|
func (p *SetCustomObjectFormatterEnabledParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandSetCustomObjectFormatterEnabled, p, nil)
}
|
[
"func",
"(",
"p",
"*",
"SetCustomObjectFormatterEnabledParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandSetCustomObjectFormatterEnabled",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes Runtime.setCustomObjectFormatterEnabled against the provided context.
|
[
"Do",
"executes",
"Runtime",
".",
"setCustomObjectFormatterEnabled",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/runtime/runtime.go#L808-L810
|
test
|
chromedp/cdproto
|
runtime/runtime.go
|
Do
|
func (p *SetMaxCallStackSizeToCaptureParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandSetMaxCallStackSizeToCapture, p, nil)
}
|
go
|
func (p *SetMaxCallStackSizeToCaptureParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandSetMaxCallStackSizeToCapture, p, nil)
}
|
[
"func",
"(",
"p",
"*",
"SetMaxCallStackSizeToCaptureParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandSetMaxCallStackSizeToCapture",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes Runtime.setMaxCallStackSizeToCapture against the provided context.
|
[
"Do",
"executes",
"Runtime",
".",
"setMaxCallStackSizeToCapture",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/runtime/runtime.go#L830-L832
|
test
|
chromedp/cdproto
|
runtime/runtime.go
|
Do
|
func (p *TerminateExecutionParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandTerminateExecution, nil, nil)
}
|
go
|
func (p *TerminateExecutionParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandTerminateExecution, nil, nil)
}
|
[
"func",
"(",
"p",
"*",
"TerminateExecutionParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandTerminateExecution",
",",
"nil",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes Runtime.terminateExecution against the provided context.
|
[
"Do",
"executes",
"Runtime",
".",
"terminateExecution",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/runtime/runtime.go#L847-L849
|
test
|
chromedp/cdproto
|
runtime/runtime.go
|
Do
|
func (p *AddBindingParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandAddBinding, p, nil)
}
|
go
|
func (p *AddBindingParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandAddBinding, p, nil)
}
|
[
"func",
"(",
"p",
"*",
"AddBindingParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandAddBinding",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes Runtime.addBinding against the provided context.
|
[
"Do",
"executes",
"Runtime",
".",
"addBinding",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/runtime/runtime.go#L888-L890
|
test
|
chromedp/cdproto
|
runtime/runtime.go
|
Do
|
func (p *RemoveBindingParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandRemoveBinding, p, nil)
}
|
go
|
func (p *RemoveBindingParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandRemoveBinding, p, nil)
}
|
[
"func",
"(",
"p",
"*",
"RemoveBindingParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandRemoveBinding",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes Runtime.removeBinding against the provided context.
|
[
"Do",
"executes",
"Runtime",
".",
"removeBinding",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/runtime/runtime.go#L914-L916
|
test
|
chromedp/cdproto
|
tracing/tracing.go
|
Do
|
func (p *EndParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandEnd, nil, nil)
}
|
go
|
func (p *EndParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandEnd, nil, nil)
}
|
[
"func",
"(",
"p",
"*",
"EndParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandEnd",
",",
"nil",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes Tracing.end against the provided context.
|
[
"Do",
"executes",
"Tracing",
".",
"end",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/tracing/tracing.go#L26-L28
|
test
|
chromedp/cdproto
|
tracing/tracing.go
|
Do
|
func (p *RecordClockSyncMarkerParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandRecordClockSyncMarker, p, nil)
}
|
go
|
func (p *RecordClockSyncMarkerParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandRecordClockSyncMarker, p, nil)
}
|
[
"func",
"(",
"p",
"*",
"RecordClockSyncMarkerParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandRecordClockSyncMarker",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes Tracing.recordClockSyncMarker against the provided context.
|
[
"Do",
"executes",
"Tracing",
".",
"recordClockSyncMarker",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/tracing/tracing.go#L78-L80
|
test
|
chromedp/cdproto
|
tracing/tracing.go
|
WithBufferUsageReportingInterval
|
func (p StartParams) WithBufferUsageReportingInterval(bufferUsageReportingInterval float64) *StartParams {
p.BufferUsageReportingInterval = bufferUsageReportingInterval
return &p
}
|
go
|
func (p StartParams) WithBufferUsageReportingInterval(bufferUsageReportingInterval float64) *StartParams {
p.BufferUsageReportingInterval = bufferUsageReportingInterval
return &p
}
|
[
"func",
"(",
"p",
"StartParams",
")",
"WithBufferUsageReportingInterval",
"(",
"bufferUsageReportingInterval",
"float64",
")",
"*",
"StartParams",
"{",
"p",
".",
"BufferUsageReportingInterval",
"=",
"bufferUsageReportingInterval",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
// WithBufferUsageReportingInterval if set, the agent will issue bufferUsage
// events at this interval, specified in milliseconds.
|
[
"WithBufferUsageReportingInterval",
"if",
"set",
"the",
"agent",
"will",
"issue",
"bufferUsage",
"events",
"at",
"this",
"interval",
"specified",
"in",
"milliseconds",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/tracing/tracing.go#L134-L137
|
test
|
chromedp/cdproto
|
headlessexperimental/headlessexperimental.go
|
WithNoDisplayUpdates
|
func (p BeginFrameParams) WithNoDisplayUpdates(noDisplayUpdates bool) *BeginFrameParams {
p.NoDisplayUpdates = noDisplayUpdates
return &p
}
|
go
|
func (p BeginFrameParams) WithNoDisplayUpdates(noDisplayUpdates bool) *BeginFrameParams {
p.NoDisplayUpdates = noDisplayUpdates
return &p
}
|
[
"func",
"(",
"p",
"BeginFrameParams",
")",
"WithNoDisplayUpdates",
"(",
"noDisplayUpdates",
"bool",
")",
"*",
"BeginFrameParams",
"{",
"p",
".",
"NoDisplayUpdates",
"=",
"noDisplayUpdates",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
// WithNoDisplayUpdates whether updates should not be committed and drawn
// onto the display. False by default. If true, only side effects of the
// BeginFrame will be run, such as layout and animations, but any visual updates
// may not be visible on the display or in screenshots.
|
[
"WithNoDisplayUpdates",
"whether",
"updates",
"should",
"not",
"be",
"committed",
"and",
"drawn",
"onto",
"the",
"display",
".",
"False",
"by",
"default",
".",
"If",
"true",
"only",
"side",
"effects",
"of",
"the",
"BeginFrame",
"will",
"be",
"run",
"such",
"as",
"layout",
"and",
"animations",
"but",
"any",
"visual",
"updates",
"may",
"not",
"be",
"visible",
"on",
"the",
"display",
"or",
"in",
"screenshots",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/headlessexperimental/headlessexperimental.go#L63-L66
|
test
|
chromedp/cdproto
|
headlessexperimental/headlessexperimental.go
|
WithScreenshot
|
func (p BeginFrameParams) WithScreenshot(screenshot *ScreenshotParams) *BeginFrameParams {
p.Screenshot = screenshot
return &p
}
|
go
|
func (p BeginFrameParams) WithScreenshot(screenshot *ScreenshotParams) *BeginFrameParams {
p.Screenshot = screenshot
return &p
}
|
[
"func",
"(",
"p",
"BeginFrameParams",
")",
"WithScreenshot",
"(",
"screenshot",
"*",
"ScreenshotParams",
")",
"*",
"BeginFrameParams",
"{",
"p",
".",
"Screenshot",
"=",
"screenshot",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
// WithScreenshot if set, a screenshot of the frame will be captured and
// returned in the response. Otherwise, no screenshot will be captured. Note
// that capturing a screenshot can fail, for example, during renderer
// initialization. In such a case, no screenshot data will be returned.
|
[
"WithScreenshot",
"if",
"set",
"a",
"screenshot",
"of",
"the",
"frame",
"will",
"be",
"captured",
"and",
"returned",
"in",
"the",
"response",
".",
"Otherwise",
"no",
"screenshot",
"will",
"be",
"captured",
".",
"Note",
"that",
"capturing",
"a",
"screenshot",
"can",
"fail",
"for",
"example",
"during",
"renderer",
"initialization",
".",
"In",
"such",
"a",
"case",
"no",
"screenshot",
"data",
"will",
"be",
"returned",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/headlessexperimental/headlessexperimental.go#L72-L75
|
test
|
chromedp/cdproto
|
page/page.go
|
Do
|
func (p *BringToFrontParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandBringToFront, nil, nil)
}
|
go
|
func (p *BringToFrontParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandBringToFront, nil, nil)
}
|
[
"func",
"(",
"p",
"*",
"BringToFrontParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandBringToFront",
",",
"nil",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes Page.bringToFront against the provided context.
|
[
"Do",
"executes",
"Page",
".",
"bringToFront",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/page/page.go#L81-L83
|
test
|
chromedp/cdproto
|
page/page.go
|
WithClip
|
func (p CaptureScreenshotParams) WithClip(clip *Viewport) *CaptureScreenshotParams {
p.Clip = clip
return &p
}
|
go
|
func (p CaptureScreenshotParams) WithClip(clip *Viewport) *CaptureScreenshotParams {
p.Clip = clip
return &p
}
|
[
"func",
"(",
"p",
"CaptureScreenshotParams",
")",
"WithClip",
"(",
"clip",
"*",
"Viewport",
")",
"*",
"CaptureScreenshotParams",
"{",
"p",
".",
"Clip",
"=",
"clip",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
// WithClip capture the screenshot of a given region only.
|
[
"WithClip",
"capture",
"the",
"screenshot",
"of",
"a",
"given",
"region",
"only",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/page/page.go#L115-L118
|
test
|
chromedp/cdproto
|
page/page.go
|
WithFromSurface
|
func (p CaptureScreenshotParams) WithFromSurface(fromSurface bool) *CaptureScreenshotParams {
p.FromSurface = fromSurface
return &p
}
|
go
|
func (p CaptureScreenshotParams) WithFromSurface(fromSurface bool) *CaptureScreenshotParams {
p.FromSurface = fromSurface
return &p
}
|
[
"func",
"(",
"p",
"CaptureScreenshotParams",
")",
"WithFromSurface",
"(",
"fromSurface",
"bool",
")",
"*",
"CaptureScreenshotParams",
"{",
"p",
".",
"FromSurface",
"=",
"fromSurface",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
// WithFromSurface capture the screenshot from the surface, rather than the
// view. Defaults to true.
|
[
"WithFromSurface",
"capture",
"the",
"screenshot",
"from",
"the",
"surface",
"rather",
"than",
"the",
"view",
".",
"Defaults",
"to",
"true",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/page/page.go#L122-L125
|
test
|
chromedp/cdproto
|
page/page.go
|
WithWorldName
|
func (p CreateIsolatedWorldParams) WithWorldName(worldName string) *CreateIsolatedWorldParams {
p.WorldName = worldName
return &p
}
|
go
|
func (p CreateIsolatedWorldParams) WithWorldName(worldName string) *CreateIsolatedWorldParams {
p.WorldName = worldName
return &p
}
|
[
"func",
"(",
"p",
"CreateIsolatedWorldParams",
")",
"WithWorldName",
"(",
"worldName",
"string",
")",
"*",
"CreateIsolatedWorldParams",
"{",
"p",
".",
"WorldName",
"=",
"worldName",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
// WithWorldName an optional name which is reported in the Execution Context.
|
[
"WithWorldName",
"an",
"optional",
"name",
"which",
"is",
"reported",
"in",
"the",
"Execution",
"Context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/page/page.go#L217-L220
|
test
|
chromedp/cdproto
|
page/page.go
|
WithGrantUniveralAccess
|
func (p CreateIsolatedWorldParams) WithGrantUniveralAccess(grantUniveralAccess bool) *CreateIsolatedWorldParams {
p.GrantUniveralAccess = grantUniveralAccess
return &p
}
|
go
|
func (p CreateIsolatedWorldParams) WithGrantUniveralAccess(grantUniveralAccess bool) *CreateIsolatedWorldParams {
p.GrantUniveralAccess = grantUniveralAccess
return &p
}
|
[
"func",
"(",
"p",
"CreateIsolatedWorldParams",
")",
"WithGrantUniveralAccess",
"(",
"grantUniveralAccess",
"bool",
")",
"*",
"CreateIsolatedWorldParams",
"{",
"p",
".",
"GrantUniveralAccess",
"=",
"grantUniveralAccess",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
// WithGrantUniveralAccess whether or not universal access should be granted
// to the isolated world. This is a powerful option, use with caution.
|
[
"WithGrantUniveralAccess",
"whether",
"or",
"not",
"universal",
"access",
"should",
"be",
"granted",
"to",
"the",
"isolated",
"world",
".",
"This",
"is",
"a",
"powerful",
"option",
"use",
"with",
"caution",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/page/page.go#L224-L227
|
test
|
chromedp/cdproto
|
page/page.go
|
Do
|
func (p *ResetNavigationHistoryParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandResetNavigationHistory, nil, nil)
}
|
go
|
func (p *ResetNavigationHistoryParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandResetNavigationHistory, nil, nil)
}
|
[
"func",
"(",
"p",
"*",
"ResetNavigationHistoryParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandResetNavigationHistory",
",",
"nil",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes Page.resetNavigationHistory against the provided context.
|
[
"Do",
"executes",
"Page",
".",
"resetNavigationHistory",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/page/page.go#L454-L456
|
test
|
chromedp/cdproto
|
page/page.go
|
WithPromptText
|
func (p HandleJavaScriptDialogParams) WithPromptText(promptText string) *HandleJavaScriptDialogParams {
p.PromptText = promptText
return &p
}
|
go
|
func (p HandleJavaScriptDialogParams) WithPromptText(promptText string) *HandleJavaScriptDialogParams {
p.PromptText = promptText
return &p
}
|
[
"func",
"(",
"p",
"HandleJavaScriptDialogParams",
")",
"WithPromptText",
"(",
"promptText",
"string",
")",
"*",
"HandleJavaScriptDialogParams",
"{",
"p",
".",
"PromptText",
"=",
"promptText",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
// WithPromptText the text to enter into the dialog prompt before accepting.
// Used only if this is a prompt dialog.
|
[
"WithPromptText",
"the",
"text",
"to",
"enter",
"into",
"the",
"dialog",
"prompt",
"before",
"accepting",
".",
"Used",
"only",
"if",
"this",
"is",
"a",
"prompt",
"dialog",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/page/page.go#L561-L564
|
test
|
chromedp/cdproto
|
page/page.go
|
Do
|
func (p *HandleJavaScriptDialogParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandHandleJavaScriptDialog, p, nil)
}
|
go
|
func (p *HandleJavaScriptDialogParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandHandleJavaScriptDialog, p, nil)
}
|
[
"func",
"(",
"p",
"*",
"HandleJavaScriptDialogParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandHandleJavaScriptDialog",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes Page.handleJavaScriptDialog against the provided context.
|
[
"Do",
"executes",
"Page",
".",
"handleJavaScriptDialog",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/page/page.go#L567-L569
|
test
|
chromedp/cdproto
|
page/page.go
|
WithReferrer
|
func (p NavigateParams) WithReferrer(referrer string) *NavigateParams {
p.Referrer = referrer
return &p
}
|
go
|
func (p NavigateParams) WithReferrer(referrer string) *NavigateParams {
p.Referrer = referrer
return &p
}
|
[
"func",
"(",
"p",
"NavigateParams",
")",
"WithReferrer",
"(",
"referrer",
"string",
")",
"*",
"NavigateParams",
"{",
"p",
".",
"Referrer",
"=",
"referrer",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
// WithReferrer referrer URL.
|
[
"WithReferrer",
"referrer",
"URL",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/page/page.go#L592-L595
|
test
|
chromedp/cdproto
|
page/page.go
|
WithTransitionType
|
func (p NavigateParams) WithTransitionType(transitionType TransitionType) *NavigateParams {
p.TransitionType = transitionType
return &p
}
|
go
|
func (p NavigateParams) WithTransitionType(transitionType TransitionType) *NavigateParams {
p.TransitionType = transitionType
return &p
}
|
[
"func",
"(",
"p",
"NavigateParams",
")",
"WithTransitionType",
"(",
"transitionType",
"TransitionType",
")",
"*",
"NavigateParams",
"{",
"p",
".",
"TransitionType",
"=",
"transitionType",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
// WithTransitionType intended transition type.
|
[
"WithTransitionType",
"intended",
"transition",
"type",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/page/page.go#L598-L601
|
test
|
chromedp/cdproto
|
page/page.go
|
WithFrameID
|
func (p NavigateParams) WithFrameID(frameID cdp.FrameID) *NavigateParams {
p.FrameID = frameID
return &p
}
|
go
|
func (p NavigateParams) WithFrameID(frameID cdp.FrameID) *NavigateParams {
p.FrameID = frameID
return &p
}
|
[
"func",
"(",
"p",
"NavigateParams",
")",
"WithFrameID",
"(",
"frameID",
"cdp",
".",
"FrameID",
")",
"*",
"NavigateParams",
"{",
"p",
".",
"FrameID",
"=",
"frameID",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
// WithFrameID frame id to navigate, if not specified navigates the top
// frame.
|
[
"WithFrameID",
"frame",
"id",
"to",
"navigate",
"if",
"not",
"specified",
"navigates",
"the",
"top",
"frame",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/page/page.go#L605-L608
|
test
|
chromedp/cdproto
|
page/page.go
|
Do
|
func (p *NavigateToHistoryEntryParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandNavigateToHistoryEntry, p, nil)
}
|
go
|
func (p *NavigateToHistoryEntryParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandNavigateToHistoryEntry, p, nil)
}
|
[
"func",
"(",
"p",
"*",
"NavigateToHistoryEntryParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandNavigateToHistoryEntry",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes Page.navigateToHistoryEntry against the provided context.
|
[
"Do",
"executes",
"Page",
".",
"navigateToHistoryEntry",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/page/page.go#L653-L655
|
test
|
chromedp/cdproto
|
page/page.go
|
WithLandscape
|
func (p PrintToPDFParams) WithLandscape(landscape bool) *PrintToPDFParams {
p.Landscape = landscape
return &p
}
|
go
|
func (p PrintToPDFParams) WithLandscape(landscape bool) *PrintToPDFParams {
p.Landscape = landscape
return &p
}
|
[
"func",
"(",
"p",
"PrintToPDFParams",
")",
"WithLandscape",
"(",
"landscape",
"bool",
")",
"*",
"PrintToPDFParams",
"{",
"p",
".",
"Landscape",
"=",
"landscape",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
// WithLandscape paper orientation. Defaults to false.
|
[
"WithLandscape",
"paper",
"orientation",
".",
"Defaults",
"to",
"false",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/page/page.go#L686-L689
|
test
|
chromedp/cdproto
|
page/page.go
|
WithDisplayHeaderFooter
|
func (p PrintToPDFParams) WithDisplayHeaderFooter(displayHeaderFooter bool) *PrintToPDFParams {
p.DisplayHeaderFooter = displayHeaderFooter
return &p
}
|
go
|
func (p PrintToPDFParams) WithDisplayHeaderFooter(displayHeaderFooter bool) *PrintToPDFParams {
p.DisplayHeaderFooter = displayHeaderFooter
return &p
}
|
[
"func",
"(",
"p",
"PrintToPDFParams",
")",
"WithDisplayHeaderFooter",
"(",
"displayHeaderFooter",
"bool",
")",
"*",
"PrintToPDFParams",
"{",
"p",
".",
"DisplayHeaderFooter",
"=",
"displayHeaderFooter",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
// WithDisplayHeaderFooter display header and footer. Defaults to false.
|
[
"WithDisplayHeaderFooter",
"display",
"header",
"and",
"footer",
".",
"Defaults",
"to",
"false",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/page/page.go#L692-L695
|
test
|
chromedp/cdproto
|
page/page.go
|
WithPrintBackground
|
func (p PrintToPDFParams) WithPrintBackground(printBackground bool) *PrintToPDFParams {
p.PrintBackground = printBackground
return &p
}
|
go
|
func (p PrintToPDFParams) WithPrintBackground(printBackground bool) *PrintToPDFParams {
p.PrintBackground = printBackground
return &p
}
|
[
"func",
"(",
"p",
"PrintToPDFParams",
")",
"WithPrintBackground",
"(",
"printBackground",
"bool",
")",
"*",
"PrintToPDFParams",
"{",
"p",
".",
"PrintBackground",
"=",
"printBackground",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
// WithPrintBackground print background graphics. Defaults to false.
|
[
"WithPrintBackground",
"print",
"background",
"graphics",
".",
"Defaults",
"to",
"false",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/page/page.go#L698-L701
|
test
|
chromedp/cdproto
|
page/page.go
|
WithScale
|
func (p PrintToPDFParams) WithScale(scale float64) *PrintToPDFParams {
p.Scale = scale
return &p
}
|
go
|
func (p PrintToPDFParams) WithScale(scale float64) *PrintToPDFParams {
p.Scale = scale
return &p
}
|
[
"func",
"(",
"p",
"PrintToPDFParams",
")",
"WithScale",
"(",
"scale",
"float64",
")",
"*",
"PrintToPDFParams",
"{",
"p",
".",
"Scale",
"=",
"scale",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
// WithScale scale of the webpage rendering. Defaults to 1.
|
[
"WithScale",
"scale",
"of",
"the",
"webpage",
"rendering",
".",
"Defaults",
"to",
"1",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/page/page.go#L704-L707
|
test
|
chromedp/cdproto
|
page/page.go
|
WithPaperWidth
|
func (p PrintToPDFParams) WithPaperWidth(paperWidth float64) *PrintToPDFParams {
p.PaperWidth = paperWidth
return &p
}
|
go
|
func (p PrintToPDFParams) WithPaperWidth(paperWidth float64) *PrintToPDFParams {
p.PaperWidth = paperWidth
return &p
}
|
[
"func",
"(",
"p",
"PrintToPDFParams",
")",
"WithPaperWidth",
"(",
"paperWidth",
"float64",
")",
"*",
"PrintToPDFParams",
"{",
"p",
".",
"PaperWidth",
"=",
"paperWidth",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
// WithPaperWidth paper width in inches. Defaults to 8.5 inches.
|
[
"WithPaperWidth",
"paper",
"width",
"in",
"inches",
".",
"Defaults",
"to",
"8",
".",
"5",
"inches",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/page/page.go#L710-L713
|
test
|
chromedp/cdproto
|
page/page.go
|
WithPaperHeight
|
func (p PrintToPDFParams) WithPaperHeight(paperHeight float64) *PrintToPDFParams {
p.PaperHeight = paperHeight
return &p
}
|
go
|
func (p PrintToPDFParams) WithPaperHeight(paperHeight float64) *PrintToPDFParams {
p.PaperHeight = paperHeight
return &p
}
|
[
"func",
"(",
"p",
"PrintToPDFParams",
")",
"WithPaperHeight",
"(",
"paperHeight",
"float64",
")",
"*",
"PrintToPDFParams",
"{",
"p",
".",
"PaperHeight",
"=",
"paperHeight",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
// WithPaperHeight paper height in inches. Defaults to 11 inches.
|
[
"WithPaperHeight",
"paper",
"height",
"in",
"inches",
".",
"Defaults",
"to",
"11",
"inches",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/page/page.go#L716-L719
|
test
|
chromedp/cdproto
|
page/page.go
|
WithIgnoreInvalidPageRanges
|
func (p PrintToPDFParams) WithIgnoreInvalidPageRanges(ignoreInvalidPageRanges bool) *PrintToPDFParams {
p.IgnoreInvalidPageRanges = ignoreInvalidPageRanges
return &p
}
|
go
|
func (p PrintToPDFParams) WithIgnoreInvalidPageRanges(ignoreInvalidPageRanges bool) *PrintToPDFParams {
p.IgnoreInvalidPageRanges = ignoreInvalidPageRanges
return &p
}
|
[
"func",
"(",
"p",
"PrintToPDFParams",
")",
"WithIgnoreInvalidPageRanges",
"(",
"ignoreInvalidPageRanges",
"bool",
")",
"*",
"PrintToPDFParams",
"{",
"p",
".",
"IgnoreInvalidPageRanges",
"=",
"ignoreInvalidPageRanges",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
// WithIgnoreInvalidPageRanges whether to silently ignore invalid but
// successfully parsed page ranges, such as '3-2'. Defaults to false.
|
[
"WithIgnoreInvalidPageRanges",
"whether",
"to",
"silently",
"ignore",
"invalid",
"but",
"successfully",
"parsed",
"page",
"ranges",
"such",
"as",
"3",
"-",
"2",
".",
"Defaults",
"to",
"false",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/page/page.go#L754-L757
|
test
|
chromedp/cdproto
|
page/page.go
|
WithFooterTemplate
|
func (p PrintToPDFParams) WithFooterTemplate(footerTemplate string) *PrintToPDFParams {
p.FooterTemplate = footerTemplate
return &p
}
|
go
|
func (p PrintToPDFParams) WithFooterTemplate(footerTemplate string) *PrintToPDFParams {
p.FooterTemplate = footerTemplate
return &p
}
|
[
"func",
"(",
"p",
"PrintToPDFParams",
")",
"WithFooterTemplate",
"(",
"footerTemplate",
"string",
")",
"*",
"PrintToPDFParams",
"{",
"p",
".",
"FooterTemplate",
"=",
"footerTemplate",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
// WithFooterTemplate HTML template for the print footer. Should use the same
// format as the headerTemplate.
|
[
"WithFooterTemplate",
"HTML",
"template",
"for",
"the",
"print",
"footer",
".",
"Should",
"use",
"the",
"same",
"format",
"as",
"the",
"headerTemplate",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/page/page.go#L772-L775
|
test
|
chromedp/cdproto
|
page/page.go
|
WithPreferCSSPageSize
|
func (p PrintToPDFParams) WithPreferCSSPageSize(preferCSSPageSize bool) *PrintToPDFParams {
p.PreferCSSPageSize = preferCSSPageSize
return &p
}
|
go
|
func (p PrintToPDFParams) WithPreferCSSPageSize(preferCSSPageSize bool) *PrintToPDFParams {
p.PreferCSSPageSize = preferCSSPageSize
return &p
}
|
[
"func",
"(",
"p",
"PrintToPDFParams",
")",
"WithPreferCSSPageSize",
"(",
"preferCSSPageSize",
"bool",
")",
"*",
"PrintToPDFParams",
"{",
"p",
".",
"PreferCSSPageSize",
"=",
"preferCSSPageSize",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
// WithPreferCSSPageSize whether or not to prefer page size as defined by
// css. Defaults to false, in which case the content will be scaled to fit the
// paper size.
|
[
"WithPreferCSSPageSize",
"whether",
"or",
"not",
"to",
"prefer",
"page",
"size",
"as",
"defined",
"by",
"css",
".",
"Defaults",
"to",
"false",
"in",
"which",
"case",
"the",
"content",
"will",
"be",
"scaled",
"to",
"fit",
"the",
"paper",
"size",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/page/page.go#L780-L783
|
test
|
chromedp/cdproto
|
page/page.go
|
WithScriptToEvaluateOnLoad
|
func (p ReloadParams) WithScriptToEvaluateOnLoad(scriptToEvaluateOnLoad string) *ReloadParams {
p.ScriptToEvaluateOnLoad = scriptToEvaluateOnLoad
return &p
}
|
go
|
func (p ReloadParams) WithScriptToEvaluateOnLoad(scriptToEvaluateOnLoad string) *ReloadParams {
p.ScriptToEvaluateOnLoad = scriptToEvaluateOnLoad
return &p
}
|
[
"func",
"(",
"p",
"ReloadParams",
")",
"WithScriptToEvaluateOnLoad",
"(",
"scriptToEvaluateOnLoad",
"string",
")",
"*",
"ReloadParams",
"{",
"p",
".",
"ScriptToEvaluateOnLoad",
"=",
"scriptToEvaluateOnLoad",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
// WithScriptToEvaluateOnLoad if set, the script will be injected into all
// frames of the inspected page after reload. Argument will be ignored if
// reloading dataURL origin.
|
[
"WithScriptToEvaluateOnLoad",
"if",
"set",
"the",
"script",
"will",
"be",
"injected",
"into",
"all",
"frames",
"of",
"the",
"inspected",
"page",
"after",
"reload",
".",
"Argument",
"will",
"be",
"ignored",
"if",
"reloading",
"dataURL",
"origin",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/page/page.go#L836-L839
|
test
|
chromedp/cdproto
|
page/page.go
|
Do
|
func (p *ReloadParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandReload, p, nil)
}
|
go
|
func (p *ReloadParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandReload, p, nil)
}
|
[
"func",
"(",
"p",
"*",
"ReloadParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandReload",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes Page.reload against the provided context.
|
[
"Do",
"executes",
"Page",
".",
"reload",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/page/page.go#L842-L844
|
test
|
chromedp/cdproto
|
page/page.go
|
Do
|
func (p *RemoveScriptToEvaluateOnNewDocumentParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandRemoveScriptToEvaluateOnNewDocument, p, nil)
}
|
go
|
func (p *RemoveScriptToEvaluateOnNewDocumentParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandRemoveScriptToEvaluateOnNewDocument, p, nil)
}
|
[
"func",
"(",
"p",
"*",
"RemoveScriptToEvaluateOnNewDocumentParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandRemoveScriptToEvaluateOnNewDocument",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes Page.removeScriptToEvaluateOnNewDocument against the provided context.
|
[
"Do",
"executes",
"Page",
".",
"removeScriptToEvaluateOnNewDocument",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/page/page.go#L865-L867
|
test
|
chromedp/cdproto
|
page/page.go
|
Do
|
func (p *ScreencastFrameAckParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandScreencastFrameAck, p, nil)
}
|
go
|
func (p *ScreencastFrameAckParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandScreencastFrameAck, p, nil)
}
|
[
"func",
"(",
"p",
"*",
"ScreencastFrameAckParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandScreencastFrameAck",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes Page.screencastFrameAck against the provided context.
|
[
"Do",
"executes",
"Page",
".",
"screencastFrameAck",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/page/page.go#L889-L891
|
test
|
chromedp/cdproto
|
page/page.go
|
Do
|
func (p *SetAdBlockingEnabledParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandSetAdBlockingEnabled, p, nil)
}
|
go
|
func (p *SetAdBlockingEnabledParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandSetAdBlockingEnabled, p, nil)
}
|
[
"func",
"(",
"p",
"*",
"SetAdBlockingEnabledParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandSetAdBlockingEnabled",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes Page.setAdBlockingEnabled against the provided context.
|
[
"Do",
"executes",
"Page",
".",
"setAdBlockingEnabled",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/page/page.go#L969-L971
|
test
|
chromedp/cdproto
|
page/page.go
|
Do
|
func (p *SetBypassCSPParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandSetBypassCSP, p, nil)
}
|
go
|
func (p *SetBypassCSPParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandSetBypassCSP, p, nil)
}
|
[
"func",
"(",
"p",
"*",
"SetBypassCSPParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandSetBypassCSP",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes Page.setBypassCSP against the provided context.
|
[
"Do",
"executes",
"Page",
".",
"setBypassCSP",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/page/page.go#L991-L993
|
test
|
chromedp/cdproto
|
page/page.go
|
Do
|
func (p *SetFontFamiliesParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandSetFontFamilies, p, nil)
}
|
go
|
func (p *SetFontFamiliesParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandSetFontFamilies, p, nil)
}
|
[
"func",
"(",
"p",
"*",
"SetFontFamiliesParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandSetFontFamilies",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes Page.setFontFamilies against the provided context.
|
[
"Do",
"executes",
"Page",
".",
"setFontFamilies",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/page/page.go#L1013-L1015
|
test
|
chromedp/cdproto
|
page/page.go
|
Do
|
func (p *SetFontSizesParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandSetFontSizes, p, nil)
}
|
go
|
func (p *SetFontSizesParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandSetFontSizes, p, nil)
}
|
[
"func",
"(",
"p",
"*",
"SetFontSizesParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandSetFontSizes",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes Page.setFontSizes against the provided context.
|
[
"Do",
"executes",
"Page",
".",
"setFontSizes",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/page/page.go#L1035-L1037
|
test
|
chromedp/cdproto
|
page/page.go
|
Do
|
func (p *SetDocumentContentParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandSetDocumentContent, p, nil)
}
|
go
|
func (p *SetDocumentContentParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandSetDocumentContent, p, nil)
}
|
[
"func",
"(",
"p",
"*",
"SetDocumentContentParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandSetDocumentContent",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes Page.setDocumentContent against the provided context.
|
[
"Do",
"executes",
"Page",
".",
"setDocumentContent",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/page/page.go#L1060-L1062
|
test
|
chromedp/cdproto
|
page/page.go
|
WithDownloadPath
|
func (p SetDownloadBehaviorParams) WithDownloadPath(downloadPath string) *SetDownloadBehaviorParams {
p.DownloadPath = downloadPath
return &p
}
|
go
|
func (p SetDownloadBehaviorParams) WithDownloadPath(downloadPath string) *SetDownloadBehaviorParams {
p.DownloadPath = downloadPath
return &p
}
|
[
"func",
"(",
"p",
"SetDownloadBehaviorParams",
")",
"WithDownloadPath",
"(",
"downloadPath",
"string",
")",
"*",
"SetDownloadBehaviorParams",
"{",
"p",
".",
"DownloadPath",
"=",
"downloadPath",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
// WithDownloadPath the default path to save downloaded files to. This is
// required if behavior is set to 'allow'.
|
[
"WithDownloadPath",
"the",
"default",
"path",
"to",
"save",
"downloaded",
"files",
"to",
".",
"This",
"is",
"required",
"if",
"behavior",
"is",
"set",
"to",
"allow",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/page/page.go#L1084-L1087
|
test
|
chromedp/cdproto
|
page/page.go
|
Do
|
func (p *SetDownloadBehaviorParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandSetDownloadBehavior, p, nil)
}
|
go
|
func (p *SetDownloadBehaviorParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandSetDownloadBehavior, p, nil)
}
|
[
"func",
"(",
"p",
"*",
"SetDownloadBehaviorParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandSetDownloadBehavior",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes Page.setDownloadBehavior against the provided context.
|
[
"Do",
"executes",
"Page",
".",
"setDownloadBehavior",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/page/page.go#L1090-L1092
|
test
|
chromedp/cdproto
|
page/page.go
|
Do
|
func (p *SetLifecycleEventsEnabledParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandSetLifecycleEventsEnabled, p, nil)
}
|
go
|
func (p *SetLifecycleEventsEnabledParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandSetLifecycleEventsEnabled, p, nil)
}
|
[
"func",
"(",
"p",
"*",
"SetLifecycleEventsEnabledParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandSetLifecycleEventsEnabled",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes Page.setLifecycleEventsEnabled against the provided context.
|
[
"Do",
"executes",
"Page",
".",
"setLifecycleEventsEnabled",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/page/page.go#L1114-L1116
|
test
|
chromedp/cdproto
|
page/page.go
|
WithFormat
|
func (p StartScreencastParams) WithFormat(format ScreencastFormat) *StartScreencastParams {
p.Format = format
return &p
}
|
go
|
func (p StartScreencastParams) WithFormat(format ScreencastFormat) *StartScreencastParams {
p.Format = format
return &p
}
|
[
"func",
"(",
"p",
"StartScreencastParams",
")",
"WithFormat",
"(",
"format",
"ScreencastFormat",
")",
"*",
"StartScreencastParams",
"{",
"p",
".",
"Format",
"=",
"format",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
// WithFormat image compression format.
|
[
"WithFormat",
"image",
"compression",
"format",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/page/page.go#L1138-L1141
|
test
|
chromedp/cdproto
|
page/page.go
|
WithMaxWidth
|
func (p StartScreencastParams) WithMaxWidth(maxWidth int64) *StartScreencastParams {
p.MaxWidth = maxWidth
return &p
}
|
go
|
func (p StartScreencastParams) WithMaxWidth(maxWidth int64) *StartScreencastParams {
p.MaxWidth = maxWidth
return &p
}
|
[
"func",
"(",
"p",
"StartScreencastParams",
")",
"WithMaxWidth",
"(",
"maxWidth",
"int64",
")",
"*",
"StartScreencastParams",
"{",
"p",
".",
"MaxWidth",
"=",
"maxWidth",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
// WithMaxWidth maximum screenshot width.
|
[
"WithMaxWidth",
"maximum",
"screenshot",
"width",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/page/page.go#L1150-L1153
|
test
|
chromedp/cdproto
|
page/page.go
|
WithMaxHeight
|
func (p StartScreencastParams) WithMaxHeight(maxHeight int64) *StartScreencastParams {
p.MaxHeight = maxHeight
return &p
}
|
go
|
func (p StartScreencastParams) WithMaxHeight(maxHeight int64) *StartScreencastParams {
p.MaxHeight = maxHeight
return &p
}
|
[
"func",
"(",
"p",
"StartScreencastParams",
")",
"WithMaxHeight",
"(",
"maxHeight",
"int64",
")",
"*",
"StartScreencastParams",
"{",
"p",
".",
"MaxHeight",
"=",
"maxHeight",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
// WithMaxHeight maximum screenshot height.
|
[
"WithMaxHeight",
"maximum",
"screenshot",
"height",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/page/page.go#L1156-L1159
|
test
|
chromedp/cdproto
|
page/page.go
|
WithEveryNthFrame
|
func (p StartScreencastParams) WithEveryNthFrame(everyNthFrame int64) *StartScreencastParams {
p.EveryNthFrame = everyNthFrame
return &p
}
|
go
|
func (p StartScreencastParams) WithEveryNthFrame(everyNthFrame int64) *StartScreencastParams {
p.EveryNthFrame = everyNthFrame
return &p
}
|
[
"func",
"(",
"p",
"StartScreencastParams",
")",
"WithEveryNthFrame",
"(",
"everyNthFrame",
"int64",
")",
"*",
"StartScreencastParams",
"{",
"p",
".",
"EveryNthFrame",
"=",
"everyNthFrame",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
// WithEveryNthFrame send every n-th frame.
|
[
"WithEveryNthFrame",
"send",
"every",
"n",
"-",
"th",
"frame",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/page/page.go#L1162-L1165
|
test
|
chromedp/cdproto
|
page/page.go
|
Do
|
func (p *StartScreencastParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandStartScreencast, p, nil)
}
|
go
|
func (p *StartScreencastParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandStartScreencast, p, nil)
}
|
[
"func",
"(",
"p",
"*",
"StartScreencastParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandStartScreencast",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes Page.startScreencast against the provided context.
|
[
"Do",
"executes",
"Page",
".",
"startScreencast",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/page/page.go#L1168-L1170
|
test
|
chromedp/cdproto
|
page/page.go
|
Do
|
func (p *StopLoadingParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandStopLoading, nil, nil)
}
|
go
|
func (p *StopLoadingParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandStopLoading, nil, nil)
}
|
[
"func",
"(",
"p",
"*",
"StopLoadingParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandStopLoading",
",",
"nil",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes Page.stopLoading against the provided context.
|
[
"Do",
"executes",
"Page",
".",
"stopLoading",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/page/page.go#L1185-L1187
|
test
|
chromedp/cdproto
|
page/page.go
|
Do
|
func (p *SetWebLifecycleStateParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandSetWebLifecycleState, p, nil)
}
|
go
|
func (p *SetWebLifecycleStateParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandSetWebLifecycleState, p, nil)
}
|
[
"func",
"(",
"p",
"*",
"SetWebLifecycleStateParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandSetWebLifecycleState",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes Page.setWebLifecycleState against the provided context.
|
[
"Do",
"executes",
"Page",
".",
"setWebLifecycleState",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/page/page.go#L1241-L1243
|
test
|
chromedp/cdproto
|
page/page.go
|
Do
|
func (p *StopScreencastParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandStopScreencast, nil, nil)
}
|
go
|
func (p *StopScreencastParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandStopScreencast, nil, nil)
}
|
[
"func",
"(",
"p",
"*",
"StopScreencastParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandStopScreencast",
",",
"nil",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes Page.stopScreencast against the provided context.
|
[
"Do",
"executes",
"Page",
".",
"stopScreencast",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/page/page.go#L1256-L1258
|
test
|
chromedp/cdproto
|
page/page.go
|
Do
|
func (p *SetProduceCompilationCacheParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandSetProduceCompilationCache, p, nil)
}
|
go
|
func (p *SetProduceCompilationCacheParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandSetProduceCompilationCache, p, nil)
}
|
[
"func",
"(",
"p",
"*",
"SetProduceCompilationCacheParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandSetProduceCompilationCache",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes Page.setProduceCompilationCache against the provided context.
|
[
"Do",
"executes",
"Page",
".",
"setProduceCompilationCache",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/page/page.go#L1280-L1282
|
test
|
chromedp/cdproto
|
page/page.go
|
Do
|
func (p *AddCompilationCacheParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandAddCompilationCache, p, nil)
}
|
go
|
func (p *AddCompilationCacheParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandAddCompilationCache, p, nil)
}
|
[
"func",
"(",
"p",
"*",
"AddCompilationCacheParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandAddCompilationCache",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes Page.addCompilationCache against the provided context.
|
[
"Do",
"executes",
"Page",
".",
"addCompilationCache",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/page/page.go#L1307-L1309
|
test
|
chromedp/cdproto
|
page/page.go
|
Do
|
func (p *ClearCompilationCacheParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandClearCompilationCache, nil, nil)
}
|
go
|
func (p *ClearCompilationCacheParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandClearCompilationCache, nil, nil)
}
|
[
"func",
"(",
"p",
"*",
"ClearCompilationCacheParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandClearCompilationCache",
",",
"nil",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes Page.clearCompilationCache against the provided context.
|
[
"Do",
"executes",
"Page",
".",
"clearCompilationCache",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/page/page.go#L1322-L1324
|
test
|
chromedp/cdproto
|
page/page.go
|
WithGroup
|
func (p GenerateTestReportParams) WithGroup(group string) *GenerateTestReportParams {
p.Group = group
return &p
}
|
go
|
func (p GenerateTestReportParams) WithGroup(group string) *GenerateTestReportParams {
p.Group = group
return &p
}
|
[
"func",
"(",
"p",
"GenerateTestReportParams",
")",
"WithGroup",
"(",
"group",
"string",
")",
"*",
"GenerateTestReportParams",
"{",
"p",
".",
"Group",
"=",
"group",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
// WithGroup specifies the endpoint group to deliver the report to.
|
[
"WithGroup",
"specifies",
"the",
"endpoint",
"group",
"to",
"deliver",
"the",
"report",
"to",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/page/page.go#L1345-L1348
|
test
|
chromedp/cdproto
|
page/page.go
|
Do
|
func (p *WaitForDebuggerParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandWaitForDebugger, nil, nil)
}
|
go
|
func (p *WaitForDebuggerParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandWaitForDebugger, nil, nil)
}
|
[
"func",
"(",
"p",
"*",
"WaitForDebuggerParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandWaitForDebugger",
",",
"nil",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes Page.waitForDebugger against the provided context.
|
[
"Do",
"executes",
"Page",
".",
"waitForDebugger",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/page/page.go#L1368-L1370
|
test
|
chromedp/cdproto
|
target/target.go
|
Do
|
func (p *ActivateTargetParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandActivateTarget, p, nil)
}
|
go
|
func (p *ActivateTargetParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandActivateTarget, p, nil)
}
|
[
"func",
"(",
"p",
"*",
"ActivateTargetParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandActivateTarget",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes Target.activateTarget against the provided context.
|
[
"Do",
"executes",
"Target",
".",
"activateTarget",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/target/target.go#L35-L37
|
test
|
chromedp/cdproto
|
target/target.go
|
WithBindingName
|
func (p ExposeDevToolsProtocolParams) WithBindingName(bindingName string) *ExposeDevToolsProtocolParams {
p.BindingName = bindingName
return &p
}
|
go
|
func (p ExposeDevToolsProtocolParams) WithBindingName(bindingName string) *ExposeDevToolsProtocolParams {
p.BindingName = bindingName
return &p
}
|
[
"func",
"(",
"p",
"ExposeDevToolsProtocolParams",
")",
"WithBindingName",
"(",
"bindingName",
"string",
")",
"*",
"ExposeDevToolsProtocolParams",
"{",
"p",
".",
"BindingName",
"=",
"bindingName",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
// WithBindingName binding name, 'cdp' if not specified.
|
[
"WithBindingName",
"binding",
"name",
"cdp",
"if",
"not",
"specified",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/target/target.go#L184-L187
|
test
|
chromedp/cdproto
|
target/target.go
|
Do
|
func (p *ExposeDevToolsProtocolParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandExposeDevToolsProtocol, p, nil)
}
|
go
|
func (p *ExposeDevToolsProtocolParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandExposeDevToolsProtocol, p, nil)
}
|
[
"func",
"(",
"p",
"*",
"ExposeDevToolsProtocolParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandExposeDevToolsProtocol",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes Target.exposeDevToolsProtocol against the provided context.
|
[
"Do",
"executes",
"Target",
".",
"exposeDevToolsProtocol",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/target/target.go#L190-L192
|
test
|
chromedp/cdproto
|
target/target.go
|
WithBrowserContextID
|
func (p CreateTargetParams) WithBrowserContextID(browserContextID BrowserContextID) *CreateTargetParams {
p.BrowserContextID = browserContextID
return &p
}
|
go
|
func (p CreateTargetParams) WithBrowserContextID(browserContextID BrowserContextID) *CreateTargetParams {
p.BrowserContextID = browserContextID
return &p
}
|
[
"func",
"(",
"p",
"CreateTargetParams",
")",
"WithBrowserContextID",
"(",
"browserContextID",
"BrowserContextID",
")",
"*",
"CreateTargetParams",
"{",
"p",
".",
"BrowserContextID",
"=",
"browserContextID",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
// WithBrowserContextID the browser context to create the page in.
|
[
"WithBrowserContextID",
"the",
"browser",
"context",
"to",
"create",
"the",
"page",
"in",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/target/target.go#L292-L295
|
test
|
chromedp/cdproto
|
target/target.go
|
WithSessionID
|
func (p DetachFromTargetParams) WithSessionID(sessionID SessionID) *DetachFromTargetParams {
p.SessionID = sessionID
return &p
}
|
go
|
func (p DetachFromTargetParams) WithSessionID(sessionID SessionID) *DetachFromTargetParams {
p.SessionID = sessionID
return &p
}
|
[
"func",
"(",
"p",
"DetachFromTargetParams",
")",
"WithSessionID",
"(",
"sessionID",
"SessionID",
")",
"*",
"DetachFromTargetParams",
"{",
"p",
".",
"SessionID",
"=",
"sessionID",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
// WithSessionID session to detach.
|
[
"WithSessionID",
"session",
"to",
"detach",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/target/target.go#L340-L343
|
test
|
chromedp/cdproto
|
target/target.go
|
Do
|
func (p *DetachFromTargetParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandDetachFromTarget, p, nil)
}
|
go
|
func (p *DetachFromTargetParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandDetachFromTarget, p, nil)
}
|
[
"func",
"(",
"p",
"*",
"DetachFromTargetParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandDetachFromTarget",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes Target.detachFromTarget against the provided context.
|
[
"Do",
"executes",
"Target",
".",
"detachFromTarget",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/target/target.go#L346-L348
|
test
|
chromedp/cdproto
|
target/target.go
|
Do
|
func (p *DisposeBrowserContextParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandDisposeBrowserContext, p, nil)
}
|
go
|
func (p *DisposeBrowserContextParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandDisposeBrowserContext, p, nil)
}
|
[
"func",
"(",
"p",
"*",
"DisposeBrowserContextParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandDisposeBrowserContext",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes Target.disposeBrowserContext against the provided context.
|
[
"Do",
"executes",
"Target",
".",
"disposeBrowserContext",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/target/target.go#L370-L372
|
test
|
chromedp/cdproto
|
target/target.go
|
WithSessionID
|
func (p SendMessageToTargetParams) WithSessionID(sessionID SessionID) *SendMessageToTargetParams {
p.SessionID = sessionID
return &p
}
|
go
|
func (p SendMessageToTargetParams) WithSessionID(sessionID SessionID) *SendMessageToTargetParams {
p.SessionID = sessionID
return &p
}
|
[
"func",
"(",
"p",
"SendMessageToTargetParams",
")",
"WithSessionID",
"(",
"sessionID",
"SessionID",
")",
"*",
"SendMessageToTargetParams",
"{",
"p",
".",
"SessionID",
"=",
"sessionID",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
// WithSessionID identifier of the session.
|
[
"WithSessionID",
"identifier",
"of",
"the",
"session",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/target/target.go#L464-L467
|
test
|
chromedp/cdproto
|
target/target.go
|
Do
|
func (p *SendMessageToTargetParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandSendMessageToTarget, p, nil)
}
|
go
|
func (p *SendMessageToTargetParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandSendMessageToTarget, p, nil)
}
|
[
"func",
"(",
"p",
"*",
"SendMessageToTargetParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandSendMessageToTarget",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes Target.sendMessageToTarget against the provided context.
|
[
"Do",
"executes",
"Target",
".",
"sendMessageToTarget",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/target/target.go#L470-L472
|
test
|
chromedp/cdproto
|
target/target.go
|
Do
|
func (p *SetAutoAttachParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandSetAutoAttach, p, nil)
}
|
go
|
func (p *SetAutoAttachParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandSetAutoAttach, p, nil)
}
|
[
"func",
"(",
"p",
"*",
"SetAutoAttachParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandSetAutoAttach",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes Target.setAutoAttach against the provided context.
|
[
"Do",
"executes",
"Target",
".",
"setAutoAttach",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/target/target.go#L509-L511
|
test
|
chromedp/cdproto
|
target/target.go
|
Do
|
func (p *SetDiscoverTargetsParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandSetDiscoverTargets, p, nil)
}
|
go
|
func (p *SetDiscoverTargetsParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandSetDiscoverTargets, p, nil)
}
|
[
"func",
"(",
"p",
"*",
"SetDiscoverTargetsParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandSetDiscoverTargets",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes Target.setDiscoverTargets against the provided context.
|
[
"Do",
"executes",
"Target",
".",
"setDiscoverTargets",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/target/target.go#L533-L535
|
test
|
chromedp/cdproto
|
target/target.go
|
Do
|
func (p *SetRemoteLocationsParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandSetRemoteLocations, p, nil)
}
|
go
|
func (p *SetRemoteLocationsParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandSetRemoteLocations, p, nil)
}
|
[
"func",
"(",
"p",
"*",
"SetRemoteLocationsParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandSetRemoteLocations",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes Target.setRemoteLocations against the provided context.
|
[
"Do",
"executes",
"Target",
".",
"setRemoteLocations",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/target/target.go#L557-L559
|
test
|
chromedp/cdproto
|
fetch/fetch.go
|
WithPatterns
|
func (p EnableParams) WithPatterns(patterns []*RequestPattern) *EnableParams {
p.Patterns = patterns
return &p
}
|
go
|
func (p EnableParams) WithPatterns(patterns []*RequestPattern) *EnableParams {
p.Patterns = patterns
return &p
}
|
[
"func",
"(",
"p",
"EnableParams",
")",
"WithPatterns",
"(",
"patterns",
"[",
"]",
"*",
"RequestPattern",
")",
"*",
"EnableParams",
"{",
"p",
".",
"Patterns",
"=",
"patterns",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
// WithPatterns if specified, only requests matching any of these patterns
// will produce fetchRequested event and will be paused until clients response.
// If not set, all requests will be affected.
|
[
"WithPatterns",
"if",
"specified",
"only",
"requests",
"matching",
"any",
"of",
"these",
"patterns",
"will",
"produce",
"fetchRequested",
"event",
"and",
"will",
"be",
"paused",
"until",
"clients",
"response",
".",
"If",
"not",
"set",
"all",
"requests",
"will",
"be",
"affected",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/fetch/fetch.go#L58-L61
|
test
|
chromedp/cdproto
|
fetch/fetch.go
|
WithHandleAuthRequests
|
func (p EnableParams) WithHandleAuthRequests(handleAuthRequests bool) *EnableParams {
p.HandleAuthRequests = handleAuthRequests
return &p
}
|
go
|
func (p EnableParams) WithHandleAuthRequests(handleAuthRequests bool) *EnableParams {
p.HandleAuthRequests = handleAuthRequests
return &p
}
|
[
"func",
"(",
"p",
"EnableParams",
")",
"WithHandleAuthRequests",
"(",
"handleAuthRequests",
"bool",
")",
"*",
"EnableParams",
"{",
"p",
".",
"HandleAuthRequests",
"=",
"handleAuthRequests",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
// WithHandleAuthRequests if true, authRequired events will be issued and
// requests will be paused expecting a call to continueWithAuth.
|
[
"WithHandleAuthRequests",
"if",
"true",
"authRequired",
"events",
"will",
"be",
"issued",
"and",
"requests",
"will",
"be",
"paused",
"expecting",
"a",
"call",
"to",
"continueWithAuth",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/fetch/fetch.go#L65-L68
|
test
|
chromedp/cdproto
|
fetch/fetch.go
|
Do
|
func (p *FailRequestParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandFailRequest, p, nil)
}
|
go
|
func (p *FailRequestParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandFailRequest, p, nil)
}
|
[
"func",
"(",
"p",
"*",
"FailRequestParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandFailRequest",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes Fetch.failRequest against the provided context.
|
[
"Do",
"executes",
"Fetch",
".",
"failRequest",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/fetch/fetch.go#L96-L98
|
test
|
chromedp/cdproto
|
fetch/fetch.go
|
WithBody
|
func (p FulfillRequestParams) WithBody(body string) *FulfillRequestParams {
p.Body = body
return &p
}
|
go
|
func (p FulfillRequestParams) WithBody(body string) *FulfillRequestParams {
p.Body = body
return &p
}
|
[
"func",
"(",
"p",
"FulfillRequestParams",
")",
"WithBody",
"(",
"body",
"string",
")",
"*",
"FulfillRequestParams",
"{",
"p",
".",
"Body",
"=",
"body",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
// WithBody a response body.
|
[
"WithBody",
"a",
"response",
"body",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/fetch/fetch.go#L126-L129
|
test
|
chromedp/cdproto
|
fetch/fetch.go
|
WithResponsePhrase
|
func (p FulfillRequestParams) WithResponsePhrase(responsePhrase string) *FulfillRequestParams {
p.ResponsePhrase = responsePhrase
return &p
}
|
go
|
func (p FulfillRequestParams) WithResponsePhrase(responsePhrase string) *FulfillRequestParams {
p.ResponsePhrase = responsePhrase
return &p
}
|
[
"func",
"(",
"p",
"FulfillRequestParams",
")",
"WithResponsePhrase",
"(",
"responsePhrase",
"string",
")",
"*",
"FulfillRequestParams",
"{",
"p",
".",
"ResponsePhrase",
"=",
"responsePhrase",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
// WithResponsePhrase a textual representation of responseCode. If absent, a
// standard phrase mathcing responseCode is used.
|
[
"WithResponsePhrase",
"a",
"textual",
"representation",
"of",
"responseCode",
".",
"If",
"absent",
"a",
"standard",
"phrase",
"mathcing",
"responseCode",
"is",
"used",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/fetch/fetch.go#L133-L136
|
test
|
chromedp/cdproto
|
fetch/fetch.go
|
Do
|
func (p *FulfillRequestParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandFulfillRequest, p, nil)
}
|
go
|
func (p *FulfillRequestParams) Do(ctx context.Context) (err error) {
return cdp.Execute(ctx, CommandFulfillRequest, p, nil)
}
|
[
"func",
"(",
"p",
"*",
"FulfillRequestParams",
")",
"Do",
"(",
"ctx",
"context",
".",
"Context",
")",
"(",
"err",
"error",
")",
"{",
"return",
"cdp",
".",
"Execute",
"(",
"ctx",
",",
"CommandFulfillRequest",
",",
"p",
",",
"nil",
")",
"\n",
"}"
] |
// Do executes Fetch.fulfillRequest against the provided context.
|
[
"Do",
"executes",
"Fetch",
".",
"fulfillRequest",
"against",
"the",
"provided",
"context",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/fetch/fetch.go#L139-L141
|
test
|
chromedp/cdproto
|
fetch/fetch.go
|
WithURL
|
func (p ContinueRequestParams) WithURL(url string) *ContinueRequestParams {
p.URL = url
return &p
}
|
go
|
func (p ContinueRequestParams) WithURL(url string) *ContinueRequestParams {
p.URL = url
return &p
}
|
[
"func",
"(",
"p",
"ContinueRequestParams",
")",
"WithURL",
"(",
"url",
"string",
")",
"*",
"ContinueRequestParams",
"{",
"p",
".",
"URL",
"=",
"url",
"\n",
"return",
"&",
"p",
"\n",
"}"
] |
// WithURL if set, the request url will be modified in a way that's not
// observable by page.
|
[
"WithURL",
"if",
"set",
"the",
"request",
"url",
"will",
"be",
"modified",
"in",
"a",
"way",
"that",
"s",
"not",
"observable",
"by",
"page",
"."
] |
d40c70bcdf242660a32f2eadf323662dd75378b5
|
https://github.com/chromedp/cdproto/blob/d40c70bcdf242660a32f2eadf323662dd75378b5/fetch/fetch.go#L168-L171
|
test
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.