Documentation ¶
Overview ¶
Package runtime provides the Chrome Debugging Protocol commands, types, and events for the Chrome Runtime domain.
Runtime domain exposes JavaScript runtime by means of remote evaluation and mirror objects. Evaluation results are returned as mirror object that expose object type, string representation and unique identifier that can be used for further object reference. Original objects are maintained in memory unless they are either explicitly released or are released along with the other objects in their object group.
Generated by the chromedp-gen command.
Index ¶
- Variables
- type APIType
- type AwaitPromiseParams
- func (p *AwaitPromiseParams) Do(ctxt context.Context, h cdp.FrameHandler) (result *RemoteObject, exceptionDetails *ExceptionDetails, err error)
- func (v AwaitPromiseParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v AwaitPromiseParams) MarshalJSON() ([]byte, error)
- func (v *AwaitPromiseParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *AwaitPromiseParams) UnmarshalJSON(data []byte) error
- func (p AwaitPromiseParams) WithGeneratePreview(generatePreview bool) *AwaitPromiseParams
- func (p AwaitPromiseParams) WithReturnByValue(returnByValue bool) *AwaitPromiseParams
- type AwaitPromiseReturns
- type CallArgument
- type CallFrame
- type CallFunctionOnParams
- func (p *CallFunctionOnParams) Do(ctxt context.Context, h cdp.FrameHandler) (result *RemoteObject, exceptionDetails *ExceptionDetails, err error)
- func (v CallFunctionOnParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v CallFunctionOnParams) MarshalJSON() ([]byte, error)
- func (v *CallFunctionOnParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *CallFunctionOnParams) UnmarshalJSON(data []byte) error
- func (p CallFunctionOnParams) WithArguments(arguments []*CallArgument) *CallFunctionOnParams
- func (p CallFunctionOnParams) WithAwaitPromise(awaitPromise bool) *CallFunctionOnParams
- func (p CallFunctionOnParams) WithGeneratePreview(generatePreview bool) *CallFunctionOnParams
- func (p CallFunctionOnParams) WithReturnByValue(returnByValue bool) *CallFunctionOnParams
- func (p CallFunctionOnParams) WithSilent(silent bool) *CallFunctionOnParams
- func (p CallFunctionOnParams) WithUserGesture(userGesture bool) *CallFunctionOnParams
- type CallFunctionOnReturns
- type CompileScriptParams
- func (p *CompileScriptParams) Do(ctxt context.Context, h cdp.FrameHandler) (scriptID ScriptID, exceptionDetails *ExceptionDetails, err error)
- func (v CompileScriptParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v CompileScriptParams) MarshalJSON() ([]byte, error)
- func (v *CompileScriptParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *CompileScriptParams) UnmarshalJSON(data []byte) error
- func (p CompileScriptParams) WithExecutionContextID(executionContextID ExecutionContextID) *CompileScriptParams
- type CompileScriptReturns
- type CustomPreview
- type DisableParams
- func (p *DisableParams) Do(ctxt context.Context, h cdp.FrameHandler) (err error)
- func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v DisableParams) MarshalJSON() ([]byte, error)
- func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *DisableParams) UnmarshalJSON(data []byte) error
- type DiscardConsoleEntriesParams
- func (p *DiscardConsoleEntriesParams) Do(ctxt context.Context, h cdp.FrameHandler) (err error)
- func (v DiscardConsoleEntriesParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v DiscardConsoleEntriesParams) MarshalJSON() ([]byte, error)
- func (v *DiscardConsoleEntriesParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *DiscardConsoleEntriesParams) UnmarshalJSON(data []byte) error
- type EnableParams
- func (p *EnableParams) Do(ctxt context.Context, h cdp.FrameHandler) (err error)
- func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v EnableParams) MarshalJSON() ([]byte, error)
- func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *EnableParams) UnmarshalJSON(data []byte) error
- type EntryPreview
- type EvaluateParams
- func (p *EvaluateParams) Do(ctxt context.Context, h cdp.FrameHandler) (result *RemoteObject, exceptionDetails *ExceptionDetails, err error)
- func (v EvaluateParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v EvaluateParams) MarshalJSON() ([]byte, error)
- func (v *EvaluateParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *EvaluateParams) UnmarshalJSON(data []byte) error
- func (p EvaluateParams) WithAwaitPromise(awaitPromise bool) *EvaluateParams
- func (p EvaluateParams) WithContextID(contextID ExecutionContextID) *EvaluateParams
- func (p EvaluateParams) WithGeneratePreview(generatePreview bool) *EvaluateParams
- func (p EvaluateParams) WithIncludeCommandLineAPI(includeCommandLineAPI bool) *EvaluateParams
- func (p EvaluateParams) WithObjectGroup(objectGroup string) *EvaluateParams
- func (p EvaluateParams) WithReturnByValue(returnByValue bool) *EvaluateParams
- func (p EvaluateParams) WithSilent(silent bool) *EvaluateParams
- func (p EvaluateParams) WithUserGesture(userGesture bool) *EvaluateParams
- type EvaluateReturns
- type EventConsoleAPICalled
- type EventExceptionRevoked
- type EventExceptionThrown
- type EventExecutionContextCreated
- type EventExecutionContextDestroyed
- type EventExecutionContextsCleared
- type EventInspectRequested
- type ExceptionDetails
- type ExecutionContextDescription
- type ExecutionContextID
- type GetPropertiesParams
- func (p *GetPropertiesParams) Do(ctxt context.Context, h cdp.FrameHandler) (result []*PropertyDescriptor, internalProperties []*InternalPropertyDescriptor, ...)
- func (v GetPropertiesParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v GetPropertiesParams) MarshalJSON() ([]byte, error)
- func (v *GetPropertiesParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *GetPropertiesParams) UnmarshalJSON(data []byte) error
- func (p GetPropertiesParams) WithAccessorPropertiesOnly(accessorPropertiesOnly bool) *GetPropertiesParams
- func (p GetPropertiesParams) WithGeneratePreview(generatePreview bool) *GetPropertiesParams
- func (p GetPropertiesParams) WithOwnProperties(ownProperties bool) *GetPropertiesParams
- type GetPropertiesReturns
- type InternalPropertyDescriptor
- type ObjectPreview
- type PropertyDescriptor
- type PropertyPreview
- type ReleaseObjectGroupParams
- func (p *ReleaseObjectGroupParams) Do(ctxt context.Context, h cdp.FrameHandler) (err error)
- func (v ReleaseObjectGroupParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v ReleaseObjectGroupParams) MarshalJSON() ([]byte, error)
- func (v *ReleaseObjectGroupParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *ReleaseObjectGroupParams) UnmarshalJSON(data []byte) error
- type ReleaseObjectParams
- func (p *ReleaseObjectParams) Do(ctxt context.Context, h cdp.FrameHandler) (err error)
- func (v ReleaseObjectParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v ReleaseObjectParams) MarshalJSON() ([]byte, error)
- func (v *ReleaseObjectParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *ReleaseObjectParams) UnmarshalJSON(data []byte) error
- type RemoteObject
- type RemoteObjectID
- type RunIfWaitingForDebuggerParams
- func (p *RunIfWaitingForDebuggerParams) Do(ctxt context.Context, h cdp.FrameHandler) (err error)
- func (v RunIfWaitingForDebuggerParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v RunIfWaitingForDebuggerParams) MarshalJSON() ([]byte, error)
- func (v *RunIfWaitingForDebuggerParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *RunIfWaitingForDebuggerParams) UnmarshalJSON(data []byte) error
- type RunScriptParams
- func (p *RunScriptParams) Do(ctxt context.Context, h cdp.FrameHandler) (result *RemoteObject, exceptionDetails *ExceptionDetails, err error)
- func (v RunScriptParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v RunScriptParams) MarshalJSON() ([]byte, error)
- func (v *RunScriptParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *RunScriptParams) UnmarshalJSON(data []byte) error
- func (p RunScriptParams) WithAwaitPromise(awaitPromise bool) *RunScriptParams
- func (p RunScriptParams) WithExecutionContextID(executionContextID ExecutionContextID) *RunScriptParams
- func (p RunScriptParams) WithGeneratePreview(generatePreview bool) *RunScriptParams
- func (p RunScriptParams) WithIncludeCommandLineAPI(includeCommandLineAPI bool) *RunScriptParams
- func (p RunScriptParams) WithObjectGroup(objectGroup string) *RunScriptParams
- func (p RunScriptParams) WithReturnByValue(returnByValue bool) *RunScriptParams
- func (p RunScriptParams) WithSilent(silent bool) *RunScriptParams
- type RunScriptReturns
- type ScriptID
- type SetCustomObjectFormatterEnabledParams
- func (p *SetCustomObjectFormatterEnabledParams) Do(ctxt context.Context, h cdp.FrameHandler) (err error)
- func (v SetCustomObjectFormatterEnabledParams) MarshalEasyJSON(w *jwriter.Writer)
- func (v SetCustomObjectFormatterEnabledParams) MarshalJSON() ([]byte, error)
- func (v *SetCustomObjectFormatterEnabledParams) UnmarshalEasyJSON(l *jlexer.Lexer)
- func (v *SetCustomObjectFormatterEnabledParams) UnmarshalJSON(data []byte) error
- type StackTrace
- type Subtype
- type Type
- type UnserializableValue
Constants ¶
This section is empty.
Variables ¶
var EventTypes = []cdp.MethodType{ cdp.EventRuntimeExecutionContextCreated, cdp.EventRuntimeExecutionContextDestroyed, cdp.EventRuntimeExecutionContextsCleared, cdp.EventRuntimeExceptionThrown, cdp.EventRuntimeExceptionRevoked, cdp.EventRuntimeConsoleAPICalled, cdp.EventRuntimeInspectRequested, }
EventTypes all event types in the domain.
Functions ¶
This section is empty.
Types ¶
type APIType ¶
type APIType string
APIType type of the call.
const ( APITypeLog APIType = "log" APITypeDebug APIType = "debug" APITypeInfo APIType = "info" APITypeError APIType = "error" APITypeWarning APIType = "warning" APITypeDir APIType = "dir" APITypeDirxml APIType = "dirxml" APITypeTable APIType = "table" APITypeTrace APIType = "trace" APITypeClear APIType = "clear" APITypeStartGroup APIType = "startGroup" APITypeStartGroupCollapsed APIType = "startGroupCollapsed" APITypeEndGroup APIType = "endGroup" APITypeAssert APIType = "assert" APITypeProfile APIType = "profile" APITypeProfileEnd APIType = "profileEnd" APITypeCount APIType = "count" APITypeTimeEnd APIType = "timeEnd" )
APIType values.
func (APIType) MarshalEasyJSON ¶
MarshalEasyJSON satisfies easyjson.Marshaler.
func (APIType) MarshalJSON ¶
MarshalJSON satisfies json.Marshaler.
func (*APIType) UnmarshalEasyJSON ¶
UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (*APIType) UnmarshalJSON ¶
UnmarshalJSON satisfies json.Unmarshaler.
type AwaitPromiseParams ¶
type AwaitPromiseParams struct { PromiseObjectID RemoteObjectID `json:"promiseObjectId"` // Identifier of the promise. ReturnByValue bool `json:"returnByValue,omitempty"` // Whether the result is expected to be a JSON object that should be sent by value. GeneratePreview bool `json:"generatePreview,omitempty"` // Whether preview should be generated for the result. }
AwaitPromiseParams add handler to promise with given promise object id.
func AwaitPromise ¶
func AwaitPromise(promiseObjectID RemoteObjectID) *AwaitPromiseParams
AwaitPromise add handler to promise with given promise object id.
parameters:
promiseObjectID - Identifier of the promise.
func (*AwaitPromiseParams) Do ¶
func (p *AwaitPromiseParams) Do(ctxt context.Context, h cdp.FrameHandler) (result *RemoteObject, exceptionDetails *ExceptionDetails, err error)
Do executes Runtime.awaitPromise.
returns:
result - Promise result. Will contain rejected value if promise was rejected. exceptionDetails - Exception details if stack strace is available.
func (AwaitPromiseParams) MarshalEasyJSON ¶
func (v AwaitPromiseParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (AwaitPromiseParams) MarshalJSON ¶
func (v AwaitPromiseParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*AwaitPromiseParams) UnmarshalEasyJSON ¶
func (v *AwaitPromiseParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*AwaitPromiseParams) UnmarshalJSON ¶
func (v *AwaitPromiseParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
func (AwaitPromiseParams) WithGeneratePreview ¶
func (p AwaitPromiseParams) WithGeneratePreview(generatePreview bool) *AwaitPromiseParams
WithGeneratePreview whether preview should be generated for the result.
func (AwaitPromiseParams) WithReturnByValue ¶
func (p AwaitPromiseParams) WithReturnByValue(returnByValue bool) *AwaitPromiseParams
WithReturnByValue whether the result is expected to be a JSON object that should be sent by value.
type AwaitPromiseReturns ¶
type AwaitPromiseReturns struct { Result *RemoteObject `json:"result,omitempty"` // Promise result. Will contain rejected value if promise was rejected. ExceptionDetails *ExceptionDetails `json:"exceptionDetails,omitempty"` // Exception details if stack strace is available. }
AwaitPromiseReturns return values.
func (AwaitPromiseReturns) MarshalEasyJSON ¶
func (v AwaitPromiseReturns) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (AwaitPromiseReturns) MarshalJSON ¶
func (v AwaitPromiseReturns) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*AwaitPromiseReturns) UnmarshalEasyJSON ¶
func (v *AwaitPromiseReturns) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*AwaitPromiseReturns) UnmarshalJSON ¶
func (v *AwaitPromiseReturns) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type CallArgument ¶
type CallArgument struct { Value easyjson.RawMessage `json:"value,omitempty"` // Primitive value. UnserializableValue UnserializableValue `json:"unserializableValue,omitempty"` // Primitive value which can not be JSON-stringified. ObjectID RemoteObjectID `json:"objectId,omitempty"` // Remote object handle. }
CallArgument represents function call argument. Either remote object id objectId, primitive value, unserializable primitive value or neither of (for undefined) them should be specified.
func (CallArgument) MarshalEasyJSON ¶
func (v CallArgument) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (CallArgument) MarshalJSON ¶
func (v CallArgument) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*CallArgument) UnmarshalEasyJSON ¶
func (v *CallArgument) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*CallArgument) UnmarshalJSON ¶
func (v *CallArgument) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type CallFrame ¶
type CallFrame struct { FunctionName string `json:"functionName,omitempty"` // JavaScript function name. ScriptID ScriptID `json:"scriptId,omitempty"` // JavaScript script id. URL string `json:"url,omitempty"` // JavaScript script name or url. LineNumber int64 `json:"lineNumber,omitempty"` // JavaScript script line number (0-based). ColumnNumber int64 `json:"columnNumber,omitempty"` // JavaScript script column number (0-based). }
CallFrame stack entry for runtime errors and assertions.
func (CallFrame) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (CallFrame) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*CallFrame) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*CallFrame) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type CallFunctionOnParams ¶
type CallFunctionOnParams struct { ObjectID RemoteObjectID `json:"objectId"` // Identifier of the object to call function on. FunctionDeclaration string `json:"functionDeclaration"` // Declaration of the function to call. Arguments []*CallArgument `json:"arguments,omitempty"` // Call arguments. All call arguments must belong to the same JavaScript world as the target object. Silent bool `json:"silent,omitempty"` // In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. ReturnByValue bool `json:"returnByValue,omitempty"` // Whether the result is expected to be a JSON object which should be sent by value. GeneratePreview bool `json:"generatePreview,omitempty"` // Whether preview should be generated for the result. UserGesture bool `json:"userGesture,omitempty"` // Whether execution should be treated as initiated by user in the UI. AwaitPromise bool `json:"awaitPromise,omitempty"` // Whether execution should wait for promise to be resolved. If the result of evaluation is not a Promise, it's considered to be an error. }
CallFunctionOnParams calls function with given declaration on the given object. Object group of the result is inherited from the target object.
func CallFunctionOn ¶
func CallFunctionOn(objectID RemoteObjectID, functionDeclaration string) *CallFunctionOnParams
CallFunctionOn calls function with given declaration on the given object. Object group of the result is inherited from the target object.
parameters:
objectID - Identifier of the object to call function on. functionDeclaration - Declaration of the function to call.
func (*CallFunctionOnParams) Do ¶
func (p *CallFunctionOnParams) Do(ctxt context.Context, h cdp.FrameHandler) (result *RemoteObject, exceptionDetails *ExceptionDetails, err error)
Do executes Runtime.callFunctionOn.
returns:
result - Call result. exceptionDetails - Exception details.
func (CallFunctionOnParams) MarshalEasyJSON ¶
func (v CallFunctionOnParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (CallFunctionOnParams) MarshalJSON ¶
func (v CallFunctionOnParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*CallFunctionOnParams) UnmarshalEasyJSON ¶
func (v *CallFunctionOnParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*CallFunctionOnParams) UnmarshalJSON ¶
func (v *CallFunctionOnParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
func (CallFunctionOnParams) WithArguments ¶
func (p CallFunctionOnParams) WithArguments(arguments []*CallArgument) *CallFunctionOnParams
WithArguments call arguments. All call arguments must belong to the same JavaScript world as the target object.
func (CallFunctionOnParams) WithAwaitPromise ¶
func (p CallFunctionOnParams) WithAwaitPromise(awaitPromise bool) *CallFunctionOnParams
WithAwaitPromise whether execution should wait for promise to be resolved. If the result of evaluation is not a Promise, it's considered to be an error.
func (CallFunctionOnParams) WithGeneratePreview ¶
func (p CallFunctionOnParams) WithGeneratePreview(generatePreview bool) *CallFunctionOnParams
WithGeneratePreview whether preview should be generated for the result.
func (CallFunctionOnParams) WithReturnByValue ¶
func (p CallFunctionOnParams) WithReturnByValue(returnByValue bool) *CallFunctionOnParams
WithReturnByValue whether the result is expected to be a JSON object which should be sent by value.
func (CallFunctionOnParams) WithSilent ¶
func (p CallFunctionOnParams) WithSilent(silent bool) *CallFunctionOnParams
WithSilent in silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state.
func (CallFunctionOnParams) WithUserGesture ¶
func (p CallFunctionOnParams) WithUserGesture(userGesture bool) *CallFunctionOnParams
WithUserGesture whether execution should be treated as initiated by user in the UI.
type CallFunctionOnReturns ¶
type CallFunctionOnReturns struct { Result *RemoteObject `json:"result,omitempty"` // Call result. ExceptionDetails *ExceptionDetails `json:"exceptionDetails,omitempty"` // Exception details. }
CallFunctionOnReturns return values.
func (CallFunctionOnReturns) MarshalEasyJSON ¶
func (v CallFunctionOnReturns) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (CallFunctionOnReturns) MarshalJSON ¶
func (v CallFunctionOnReturns) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*CallFunctionOnReturns) UnmarshalEasyJSON ¶
func (v *CallFunctionOnReturns) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*CallFunctionOnReturns) UnmarshalJSON ¶
func (v *CallFunctionOnReturns) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type CompileScriptParams ¶
type CompileScriptParams struct { Expression string `json:"expression"` // Expression to compile. SourceURL string `json:"sourceURL"` // Source url to be set for the script. PersistScript bool `json:"persistScript"` // Specifies whether the compiled script should be persisted. ExecutionContextID ExecutionContextID `json:"executionContextId,omitempty"` // Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page. }
CompileScriptParams compiles expression.
func CompileScript ¶
func CompileScript(expression string, sourceURL string, persistScript bool) *CompileScriptParams
CompileScript compiles expression.
parameters:
expression - Expression to compile. sourceURL - Source url to be set for the script. persistScript - Specifies whether the compiled script should be persisted.
func (*CompileScriptParams) Do ¶
func (p *CompileScriptParams) Do(ctxt context.Context, h cdp.FrameHandler) (scriptID ScriptID, exceptionDetails *ExceptionDetails, err error)
Do executes Runtime.compileScript.
returns:
scriptID - Id of the script. exceptionDetails - Exception details.
func (CompileScriptParams) MarshalEasyJSON ¶
func (v CompileScriptParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (CompileScriptParams) MarshalJSON ¶
func (v CompileScriptParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*CompileScriptParams) UnmarshalEasyJSON ¶
func (v *CompileScriptParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*CompileScriptParams) UnmarshalJSON ¶
func (v *CompileScriptParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
func (CompileScriptParams) WithExecutionContextID ¶
func (p CompileScriptParams) WithExecutionContextID(executionContextID ExecutionContextID) *CompileScriptParams
WithExecutionContextID specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page.
type CompileScriptReturns ¶
type CompileScriptReturns struct { ScriptID ScriptID `json:"scriptId,omitempty"` // Id of the script. ExceptionDetails *ExceptionDetails `json:"exceptionDetails,omitempty"` // Exception details. }
CompileScriptReturns return values.
func (CompileScriptReturns) MarshalEasyJSON ¶
func (v CompileScriptReturns) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (CompileScriptReturns) MarshalJSON ¶
func (v CompileScriptReturns) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*CompileScriptReturns) UnmarshalEasyJSON ¶
func (v *CompileScriptReturns) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*CompileScriptReturns) UnmarshalJSON ¶
func (v *CompileScriptReturns) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type CustomPreview ¶
type CustomPreview struct { Header string `json:"header,omitempty"` HasBody bool `json:"hasBody,omitempty"` FormatterObjectID RemoteObjectID `json:"formatterObjectId,omitempty"` BindRemoteObjectFunctionID RemoteObjectID `json:"bindRemoteObjectFunctionId,omitempty"` ConfigObjectID RemoteObjectID `json:"configObjectId,omitempty"` }
CustomPreview [no description].
func (CustomPreview) MarshalEasyJSON ¶
func (v CustomPreview) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (CustomPreview) MarshalJSON ¶
func (v CustomPreview) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*CustomPreview) UnmarshalEasyJSON ¶
func (v *CustomPreview) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*CustomPreview) UnmarshalJSON ¶
func (v *CustomPreview) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type DisableParams ¶
type DisableParams struct{}
DisableParams disables reporting of execution contexts creation.
func Disable ¶
func Disable() *DisableParams
Disable disables reporting of execution contexts creation.
func (*DisableParams) Do ¶
func (p *DisableParams) Do(ctxt context.Context, h cdp.FrameHandler) (err error)
Do executes Runtime.disable.
func (DisableParams) MarshalEasyJSON ¶
func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (DisableParams) MarshalJSON ¶
func (v DisableParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*DisableParams) UnmarshalEasyJSON ¶
func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*DisableParams) UnmarshalJSON ¶
func (v *DisableParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type DiscardConsoleEntriesParams ¶
type DiscardConsoleEntriesParams struct{}
DiscardConsoleEntriesParams discards collected exceptions and console API calls.
func DiscardConsoleEntries ¶
func DiscardConsoleEntries() *DiscardConsoleEntriesParams
DiscardConsoleEntries discards collected exceptions and console API calls.
func (*DiscardConsoleEntriesParams) Do ¶
func (p *DiscardConsoleEntriesParams) Do(ctxt context.Context, h cdp.FrameHandler) (err error)
Do executes Runtime.discardConsoleEntries.
func (DiscardConsoleEntriesParams) MarshalEasyJSON ¶
func (v DiscardConsoleEntriesParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (DiscardConsoleEntriesParams) MarshalJSON ¶
func (v DiscardConsoleEntriesParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*DiscardConsoleEntriesParams) UnmarshalEasyJSON ¶
func (v *DiscardConsoleEntriesParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*DiscardConsoleEntriesParams) UnmarshalJSON ¶
func (v *DiscardConsoleEntriesParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type EnableParams ¶
type EnableParams struct{}
EnableParams enables reporting of execution contexts creation by means of executionContextCreated event. When the reporting gets enabled the event will be sent immediately for each existing execution context.
func Enable ¶
func Enable() *EnableParams
Enable enables reporting of execution contexts creation by means of executionContextCreated event. When the reporting gets enabled the event will be sent immediately for each existing execution context.
func (*EnableParams) Do ¶
func (p *EnableParams) Do(ctxt context.Context, h cdp.FrameHandler) (err error)
Do executes Runtime.enable.
func (EnableParams) MarshalEasyJSON ¶
func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (EnableParams) MarshalJSON ¶
func (v EnableParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*EnableParams) UnmarshalEasyJSON ¶
func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*EnableParams) UnmarshalJSON ¶
func (v *EnableParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type EntryPreview ¶
type EntryPreview struct { Key *ObjectPreview `json:"key,omitempty"` // Preview of the key. Specified for map-like collection entries. Value *ObjectPreview `json:"value,omitempty"` // Preview of the value. }
EntryPreview [no description].
func (EntryPreview) MarshalEasyJSON ¶
func (v EntryPreview) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (EntryPreview) MarshalJSON ¶
func (v EntryPreview) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*EntryPreview) UnmarshalEasyJSON ¶
func (v *EntryPreview) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*EntryPreview) UnmarshalJSON ¶
func (v *EntryPreview) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type EvaluateParams ¶
type EvaluateParams struct { Expression string `json:"expression"` // Expression to evaluate. ObjectGroup string `json:"objectGroup,omitempty"` // Symbolic group name that can be used to release multiple objects. IncludeCommandLineAPI bool `json:"includeCommandLineAPI,omitempty"` // Determines whether Command Line API should be available during the evaluation. Silent bool `json:"silent,omitempty"` // In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. ContextID ExecutionContextID `json:"contextId,omitempty"` // 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. ReturnByValue bool `json:"returnByValue,omitempty"` // Whether the result is expected to be a JSON object that should be sent by value. GeneratePreview bool `json:"generatePreview,omitempty"` // Whether preview should be generated for the result. UserGesture bool `json:"userGesture,omitempty"` // Whether execution should be treated as initiated by user in the UI. AwaitPromise bool `json:"awaitPromise,omitempty"` // Whether execution should wait for promise to be resolved. If the result of evaluation is not a Promise, it's considered to be an error. }
EvaluateParams evaluates expression on global object.
func Evaluate ¶
func Evaluate(expression string) *EvaluateParams
Evaluate evaluates expression on global object.
parameters:
expression - Expression to evaluate.
func (*EvaluateParams) Do ¶
func (p *EvaluateParams) Do(ctxt context.Context, h cdp.FrameHandler) (result *RemoteObject, exceptionDetails *ExceptionDetails, err error)
Do executes Runtime.evaluate.
returns:
result - Evaluation result. exceptionDetails - Exception details.
func (EvaluateParams) MarshalEasyJSON ¶
func (v EvaluateParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (EvaluateParams) MarshalJSON ¶
func (v EvaluateParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*EvaluateParams) UnmarshalEasyJSON ¶
func (v *EvaluateParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*EvaluateParams) UnmarshalJSON ¶
func (v *EvaluateParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
func (EvaluateParams) WithAwaitPromise ¶
func (p EvaluateParams) WithAwaitPromise(awaitPromise bool) *EvaluateParams
WithAwaitPromise whether execution should wait for promise to be resolved. If the result of evaluation is not a Promise, it's considered to be an error.
func (EvaluateParams) WithContextID ¶
func (p EvaluateParams) WithContextID(contextID ExecutionContextID) *EvaluateParams
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.
func (EvaluateParams) WithGeneratePreview ¶
func (p EvaluateParams) WithGeneratePreview(generatePreview bool) *EvaluateParams
WithGeneratePreview whether preview should be generated for the result.
func (EvaluateParams) WithIncludeCommandLineAPI ¶
func (p EvaluateParams) WithIncludeCommandLineAPI(includeCommandLineAPI bool) *EvaluateParams
WithIncludeCommandLineAPI determines whether Command Line API should be available during the evaluation.
func (EvaluateParams) WithObjectGroup ¶
func (p EvaluateParams) WithObjectGroup(objectGroup string) *EvaluateParams
WithObjectGroup symbolic group name that can be used to release multiple objects.
func (EvaluateParams) WithReturnByValue ¶
func (p EvaluateParams) WithReturnByValue(returnByValue bool) *EvaluateParams
WithReturnByValue whether the result is expected to be a JSON object that should be sent by value.
func (EvaluateParams) WithSilent ¶
func (p EvaluateParams) WithSilent(silent bool) *EvaluateParams
WithSilent in silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state.
func (EvaluateParams) WithUserGesture ¶
func (p EvaluateParams) WithUserGesture(userGesture bool) *EvaluateParams
WithUserGesture whether execution should be treated as initiated by user in the UI.
type EvaluateReturns ¶
type EvaluateReturns struct { Result *RemoteObject `json:"result,omitempty"` // Evaluation result. ExceptionDetails *ExceptionDetails `json:"exceptionDetails,omitempty"` // Exception details. }
EvaluateReturns return values.
func (EvaluateReturns) MarshalEasyJSON ¶
func (v EvaluateReturns) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (EvaluateReturns) MarshalJSON ¶
func (v EvaluateReturns) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*EvaluateReturns) UnmarshalEasyJSON ¶
func (v *EvaluateReturns) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*EvaluateReturns) UnmarshalJSON ¶
func (v *EvaluateReturns) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type EventConsoleAPICalled ¶
type EventConsoleAPICalled struct { Type APIType `json:"type,omitempty"` // Type of the call. Args []*RemoteObject `json:"args,omitempty"` // Call arguments. ExecutionContextID ExecutionContextID `json:"executionContextId,omitempty"` // Identifier of the context where the call was made. Timestamp cdp.Timestamp `json:"timestamp,omitempty"` // Call timestamp. StackTrace *StackTrace `json:"stackTrace,omitempty"` // Stack trace captured when the call was made. }
EventConsoleAPICalled issued when console API was called.
func (EventConsoleAPICalled) MarshalEasyJSON ¶
func (v EventConsoleAPICalled) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (EventConsoleAPICalled) MarshalJSON ¶
func (v EventConsoleAPICalled) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*EventConsoleAPICalled) UnmarshalEasyJSON ¶
func (v *EventConsoleAPICalled) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*EventConsoleAPICalled) UnmarshalJSON ¶
func (v *EventConsoleAPICalled) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type EventExceptionRevoked ¶
type EventExceptionRevoked struct { Reason string `json:"reason,omitempty"` // Reason describing why exception was revoked. ExceptionID int64 `json:"exceptionId,omitempty"` // The id of revoked exception, as reported in exceptionUnhandled. }
EventExceptionRevoked issued when unhandled exception was revoked.
func (EventExceptionRevoked) MarshalEasyJSON ¶
func (v EventExceptionRevoked) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (EventExceptionRevoked) MarshalJSON ¶
func (v EventExceptionRevoked) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*EventExceptionRevoked) UnmarshalEasyJSON ¶
func (v *EventExceptionRevoked) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*EventExceptionRevoked) UnmarshalJSON ¶
func (v *EventExceptionRevoked) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type EventExceptionThrown ¶
type EventExceptionThrown struct { Timestamp cdp.Timestamp `json:"timestamp,omitempty"` // Timestamp of the exception. ExceptionDetails *ExceptionDetails `json:"exceptionDetails,omitempty"` }
EventExceptionThrown issued when exception was thrown and unhandled.
func (EventExceptionThrown) MarshalEasyJSON ¶
func (v EventExceptionThrown) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (EventExceptionThrown) MarshalJSON ¶
func (v EventExceptionThrown) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*EventExceptionThrown) UnmarshalEasyJSON ¶
func (v *EventExceptionThrown) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*EventExceptionThrown) UnmarshalJSON ¶
func (v *EventExceptionThrown) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type EventExecutionContextCreated ¶
type EventExecutionContextCreated struct {
Context *ExecutionContextDescription `json:"context,omitempty"` // A newly created execution contex.
}
EventExecutionContextCreated issued when new execution context is created.
func (EventExecutionContextCreated) MarshalEasyJSON ¶
func (v EventExecutionContextCreated) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (EventExecutionContextCreated) MarshalJSON ¶
func (v EventExecutionContextCreated) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*EventExecutionContextCreated) UnmarshalEasyJSON ¶
func (v *EventExecutionContextCreated) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*EventExecutionContextCreated) UnmarshalJSON ¶
func (v *EventExecutionContextCreated) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type EventExecutionContextDestroyed ¶
type EventExecutionContextDestroyed struct {
ExecutionContextID ExecutionContextID `json:"executionContextId,omitempty"` // Id of the destroyed context
}
EventExecutionContextDestroyed issued when execution context is destroyed.
func (EventExecutionContextDestroyed) MarshalEasyJSON ¶
func (v EventExecutionContextDestroyed) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (EventExecutionContextDestroyed) MarshalJSON ¶
func (v EventExecutionContextDestroyed) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*EventExecutionContextDestroyed) UnmarshalEasyJSON ¶
func (v *EventExecutionContextDestroyed) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*EventExecutionContextDestroyed) UnmarshalJSON ¶
func (v *EventExecutionContextDestroyed) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type EventExecutionContextsCleared ¶
type EventExecutionContextsCleared struct{}
EventExecutionContextsCleared issued when all executionContexts were cleared in browser.
func (EventExecutionContextsCleared) MarshalEasyJSON ¶
func (v EventExecutionContextsCleared) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (EventExecutionContextsCleared) MarshalJSON ¶
func (v EventExecutionContextsCleared) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*EventExecutionContextsCleared) UnmarshalEasyJSON ¶
func (v *EventExecutionContextsCleared) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*EventExecutionContextsCleared) UnmarshalJSON ¶
func (v *EventExecutionContextsCleared) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type EventInspectRequested ¶
type EventInspectRequested struct { Object *RemoteObject `json:"object,omitempty"` Hints easyjson.RawMessage `json:"hints,omitempty"` }
EventInspectRequested issued when object should be inspected (for example, as a result of inspect() command line API call).
func (EventInspectRequested) MarshalEasyJSON ¶
func (v EventInspectRequested) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (EventInspectRequested) MarshalJSON ¶
func (v EventInspectRequested) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*EventInspectRequested) UnmarshalEasyJSON ¶
func (v *EventInspectRequested) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*EventInspectRequested) UnmarshalJSON ¶
func (v *EventInspectRequested) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type ExceptionDetails ¶
type ExceptionDetails struct { ExceptionID int64 `json:"exceptionId,omitempty"` // Exception id. Text string `json:"text,omitempty"` // Exception text, which should be used together with exception object when available. LineNumber int64 `json:"lineNumber,omitempty"` // Line number of the exception location (0-based). ColumnNumber int64 `json:"columnNumber,omitempty"` // Column number of the exception location (0-based). ScriptID ScriptID `json:"scriptId,omitempty"` // Script ID of the exception location. URL string `json:"url,omitempty"` // URL of the exception location, to be used when the script was not reported. StackTrace *StackTrace `json:"stackTrace,omitempty"` // JavaScript stack trace if available. Exception *RemoteObject `json:"exception,omitempty"` // Exception object if available. ExecutionContextID ExecutionContextID `json:"executionContextId,omitempty"` // Identifier of the context where exception happened. }
ExceptionDetails detailed information about exception (or error) that was thrown during script compilation or execution.
func (ExceptionDetails) MarshalEasyJSON ¶
func (v ExceptionDetails) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (ExceptionDetails) MarshalJSON ¶
func (v ExceptionDetails) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*ExceptionDetails) UnmarshalEasyJSON ¶
func (v *ExceptionDetails) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*ExceptionDetails) UnmarshalJSON ¶
func (v *ExceptionDetails) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type ExecutionContextDescription ¶
type ExecutionContextDescription struct { ID ExecutionContextID `json:"id,omitempty"` // Unique id of the execution context. It can be used to specify in which execution context script evaluation should be performed. Origin string `json:"origin,omitempty"` // Execution context origin. Name string `json:"name,omitempty"` // Human readable name describing given context. AuxData easyjson.RawMessage `json:"auxData,omitempty"` }
ExecutionContextDescription description of an isolated world.
func (ExecutionContextDescription) MarshalEasyJSON ¶
func (v ExecutionContextDescription) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (ExecutionContextDescription) MarshalJSON ¶
func (v ExecutionContextDescription) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*ExecutionContextDescription) UnmarshalEasyJSON ¶
func (v *ExecutionContextDescription) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*ExecutionContextDescription) UnmarshalJSON ¶
func (v *ExecutionContextDescription) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type ExecutionContextID ¶
type ExecutionContextID int64
ExecutionContextID id of an execution context.
func (ExecutionContextID) Int64 ¶
func (t ExecutionContextID) Int64() int64
Int64 returns the ExecutionContextID as int64 value.
type GetPropertiesParams ¶
type GetPropertiesParams struct { ObjectID RemoteObjectID `json:"objectId"` // Identifier of the object to return properties for. OwnProperties bool `json:"ownProperties,omitempty"` // If true, returns properties belonging only to the element itself, not to its prototype chain. AccessorPropertiesOnly bool `json:"accessorPropertiesOnly,omitempty"` // If true, returns accessor properties (with getter/setter) only; internal properties are not returned either. GeneratePreview bool `json:"generatePreview,omitempty"` // Whether preview should be generated for the results. }
GetPropertiesParams returns properties of a given object. Object group of the result is inherited from the target object.
func GetProperties ¶
func GetProperties(objectID RemoteObjectID) *GetPropertiesParams
GetProperties returns properties of a given object. Object group of the result is inherited from the target object.
parameters:
objectID - Identifier of the object to return properties for.
func (*GetPropertiesParams) Do ¶
func (p *GetPropertiesParams) Do(ctxt context.Context, h cdp.FrameHandler) (result []*PropertyDescriptor, internalProperties []*InternalPropertyDescriptor, exceptionDetails *ExceptionDetails, err error)
Do executes Runtime.getProperties.
returns:
result - Object properties. internalProperties - Internal object properties (only of the element itself). exceptionDetails - Exception details.
func (GetPropertiesParams) MarshalEasyJSON ¶
func (v GetPropertiesParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (GetPropertiesParams) MarshalJSON ¶
func (v GetPropertiesParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*GetPropertiesParams) UnmarshalEasyJSON ¶
func (v *GetPropertiesParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*GetPropertiesParams) UnmarshalJSON ¶
func (v *GetPropertiesParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
func (GetPropertiesParams) WithAccessorPropertiesOnly ¶
func (p GetPropertiesParams) WithAccessorPropertiesOnly(accessorPropertiesOnly bool) *GetPropertiesParams
WithAccessorPropertiesOnly if true, returns accessor properties (with getter/setter) only; internal properties are not returned either.
func (GetPropertiesParams) WithGeneratePreview ¶
func (p GetPropertiesParams) WithGeneratePreview(generatePreview bool) *GetPropertiesParams
WithGeneratePreview whether preview should be generated for the results.
func (GetPropertiesParams) WithOwnProperties ¶
func (p GetPropertiesParams) WithOwnProperties(ownProperties bool) *GetPropertiesParams
WithOwnProperties if true, returns properties belonging only to the element itself, not to its prototype chain.
type GetPropertiesReturns ¶
type GetPropertiesReturns struct { Result []*PropertyDescriptor `json:"result,omitempty"` // Object properties. InternalProperties []*InternalPropertyDescriptor `json:"internalProperties,omitempty"` // Internal object properties (only of the element itself). ExceptionDetails *ExceptionDetails `json:"exceptionDetails,omitempty"` // Exception details. }
GetPropertiesReturns return values.
func (GetPropertiesReturns) MarshalEasyJSON ¶
func (v GetPropertiesReturns) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (GetPropertiesReturns) MarshalJSON ¶
func (v GetPropertiesReturns) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*GetPropertiesReturns) UnmarshalEasyJSON ¶
func (v *GetPropertiesReturns) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*GetPropertiesReturns) UnmarshalJSON ¶
func (v *GetPropertiesReturns) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type InternalPropertyDescriptor ¶
type InternalPropertyDescriptor struct { Name string `json:"name,omitempty"` // Conventional property name. Value *RemoteObject `json:"value,omitempty"` // The value associated with the property. }
InternalPropertyDescriptor object internal property descriptor. This property isn't normally visible in JavaScript code.
func (InternalPropertyDescriptor) MarshalEasyJSON ¶
func (v InternalPropertyDescriptor) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (InternalPropertyDescriptor) MarshalJSON ¶
func (v InternalPropertyDescriptor) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*InternalPropertyDescriptor) UnmarshalEasyJSON ¶
func (v *InternalPropertyDescriptor) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*InternalPropertyDescriptor) UnmarshalJSON ¶
func (v *InternalPropertyDescriptor) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type ObjectPreview ¶
type ObjectPreview struct { Type Type `json:"type,omitempty"` // Object type. Subtype Subtype `json:"subtype,omitempty"` // Object subtype hint. Specified for object type values only. Description string `json:"description,omitempty"` // String representation of the object. Overflow bool `json:"overflow,omitempty"` // True iff some of the properties or entries of the original object did not fit. Properties []*PropertyPreview `json:"properties,omitempty"` // List of the properties. Entries []*EntryPreview `json:"entries,omitempty"` // List of the entries. Specified for map and set subtype values only. }
ObjectPreview object containing abbreviated remote object value.
func (ObjectPreview) MarshalEasyJSON ¶
func (v ObjectPreview) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (ObjectPreview) MarshalJSON ¶
func (v ObjectPreview) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*ObjectPreview) UnmarshalEasyJSON ¶
func (v *ObjectPreview) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*ObjectPreview) UnmarshalJSON ¶
func (v *ObjectPreview) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type PropertyDescriptor ¶
type PropertyDescriptor struct { Name string `json:"name,omitempty"` // Property name or symbol description. Value *RemoteObject `json:"value,omitempty"` // The value associated with the property. Writable bool `json:"writable,omitempty"` // True if the value associated with the property may be changed (data descriptors only). Get *RemoteObject `json:"get,omitempty"` // A function which serves as a getter for the property, or undefined if there is no getter (accessor descriptors only). Set *RemoteObject `json:"set,omitempty"` // A function which serves as a setter for the property, or undefined if there is no setter (accessor descriptors only). Configurable bool `json:"configurable,omitempty"` // True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object. Enumerable bool `json:"enumerable,omitempty"` // True if this property shows up during enumeration of the properties on the corresponding object. WasThrown bool `json:"wasThrown,omitempty"` // True if the result was thrown during the evaluation. IsOwn bool `json:"isOwn,omitempty"` // True if the property is owned for the object. Symbol *RemoteObject `json:"symbol,omitempty"` // Property symbol object, if the property is of the symbol type. }
PropertyDescriptor object property descriptor.
func (PropertyDescriptor) MarshalEasyJSON ¶
func (v PropertyDescriptor) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (PropertyDescriptor) MarshalJSON ¶
func (v PropertyDescriptor) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*PropertyDescriptor) UnmarshalEasyJSON ¶
func (v *PropertyDescriptor) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*PropertyDescriptor) UnmarshalJSON ¶
func (v *PropertyDescriptor) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type PropertyPreview ¶
type PropertyPreview struct { Name string `json:"name,omitempty"` // Property name. Type Type `json:"type,omitempty"` // Object type. Accessor means that the property itself is an accessor property. Value string `json:"value,omitempty"` // User-friendly property value string. ValuePreview *ObjectPreview `json:"valuePreview,omitempty"` // Nested value preview. Subtype Subtype `json:"subtype,omitempty"` // Object subtype hint. Specified for object type values only. }
PropertyPreview [no description].
func (PropertyPreview) MarshalEasyJSON ¶
func (v PropertyPreview) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (PropertyPreview) MarshalJSON ¶
func (v PropertyPreview) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*PropertyPreview) UnmarshalEasyJSON ¶
func (v *PropertyPreview) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*PropertyPreview) UnmarshalJSON ¶
func (v *PropertyPreview) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type ReleaseObjectGroupParams ¶
type ReleaseObjectGroupParams struct {
ObjectGroup string `json:"objectGroup"` // Symbolic object group name.
}
ReleaseObjectGroupParams releases all remote objects that belong to a given group.
func ReleaseObjectGroup ¶
func ReleaseObjectGroup(objectGroup string) *ReleaseObjectGroupParams
ReleaseObjectGroup releases all remote objects that belong to a given group.
parameters:
objectGroup - Symbolic object group name.
func (*ReleaseObjectGroupParams) Do ¶
func (p *ReleaseObjectGroupParams) Do(ctxt context.Context, h cdp.FrameHandler) (err error)
Do executes Runtime.releaseObjectGroup.
func (ReleaseObjectGroupParams) MarshalEasyJSON ¶
func (v ReleaseObjectGroupParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (ReleaseObjectGroupParams) MarshalJSON ¶
func (v ReleaseObjectGroupParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*ReleaseObjectGroupParams) UnmarshalEasyJSON ¶
func (v *ReleaseObjectGroupParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*ReleaseObjectGroupParams) UnmarshalJSON ¶
func (v *ReleaseObjectGroupParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type ReleaseObjectParams ¶
type ReleaseObjectParams struct {
ObjectID RemoteObjectID `json:"objectId"` // Identifier of the object to release.
}
ReleaseObjectParams releases remote object with given id.
func ReleaseObject ¶
func ReleaseObject(objectID RemoteObjectID) *ReleaseObjectParams
ReleaseObject releases remote object with given id.
parameters:
objectID - Identifier of the object to release.
func (*ReleaseObjectParams) Do ¶
func (p *ReleaseObjectParams) Do(ctxt context.Context, h cdp.FrameHandler) (err error)
Do executes Runtime.releaseObject.
func (ReleaseObjectParams) MarshalEasyJSON ¶
func (v ReleaseObjectParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (ReleaseObjectParams) MarshalJSON ¶
func (v ReleaseObjectParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*ReleaseObjectParams) UnmarshalEasyJSON ¶
func (v *ReleaseObjectParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*ReleaseObjectParams) UnmarshalJSON ¶
func (v *ReleaseObjectParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type RemoteObject ¶
type RemoteObject struct { Type Type `json:"type,omitempty"` // Object type. Subtype Subtype `json:"subtype,omitempty"` // Object subtype hint. Specified for object type values only. ClassName string `json:"className,omitempty"` // Object class (constructor) name. Specified for object type values only. Value easyjson.RawMessage `json:"value,omitempty"` // Remote object value in case of primitive values or JSON values (if it was requested). UnserializableValue UnserializableValue `json:"unserializableValue,omitempty"` // Primitive value which can not be JSON-stringified does not have value, but gets this property. Description string `json:"description,omitempty"` // String representation of the object. ObjectID RemoteObjectID `json:"objectId,omitempty"` // Unique object identifier (for non-primitive values). Preview *ObjectPreview `json:"preview,omitempty"` // Preview containing abbreviated property values. Specified for object type values only. CustomPreview *CustomPreview `json:"customPreview,omitempty"` }
RemoteObject mirror object referencing original JavaScript object.
func (RemoteObject) MarshalEasyJSON ¶
func (v RemoteObject) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (RemoteObject) MarshalJSON ¶
func (v RemoteObject) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*RemoteObject) UnmarshalEasyJSON ¶
func (v *RemoteObject) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*RemoteObject) UnmarshalJSON ¶
func (v *RemoteObject) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type RemoteObjectID ¶
type RemoteObjectID string
RemoteObjectID unique object identifier.
func (RemoteObjectID) String ¶
func (t RemoteObjectID) String() string
String returns the RemoteObjectID as string value.
type RunIfWaitingForDebuggerParams ¶
type RunIfWaitingForDebuggerParams struct{}
RunIfWaitingForDebuggerParams tells inspected instance to run if it was waiting for debugger to attach.
func RunIfWaitingForDebugger ¶
func RunIfWaitingForDebugger() *RunIfWaitingForDebuggerParams
RunIfWaitingForDebugger tells inspected instance to run if it was waiting for debugger to attach.
func (*RunIfWaitingForDebuggerParams) Do ¶
func (p *RunIfWaitingForDebuggerParams) Do(ctxt context.Context, h cdp.FrameHandler) (err error)
Do executes Runtime.runIfWaitingForDebugger.
func (RunIfWaitingForDebuggerParams) MarshalEasyJSON ¶
func (v RunIfWaitingForDebuggerParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (RunIfWaitingForDebuggerParams) MarshalJSON ¶
func (v RunIfWaitingForDebuggerParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*RunIfWaitingForDebuggerParams) UnmarshalEasyJSON ¶
func (v *RunIfWaitingForDebuggerParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*RunIfWaitingForDebuggerParams) UnmarshalJSON ¶
func (v *RunIfWaitingForDebuggerParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type RunScriptParams ¶
type RunScriptParams struct { ScriptID ScriptID `json:"scriptId"` // Id of the script to run. ExecutionContextID ExecutionContextID `json:"executionContextId,omitempty"` // Specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page. ObjectGroup string `json:"objectGroup,omitempty"` // Symbolic group name that can be used to release multiple objects. Silent bool `json:"silent,omitempty"` // In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state. IncludeCommandLineAPI bool `json:"includeCommandLineAPI,omitempty"` // Determines whether Command Line API should be available during the evaluation. ReturnByValue bool `json:"returnByValue,omitempty"` // Whether the result is expected to be a JSON object which should be sent by value. GeneratePreview bool `json:"generatePreview,omitempty"` // Whether preview should be generated for the result. AwaitPromise bool `json:"awaitPromise,omitempty"` // Whether execution should wait for promise to be resolved. If the result of evaluation is not a Promise, it's considered to be an error. }
RunScriptParams runs script with given id in a given context.
func RunScript ¶
func RunScript(scriptID ScriptID) *RunScriptParams
RunScript runs script with given id in a given context.
parameters:
scriptID - Id of the script to run.
func (*RunScriptParams) Do ¶
func (p *RunScriptParams) Do(ctxt context.Context, h cdp.FrameHandler) (result *RemoteObject, exceptionDetails *ExceptionDetails, err error)
Do executes Runtime.runScript.
returns:
result - Run result. exceptionDetails - Exception details.
func (RunScriptParams) MarshalEasyJSON ¶
func (v RunScriptParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (RunScriptParams) MarshalJSON ¶
func (v RunScriptParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*RunScriptParams) UnmarshalEasyJSON ¶
func (v *RunScriptParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*RunScriptParams) UnmarshalJSON ¶
func (v *RunScriptParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
func (RunScriptParams) WithAwaitPromise ¶
func (p RunScriptParams) WithAwaitPromise(awaitPromise bool) *RunScriptParams
WithAwaitPromise whether execution should wait for promise to be resolved. If the result of evaluation is not a Promise, it's considered to be an error.
func (RunScriptParams) WithExecutionContextID ¶
func (p RunScriptParams) WithExecutionContextID(executionContextID ExecutionContextID) *RunScriptParams
WithExecutionContextID specifies in which execution context to perform script run. If the parameter is omitted the evaluation will be performed in the context of the inspected page.
func (RunScriptParams) WithGeneratePreview ¶
func (p RunScriptParams) WithGeneratePreview(generatePreview bool) *RunScriptParams
WithGeneratePreview whether preview should be generated for the result.
func (RunScriptParams) WithIncludeCommandLineAPI ¶
func (p RunScriptParams) WithIncludeCommandLineAPI(includeCommandLineAPI bool) *RunScriptParams
WithIncludeCommandLineAPI determines whether Command Line API should be available during the evaluation.
func (RunScriptParams) WithObjectGroup ¶
func (p RunScriptParams) WithObjectGroup(objectGroup string) *RunScriptParams
WithObjectGroup symbolic group name that can be used to release multiple objects.
func (RunScriptParams) WithReturnByValue ¶
func (p RunScriptParams) WithReturnByValue(returnByValue bool) *RunScriptParams
WithReturnByValue whether the result is expected to be a JSON object which should be sent by value.
func (RunScriptParams) WithSilent ¶
func (p RunScriptParams) WithSilent(silent bool) *RunScriptParams
WithSilent in silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state.
type RunScriptReturns ¶
type RunScriptReturns struct { Result *RemoteObject `json:"result,omitempty"` // Run result. ExceptionDetails *ExceptionDetails `json:"exceptionDetails,omitempty"` // Exception details. }
RunScriptReturns return values.
func (RunScriptReturns) MarshalEasyJSON ¶
func (v RunScriptReturns) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (RunScriptReturns) MarshalJSON ¶
func (v RunScriptReturns) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*RunScriptReturns) UnmarshalEasyJSON ¶
func (v *RunScriptReturns) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*RunScriptReturns) UnmarshalJSON ¶
func (v *RunScriptReturns) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type SetCustomObjectFormatterEnabledParams ¶
type SetCustomObjectFormatterEnabledParams struct {
Enabled bool `json:"enabled"`
}
SetCustomObjectFormatterEnabledParams [no description].
func SetCustomObjectFormatterEnabled ¶
func SetCustomObjectFormatterEnabled(enabled bool) *SetCustomObjectFormatterEnabledParams
SetCustomObjectFormatterEnabled [no description].
parameters:
enabled
func (*SetCustomObjectFormatterEnabledParams) Do ¶
func (p *SetCustomObjectFormatterEnabledParams) Do(ctxt context.Context, h cdp.FrameHandler) (err error)
Do executes Runtime.setCustomObjectFormatterEnabled.
func (SetCustomObjectFormatterEnabledParams) MarshalEasyJSON ¶
func (v SetCustomObjectFormatterEnabledParams) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (SetCustomObjectFormatterEnabledParams) MarshalJSON ¶
func (v SetCustomObjectFormatterEnabledParams) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*SetCustomObjectFormatterEnabledParams) UnmarshalEasyJSON ¶
func (v *SetCustomObjectFormatterEnabledParams) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*SetCustomObjectFormatterEnabledParams) UnmarshalJSON ¶
func (v *SetCustomObjectFormatterEnabledParams) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type StackTrace ¶
type StackTrace struct { Description string `json:"description,omitempty"` // String label of this stack trace. For async traces this may be a name of the function that initiated the async call. CallFrames []*CallFrame `json:"callFrames,omitempty"` // JavaScript function name. Parent *StackTrace `json:"parent,omitempty"` // Asynchronous JavaScript stack trace that preceded this stack, if available. PromiseCreationFrame *CallFrame `json:"promiseCreationFrame,omitempty"` // Creation frame of the Promise which produced the next synchronous trace when resolved, if available. }
StackTrace call frames for assertions or error messages.
func (StackTrace) MarshalEasyJSON ¶
func (v StackTrace) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (StackTrace) MarshalJSON ¶
func (v StackTrace) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*StackTrace) UnmarshalEasyJSON ¶
func (v *StackTrace) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*StackTrace) UnmarshalJSON ¶
func (v *StackTrace) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type Subtype ¶
type Subtype string
Subtype object subtype hint. Specified for object type values only.
const ( SubtypeArray Subtype = "array" SubtypeNull Subtype = "null" SubtypeNode Subtype = "node" SubtypeRegexp Subtype = "regexp" SubtypeDate Subtype = "date" SubtypeMap Subtype = "map" SubtypeSet Subtype = "set" SubtypeIterator Subtype = "iterator" SubtypeGenerator Subtype = "generator" SubtypeError Subtype = "error" SubtypeProxy Subtype = "proxy" SubtypePromise Subtype = "promise" SubtypeTypedarray Subtype = "typedarray" )
Subtype values.
func (Subtype) MarshalEasyJSON ¶
MarshalEasyJSON satisfies easyjson.Marshaler.
func (Subtype) MarshalJSON ¶
MarshalJSON satisfies json.Marshaler.
func (*Subtype) UnmarshalEasyJSON ¶
UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (*Subtype) UnmarshalJSON ¶
UnmarshalJSON satisfies json.Unmarshaler.
type Type ¶
type Type string
Type object type.
const ( TypeObject Type = "object" TypeFunction Type = "function" TypeUndefined Type = "undefined" TypeString Type = "string" TypeNumber Type = "number" TypeBoolean Type = "boolean" TypeSymbol Type = "symbol" TypeAccessor Type = "accessor" )
Type values.
func (Type) MarshalEasyJSON ¶
MarshalEasyJSON satisfies easyjson.Marshaler.
func (Type) MarshalJSON ¶
MarshalJSON satisfies json.Marshaler.
func (*Type) UnmarshalEasyJSON ¶
UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (*Type) UnmarshalJSON ¶
UnmarshalJSON satisfies json.Unmarshaler.
type UnserializableValue ¶
type UnserializableValue string
UnserializableValue primitive value which cannot be JSON-stringified.
const ( UnserializableValueInfinity UnserializableValue = "Infinity" UnserializableValueNaN UnserializableValue = "NaN" UnserializableValueNegativeInfinity UnserializableValue = "-Infinity" UnserializableValueNegative UnserializableValue = "-0" )
UnserializableValue values.
func (UnserializableValue) MarshalEasyJSON ¶
func (t UnserializableValue) MarshalEasyJSON(out *jwriter.Writer)
MarshalEasyJSON satisfies easyjson.Marshaler.
func (UnserializableValue) MarshalJSON ¶
func (t UnserializableValue) MarshalJSON() ([]byte, error)
MarshalJSON satisfies json.Marshaler.
func (UnserializableValue) String ¶
func (t UnserializableValue) String() string
String returns the UnserializableValue as string value.
func (*UnserializableValue) UnmarshalEasyJSON ¶
func (t *UnserializableValue) UnmarshalEasyJSON(in *jlexer.Lexer)
UnmarshalEasyJSON satisfies easyjson.Unmarshaler.
func (*UnserializableValue) UnmarshalJSON ¶
func (t *UnserializableValue) UnmarshalJSON(buf []byte) error
UnmarshalJSON satisfies json.Unmarshaler.