runtime

package
v1.0.0-rc8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 22, 2019 License: BSD-2-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package runtime provides type definitions for use with the Chrome Runtime protocol

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/

Index

Constants

This section is empty.

Variables

View Source
var CallType = callTypeEnum{
	Log:                 callTypeLog,
	Debug:               callTypeDebug,
	Info:                callTypeInfo,
	Error:               callTypeError,
	Warning:             callTypeWarning,
	Dir:                 callTypeDir,
	Dirxml:              callTypeDirxml,
	Table:               callTypeTable,
	Trace:               callTypeTrace,
	Clear:               callTypeClear,
	StartGroup:          callTypeStartGroup,
	StartGroupCollapsed: callTypeStartGroupCollapsed,
	EndGroup:            callTypeEndGroup,
	Assert:              callTypeAssert,
	Profile:             callTypeProfile,
	ProfileEnd:          callTypeProfileEnd,
	Count:               callTypeCount,
	TimeEnd:             callTypeTimeEnd,
}

CallType provides named acces to the CallTypeEnum values.

View Source
var ObjectSubtype = objectSubtypeEnum{
	Array:      objectSubtypeArray,
	Null:       objectSubtypeNull,
	Node:       objectSubtypeNode,
	Regexp:     objectSubtypeRegexp,
	Date:       objectSubtypeDate,
	Map:        objectSubtypeMap,
	Set:        objectSubtypeSet,
	Weakmap:    objectSubtypeWeakmap,
	Weakset:    objectSubtypeWeakset,
	Iterator:   objectSubtypeIterator,
	Generator:  objectSubtypeGenerator,
	Error:      objectSubtypeError,
	Proxy:      objectSubtypeProxy,
	Promise:    objectSubtypePromise,
	Typedarray: objectSubtypeTypedarray,
}

ObjectSubtype provides named acces to the ObjectSubtypeEnum values.

View Source
var ObjectType = objectTypeEnum{
	Object:    objectTypeObject,
	Function:  objectTypeFunction,
	Undefined: objectTypeUndefined,
	String:    objectTypeString,
	Number:    objectTypeNumber,
	Boolean:   objectTypeBoolean,
	Symbol:    objectTypeSymbol,
	Accessor:  objectTypeAccessor,
}

ObjectType provides named acces to the ObjectTypeEnum values.

View Source
var UnserializableValue = unserializableValueEnum{
	Infinity:    unserializableValueInfinity,
	NaN:         unserializableValueNaN,
	NegInfinity: unserializableValueNegInfinity,
	NegZero:     unserializableValueNegZero,
}

UnserializableValue provides named acces to the UnserializableValueEnum values.

Functions

This section is empty.

Types

type AwaitPromiseParams

type AwaitPromiseParams struct {
	// Identifier of the promise.
	PromiseObjectID RemoteObjectID `json:"promiseObjectId"`

	// Optional. Whether the result is expected to be a JSON object that should
	// be sent by value.
	ReturnByValue bool `json:"returnByValue,omitempty"`

	// Optional. Whether preview should be generated for the result.
	GeneratePreview bool `json:"generatePreview,omitempty"`
}

AwaitPromiseParams represents Runtime.awaitPromise parameters.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-awaitPromise

type AwaitPromiseResult

type AwaitPromiseResult struct {
	// Promise result. Will contain rejected value if promise was rejected.
	Result *RemoteObject `json:"result"`

	// Exception details if stack strace is available.
	ExceptionDetails *ExceptionDetails `json:"exceptionDetails"`

	// Error information related to executing this method
	Err error `json:"-"`
}

AwaitPromiseResult represents the result of calls to Runtime.awaitPromise.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-awaitPromise

type CallArgument

type CallArgument struct {
	// Optional. Primitive value or serializable javascript object.
	Value interface{} `json:"value,omitempty"`

	// Optional. Primitive value which can not be JSON-stringified.
	UnserializableValue UnserializableValueEnum `json:"unserializableValue,omitempty"`

	// Optional. Remote object handle.
	ObjectID RemoteObjectID `json:"objectId,omitempty"`
}

CallArgument represents a function call argument. Either remote object id objectId, primitive value, unserializable primitive value or neither of (for undefined) them should be specified.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-CallArgument

type CallFrame

type CallFrame struct {
	// JavaScript function name.
	FunctionName string `json:"functionName"`

	// JavaScript script id.
	ScriptID ScriptID `json:"scriptId"`

	// JavaScript script name or url.
	URL string `json:"url"`

	// JavaScript script line number (0-based).
	LineNumber int `json:"lineNumber"`

	// JavaScript script column number (0-based).
	ColumnNumber int `json:"columnNumber"`
}

CallFrame is a stack entry for runtime errors and assertions.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-CallFrame

type CallFunctionOnParams

type CallFunctionOnParams struct {
	// Declaration of the function to call.
	FunctionDeclaration string `json:"functionDeclaration"`

	// Optional. Identifier of the object to call function on. Either objectID
	// or executionContextID should be specified.
	ObjectID RemoteObjectID `json:"objectId,omitempty"`

	// Optional. Call arguments. All call arguments must belong to the same
	// JavaScript world as the target object.
	Arguments []*CallArgument `json:"arguments,omitempty"`

	// Optional. In silent mode exceptions thrown during evaluation are not
	// reported and do not pause execution. Overrides setPauseOnException state.
	Silent bool `json:"silent,omitempty"`

	// Whether the result is expected to be a JSON object which should be sent
	// by value.
	ReturnByValue bool `json:"returnByValue,omitempty"`

	// Optional. Whether preview should be generated for the result.
	// EXPERIMENTAL.
	GeneratePreview bool `json:"generatePreview,omitempty"`

	// Optional. Whether execution should be treated as initiated by user in the
	// UI.
	UserGesture bool `json:"userGesture,omitempty"`

	// Optional. Whether execution should await for resulting value and return
	// once awaited promise is resolved.
	AwaitPromise bool `json:"awaitPromise,omitempty"`

	// Optional. Specifies execution context which global object will be used to
	// call function on. Either executionContextID or objectID should be
	// specified.
	ExecutionContextID ExecutionContextID `json:"executionContextId,omitempty"`

	// Optional. 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.
	ObjectGroup string `json:"objectGroup,omitempty"`
}

CallFunctionOnParams represents Runtime.callFunctionOn parameters.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-callFunctionOn

type CallFunctionOnResult

type CallFunctionOnResult struct {
	// Call result.
	Result *RemoteObject `json:"result"`

	// Exception details.
	ExceptionDetails *ExceptionDetails `json:"exceptionDetails"`

	// Error information related to executing this method
	Err error `json:"-"`
}

CallFunctionOnResult represents the result of calls to Runtime.callFunctionOn.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-callFunctionOn

type CallTypeEnum

type CallTypeEnum int

CallTypeEnum represents the type of the call. Allowed values:

  • CallType.Log "log"
  • CallType.Debug "debug"
  • CallType.Info "info"
  • CallType.Error "error"
  • CallType.Warning "warning"
  • CallType.Dir "dir"
  • CallType.Dirxml "dirxml"
  • CallType.Table "table"
  • CallType.Trace "trace"
  • CallType.Clear "clear"
  • CallType.StartGroup "startGroup"
  • CallType.StartGroupCollapsed "startGroupCollapsed"
  • CallType.EndGroup "endGroup"
  • CallType.Assert "assert"
  • CallType.Profile "profile"
  • CallType.ProfileEnd "profileEnd"
  • CallType.Count "count"
  • CallType.TimeEnd "timeEnd"

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#event-consoleAPICalled

func (CallTypeEnum) MarshalJSON

func (enum CallTypeEnum) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (CallTypeEnum) String

func (enum CallTypeEnum) String() string

String implements Stringer

func (*CallTypeEnum) UnmarshalJSON

func (enum *CallTypeEnum) UnmarshalJSON(bytes []byte) error

UnmarshalJSON implements json.Unmarshaler

type CompileScriptParams

type CompileScriptParams struct {
	// Expression to compile.
	Expression string `json:"expression"`

	// Source url to be set for the script.
	SourceURL string `json:"sourceURL"`

	// Specifies whether the compiled script should be persisted.
	PersistScript bool `json:"persistScript"`

	// Optional. 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.
	ExecutionContextID ExecutionContextID `json:"executionContextId,omitempty"`
}

CompileScriptParams represents Runtime.compileScript parameters.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-compileScript

type CompileScriptResult

type CompileScriptResult struct {
	// ID of the script.
	ScriptID ScriptID `json:"scriptId"`

	// Exception details.
	ExceptionDetails *ExceptionDetails `json:"exceptionDetails"`

	// Error information related to executing this method
	Err error `json:"-"`
}

CompileScriptResult represents the result of calls to Runtime.compileScript.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-compileScript

type ConsoleAPICalledEvent

type ConsoleAPICalledEvent struct {
	// Type of the call. Allowed values:
	//	- log
	//	- debug
	//	- info
	//	- error
	//	- warning
	//	- dir
	//	- dirxml
	//	- table
	//	- trace
	//	- clear
	//	- startGroup
	//	- startGroupCollapsed
	//	- endGroup
	//	- assert
	//	- profile
	//	- profileEnd
	//	- count
	//	- timeEnd
	Type CallTypeEnum `json:"type"`

	// Call arguments.
	Args []*RemoteObject `json:"args"`

	// Identifier of the context where the call was made.
	ExecutionContextID ExecutionContextID `json:"executionContextId"`

	// Call timestamp.
	Timestamp Timestamp `json:"timestamp"`

	// Optional. Stack trace captured when the call was made.
	StackTrace *StackTrace `json:"stackTrace,omitempty"`

	// Optional. Console context descriptor for calls on non-default console
	// context (not console.*): 'anonymous#unique-logger-id' for call on unnamed
	// context, 'name#unique-logger-id' for call on named context. EXPERIMENTAL.
	Context string `json:"context,omitempty"`

	// Error information related to this event
	Err error `json:"-"`
}

ConsoleAPICalledEvent represents Runtime.consoleAPICalled event data.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#event-consoleAPICalled

type CustomPreview

type CustomPreview struct {
	Header                     string         `json:"header"`
	HasBody                    bool           `json:"hasBody"`
	FormatterObjectID          RemoteObjectID `json:"formatterObjectId"`
	BindRemoteObjectFunctionID RemoteObjectID `json:"bindRemoteObjectFunctionId"`
	// Optional.
	ConfigObjectID RemoteObjectID `json:"configObjectId,omitempty,omitempty"`
}

CustomPreview is EXPERIMENTAL.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-CustomPreview

type DisableResult

type DisableResult struct {
	// Error information related to executing this method
	Err error `json:"-"`
}

DisableResult represents the result of calls to Runtime.disable.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-disable

type DiscardConsoleEntriesResult

type DiscardConsoleEntriesResult struct {
	// Error information related to executing this method
	Err error `json:"-"`
}

DiscardConsoleEntriesResult represents the result of calls to Runtime.discardConsoleEntries.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-discardConsoleEntries

type EnableResult

type EnableResult struct {
	// Error information related to executing this method
	Err error `json:"-"`
}

EnableResult represents the result of calls to Runtime.enable.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-enable

type EntryPreview

type EntryPreview struct {
	// Optional. Preview of the key. Specified for map-like collection entries.
	Key *ObjectPreview `json:"key,omitempty"`

	// Preview of the value.
	Value *ObjectPreview `json:"value"`
}

EntryPreview is EXPERIMENTAL

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-EntryPreview

type EvaluateParams

type EvaluateParams struct {
	// Expression to evaluate.
	Expression string `json:"expression"`

	// Optional. Symbolic group name that can be used to release multiple
	// objects.
	ObjectGroup string `json:"objectGroup,omitempty"`

	// Optional. Determines whether Command Line API should be available during
	// the evaluation.
	IncludeCommandLineAPI bool `json:"includeCommandLineAPI,omitempty"`

	// Optional. In silent mode exceptions thrown during evaluation are not
	// reported and do not pause execution. Overrides setPauseOnException state.
	Silent bool `json:"silent,omitempty"`

	// Optional. 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.
	ContextID ExecutionContextID `json:"contextId,omitempty"`

	// Optional. Whether the result is expected to be a JSON object that should
	// be sent by value.
	ReturnByValue bool `json:"returnByValue,omitempty"`

	// Optional. Whether preview should be generated for the result.
	// EXPERIMENTAL.
	GeneratePreview bool `json:"generatePreview,omitempty"`

	// Optional. Whether execution should be treated as initiated by user in the
	// UI.
	UserGesture bool `json:"userGesture,omitempty"`

	// Optional. Whether execution should await for resulting value and return
	// once awaited promise is resolved.
	AwaitPromise bool `json:"awaitPromise,omitempty"`
}

EvaluateParams represents Runtime.evaluate parameters.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-evaluate

type EvaluateResult

type EvaluateResult struct {
	// Evaluation result.
	Result *RemoteObject `json:"result"`

	// Exception details.
	ExceptionDetails *ExceptionDetails `json:"exceptionDetails"`

	// Error information related to executing this method
	Err error `json:"-"`
}

EvaluateResult represents the result of calls to Runtime.evaluate.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-evaluate

type ExceptionDetails

type ExceptionDetails struct {
	// Exception id.
	ExceptionID int `json:"exceptionId"`

	// Exception text, which should be used together with exception object when
	// available.
	Text string `json:"text"`

	// Line number of the exception location (0-based).
	LineNumber int `json:"lineNumber"`

	// Column number of the exception location (0-based).
	ColumnNumber int `json:"columnNumber"`

	// Optional. Script ID of the exception location.
	ScriptID ScriptID `json:"scriptId,omitempty"`

	// Optional. URL of the exception location, to be used when the script was
	// not reported.
	URL string `json:"url,omitempty"`

	// Optional. JavaScript stack trace if available.
	StackTrace *StackTrace `json:"stackTrace,omitempty"`

	// Optional. Exception object if available.
	Exception *RemoteObject `json:"exception,omitempty"`

	// Optional. Identifier of the context where exception happened.
	ExecutionContextID ExecutionContextID `json:"executionContextId,omitempty"`
}

ExceptionDetails contains detailed information about exception (or error) that was thrown during script compilation or execution.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-ExceptionDetails

type ExceptionRevokedEvent

type ExceptionRevokedEvent struct {
	// Reason describing why exception was revoked.
	Reason string `json:"reason"`

	// The ID of revoked exception, as reported in exceptionThrown.
	ExceptionID int `json:"exceptionId"`

	// Error information related to this event
	Err error `json:"-"`
}

ExceptionRevokedEvent represents Runtime.exceptionRevoked event data.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#event-exceptionRevoked

type ExceptionThrownEvent

type ExceptionThrownEvent struct {
	// Timestamp of the exception.
	Timestamp Timestamp `json:"timestamp"`

	// Exception details.
	ExceptionDetails *ExceptionDetails `json:"exceptionDetails"`

	// Error information related to this event
	Err error `json:"-"`
}

ExceptionThrownEvent represents Runtime.exceptionThrown event data.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#event-exceptionThrown

type ExecutionContextCreatedEvent

type ExecutionContextCreatedEvent struct {
	// A newly created execution context.
	Context *ExecutionContextDescription `json:"context"`

	// Error information related to this event
	Err error `json:"-"`
}

ExecutionContextCreatedEvent represents Runtime.executionContextCreated event data.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#event-executionContextCreated

type ExecutionContextDescription

type ExecutionContextDescription struct {
	// Unique ID of the execution context. It can be used to specify in which
	// execution context script evaluation should be performed.
	ID ExecutionContextID `json:"id"`

	// Execution context origin.
	Origin string `json:"origin"`

	// Human readable name describing given context.
	Name string `json:"name"`

	// Optional. Embedder-specific auxiliary data.
	AuxData map[string]string `json:"auxData,omitempty"`
}

ExecutionContextDescription is the description of an isolated world.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-ExecutionContextDescription

type ExecutionContextDestroyedEvent

type ExecutionContextDestroyedEvent struct {
	// ID of the destroyed context.
	ExecutionContextID ExecutionContextID `json:"executionContextId"`

	// Error information related to this event
	Err error `json:"-"`
}

ExecutionContextDestroyedEvent represents Runtime.executionContextDestroyed event data.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#event-executionContextDestroyed

type ExecutionContextID

type ExecutionContextID int

ExecutionContextID is the ID of an execution context.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-ExecutionContextId

type ExecutionContextsClearedEvent

type ExecutionContextsClearedEvent struct {
	// Error information related to this event
	Err error `json:"-"`
}

ExecutionContextsClearedEvent represents Runtime.executionContextsCleared event data.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#event-executionContextsCleared

type GetPropertiesParams

type GetPropertiesParams struct {
	// Identifier of the object to return properties for.
	ObjectID RemoteObjectID `json:"objectId"`

	// Optional. If true, returns properties belonging only to the element
	// itself, not to its prototype chain.
	OwnProperties bool `json:"ownProperties,omitempty"`

	// Optional. If true, returns accessor properties (with getter/setter) only;
	// internal properties are not returned either. EXPERIMENTAL.
	AccessorPropertiesOnly bool `json:"accessorPropertiesOnly,omitempty"`

	// Optional. Whether preview should be generated for the results.
	// EXPERIMENTAL.
	GeneratePreview bool `json:"generatePreview,omitempty"`
}

GetPropertiesParams represents Runtime.getProperties parameters.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-getProperties

type GetPropertiesResult

type GetPropertiesResult struct {
	// Object properties.
	Result []*PropertyDescriptor `json:"result"`

	// Internal object properties (only of the element itself).
	InternalProperties []*InternalPropertyDescriptor `json:"internalProperties"`

	// Exception details.
	ExceptionDetails *ExceptionDetails `json:"exceptionDetails"`

	// Error information related to executing this method
	Err error `json:"-"`
}

GetPropertiesResult represents the result of calls to Runtime.getProperties.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-getProperties

type GlobalLexicalScopeNamesParams

type GlobalLexicalScopeNamesParams struct {
	// Optional. Specifies in which execution context to lookup global scope variables.
	ExecutionContextID ExecutionContextID `json:"executionContextId,omitempty"`
}

GlobalLexicalScopeNamesParams represents Runtime.globalLexicalScopeNames parameters.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-globalLexicalScopeNames

type GlobalLexicalScopeNamesResult

type GlobalLexicalScopeNamesResult struct {
	Names []string `json:"names"`

	// Error information related to executing this method
	Err error `json:"-"`
}

GlobalLexicalScopeNamesResult represents the result of calls to Runtime.globalLexicalScopeNames.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-globalLexicalScopeNames

type InspectRequestedEvent

type InspectRequestedEvent struct {
	// Remote object.
	Object *RemoteObject `json:"object"`

	// Hints.
	Hints map[string]string `json:"hints"`

	// Error information related to this event
	Err error `json:"-"`
}

InspectRequestedEvent represents Runtime.inspectRequested event data.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#event-inspectRequested

type InternalPropertyDescriptor

type InternalPropertyDescriptor struct {
	// Conventional property name.
	Name string `json:"name"`

	// Optional. The value associated with the property.
	Value *RemoteObject `json:"value,omitempty"`
}

InternalPropertyDescriptor is an object's internal property descriptor. This property isn't normally visible in JavaScript code.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-InternalPropertyDescriptor

type ObjectPreview

type ObjectPreview struct {
	// Object type. Allowed values:
	//	- object
	//	- function
	//	- undefined
	//	- string
	//	- number
	//	- boolean
	//	- symbol
	Type ObjectTypeEnum `json:"type"`

	// Object subtype hint. Specified for object type values only. Allowed
	// values:
	//	- array
	//	- null
	//	- node
	//	- regexp
	//	- date
	//	- map
	//	- set
	//	- weakmap
	//	- weakset
	//	- iterator
	//	- generator
	//	- error
	Subtype ObjectSubtypeEnum `json:"subtype"`

	// Optional. String representation of the object.
	Description string `json:"description,omitempty"`

	// True iff some of the properties or entries of the original object did not
	// fit.
	Overflow bool `json:"overflow"`

	// List of the properties.
	Properties []*PropertyPreview `json:"properties"`

	// Optional. List of the entries. Specified for map and set subtype values
	// only.
	Entries []*EntryPreview `json:"entries,omitempty"`
}

ObjectPreview is an object containing abbreviated remote object value. EXPERIMENTAL.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-ObjectPreview

type ObjectSubtypeEnum

type ObjectSubtypeEnum int

ObjectSubtypeEnum represents an object subtype hint. Specified for object type values only. Allowed values:

  • ObjectSubtype.Array "array"
  • ObjectSubtype.Null "null"
  • ObjectSubtype.Node "node"
  • ObjectSubtype.Regexp "regexp"
  • ObjectSubtype.Date "date"
  • ObjectSubtype.Map "map"
  • ObjectSubtype.Set "set"
  • ObjectSubtype.Weakmap "weakmap"
  • ObjectSubtype.Weakset "weakset"
  • ObjectSubtype.Iterator "iterator"
  • ObjectSubtype.Generator "generator"
  • ObjectSubtype.Error "error"
  • ObjectSubtype.Proxy "proxy"
  • ObjectSubtype.Promise "promise"
  • ObjectSubtype.Typedarray "typedarray"

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-RemoteObject https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-ObjectPreview https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-PropertyPreview

func (ObjectSubtypeEnum) MarshalJSON

func (enum ObjectSubtypeEnum) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (ObjectSubtypeEnum) String

func (enum ObjectSubtypeEnum) String() string

String implements Stringer

func (*ObjectSubtypeEnum) UnmarshalJSON

func (enum *ObjectSubtypeEnum) UnmarshalJSON(bytes []byte) error

UnmarshalJSON implements json.Unmarshaler

type ObjectTypeEnum

type ObjectTypeEnum int

ObjectTypeEnum represents the object type. For properties, "accessor" means that the property itself is an accessor property. Allowed values:

  • ObjectType.Object "object"
  • ObjectType.Function "function"
  • ObjectType.Undefined "undefined"
  • ObjectType.String "string"
  • ObjectType.Number "number"
  • ObjectType.Boolean "boolean"
  • ObjectType.Symbol "symbol"
  • ObjectType.Accessor "accessor"

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-RemoteObject https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-ObjectPreview https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-PropertyPreview

func (ObjectTypeEnum) MarshalJSON

func (enum ObjectTypeEnum) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (ObjectTypeEnum) String

func (enum ObjectTypeEnum) String() string

String implements Stringer

func (*ObjectTypeEnum) UnmarshalJSON

func (enum *ObjectTypeEnum) UnmarshalJSON(bytes []byte) error

UnmarshalJSON implements json.Unmarshaler

type PropertyDescriptor

type PropertyDescriptor struct {
	// Property name or symbol description.
	Name string `json:"name"`

	// Optional. The value associated with the property.
	Value *RemoteObject `json:"value,omitempty"`

	// Optional. True if the value associated with the property may be changed
	// (data descriptors only).
	Writable bool `json:"writable,omitempty"`

	// Optional. A function which serves as a getter for the property, or
	// undefined if there is no getter (accessor descriptors only).
	Get *RemoteObject `json:"get,omitempty"`

	// Optional. A function which serves as a setter for the property, or
	// undefined if there is no setter (accessor descriptors only).
	Set *RemoteObject `json:"set,omitempty"`

	// True if the type of this property descriptor may be changed and if the
	// property may be deleted from the corresponding object.
	Configurable bool `json:"configurable"`

	// True if this property shows up during enumeration of the properties on
	// the corresponding object.
	Enumerable bool `json:"enumerable"`

	// Optional. True if the result was thrown during the evaluation.
	WasThrown bool `json:"wasThrown,omitempty"`

	// Optional. True if the property is owned for the object.
	IsOwn bool `json:"isOwn,omitempty"`

	// Optional. Property symbol object, if the property is of the symbol type.
	Symbol *RemoteObject `json:"symbol,omitempty"`
}

PropertyDescriptor is an object property descriptor.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-PropertyDescriptor

type PropertyPreview

type PropertyPreview struct {
	// Property name.
	Name string `json:"name"`

	// Object type. Accessor means that the property itself is an accessor
	// property. Allowed values:
	//	- object
	//	- function
	//	- undefined
	//	- string
	//	- number
	//	- boolean
	//	- symbol
	//	- accessor
	Type ObjectTypeEnum `json:"type"`

	// Optional. User-friendly property value string.
	Value string `json:"value,omitempty"`

	// Optional. Nested value preview.
	ValuePreview *ObjectPreview `json:"valuePreview,omitempty"`

	// Optional. Object subtype hint. Specified for object type values only.
	// Allowed values:
	//	- array
	//	- null
	//	- node
	//	- regexp
	//	- date
	//	- map
	//	- set
	//	- weakmap
	//	- weakset
	//	- iterator
	//	- generator
	//	- error
	Subtype ObjectSubtypeEnum `json:"subtype,omitempty"`
}

PropertyPreview is EXPERIMENTAL

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-PropertyPreview

type QueryObjectsParams

type QueryObjectsParams struct {
	// Identifier of the prototype to return objects for.
	PrototypeObjectID RemoteObjectID `json:"prototypeObjectId"`
}

QueryObjectsParams represents Runtime.queryObjects parameters.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-queryObjects

type QueryObjectsResult

type QueryObjectsResult struct {
	// Identifier of the object to release.
	ObjectID RemoteObjectID `json:"objectId"`

	// Error information related to executing this method
	Err error `json:"-"`
}

QueryObjectsResult represents the result of calls to Runtime.queryObjects.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-queryObjects

type ReleaseObjectGroupParams

type ReleaseObjectGroupParams struct {
	// Symbolic object group name.
	ObjectGroup string `json:"objectGroup"`
}

ReleaseObjectGroupParams represents Runtime.releaseObjectGroup parameters.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-releaseObjectGroup

type ReleaseObjectGroupResult

type ReleaseObjectGroupResult struct {
	// Error information related to executing this method
	Err error `json:"-"`
}

ReleaseObjectGroupResult represents the result of calls to Runtime.releaseObjectGroup.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-releaseObjectGroup

type ReleaseObjectParams

type ReleaseObjectParams struct {
	// Identifier of the object to release.
	ObjectID RemoteObjectID `json:"objectId"`
}

ReleaseObjectParams represents Runtime.releaseObject parameters.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-releaseObject

type ReleaseObjectResult

type ReleaseObjectResult struct {
	// Error information related to executing this method
	Err error `json:"-"`
}

ReleaseObjectResult represents the result of calls to Runtime.releaseObject.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-releaseObject

type RemoteObject

type RemoteObject struct {
	// Object type. Allowed values:
	//	- object
	//	- function
	//	- undefined
	//	- string
	//	- number
	//	- boolean
	//	- symbol
	Type ObjectTypeEnum `json:"type"`

	// Optional. Object subtype hint. Specified for object type values only.
	// Allowed values:
	//	- array
	//	- null
	//	- node
	//	- regexp
	//	- date
	//	- map
	//	- set
	//	- weakmap
	//	- weakset
	//	- iterator
	//	- generator
	//	- error
	//	- proxy
	//	- promise
	//	- typedarray
	Subtype ObjectSubtypeEnum `json:"subtype,omitempty"`

	// Optional. Object class (constructor) name. Specified for object type
	// values only.
	ClassName string `json:"className,omitempty"`

	// Optional. Remote object value in case of primitive values or JSON values
	// (if it was requested).
	Value interface{} `json:"value,omitempty"`

	// Optional. Primitive value which can not be JSON-stringified does not have
	// value, but gets this property.
	UnserializableValue UnserializableValueEnum `json:"unserializableValue,omitempty"`

	// Optional. String representation of the object.
	Description string `json:"description,omitempty"`

	// Optional. Unique object identifier (for non-primitive values).
	ObjectID RemoteObjectID `json:"objectId,omitempty"`

	// Optional. Preview containing abbreviated property values. Specified for
	// object type values only. EXPERIMENTAL.
	Preview *ObjectPreview `json:"preview,omitempty"`

	// Optional. EXPERIMENTAL.
	CustomPreview *CustomPreview `json:"customPreview,omitempty"`
}

RemoteObject is a mirror object referencing the original JavaScript object.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-RemoteObject

type RemoteObjectID

type RemoteObjectID string

RemoteObjectID is a unique object identifier.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-RemoteObjectId

type RunIfWaitingForDebuggerResult

type RunIfWaitingForDebuggerResult struct {
	// Error information related to executing this method
	Err error `json:"-"`
}

RunIfWaitingForDebuggerResult represents the result of calls to Runtime.runIfWaitingForDebugger.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-runIfWaitingForDebugger

type RunScriptParams

type RunScriptParams struct {
	// ID of the script to run.
	ScriptID ScriptID `json:"scriptId"`

	// Optional. 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.
	ExecutionContextID ExecutionContextID `json:"executionContextId,omitempty"`

	// Optional. Symbolic group name that can be used to release multiple
	// objects.
	ObjectGroup string `json:"objectGroup,omitempty"`

	// Optional. In silent mode exceptions thrown during evaluation are not
	// reported and do not pause execution. Overrides setPauseOnException state.
	Silent bool `json:"silent,omitempty"`

	// Optional. Determines whether Command Line API should be available during
	// the evaluation.
	IncludeCommandLineAPI bool `json:"includeCommandLineAPI,omitempty"`

	// Optional. Whether the result is expected to be a JSON object which should
	// be sent by value.
	ReturnByValue bool `json:"returnByValue,omitempty"`

	// Optional. Whether preview should be generated for the result.
	GeneratePreview bool `json:"generatePreview,omitempty"`

	// Optional. Whether execution should await for resulting value and return
	// once awaited promise is resolved.
	AwaitPromise bool `json:"awaitPromise,omitempty"`
}

RunScriptParams represents Runtime.runScript parameters.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-runScript

type RunScriptResult

type RunScriptResult struct {
	// Identifier of the object to release.
	ObjectID RemoteObjectID `json:"objectId"`

	// Error information related to executing this method
	Err error `json:"-"`
}

RunScriptResult represents the result of calls to Runtime.runScript.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-runScript

type ScriptID

type ScriptID string

ScriptID is a unique script identifier.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-ScriptId

type SetCustomObjectFormatterEnabledParams

type SetCustomObjectFormatterEnabledParams struct {
	// Run result.
	Result *RemoteObject `json:"result"`

	// Exception details.
	ExceptionDetails *ExceptionDetails `json:"exceptionDetails"`
}

SetCustomObjectFormatterEnabledParams represents Runtime.setCustomObjectFormatterEnabled parameters.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-setCustomObjectFormatterEnabled

type SetCustomObjectFormatterEnabledResult

type SetCustomObjectFormatterEnabledResult struct {
	// Error information related to executing this method
	Err error `json:"-"`
}

SetCustomObjectFormatterEnabledResult represents the result of calls to Runtime.setCustomObjectFormatterEnabled.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#method-setCustomObjectFormatterEnabled

type StackTrace

type StackTrace struct {
	// Optional. String label of this stack trace. For async traces this may be
	// a name of the function that initiated the async call.
	Description string `json:"description,omitempty"`

	// JavaScript function name.
	CallFrames []*CallFrame `json:"callFrames"`

	// Optional. Asynchronous JavaScript stack trace that preceded this stack,
	// if available.
	Parent *StackTrace `json:"parent,omitempty"`

	// Optional. Asynchronous JavaScript stack trace that preceded this stack,
	// if available. EXPERIMENTAL.
	ParentID *StackTraceID `json:"parentId,omitempty"`
}

StackTrace contains call frames for assertions or error messages.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-StackTrace

type StackTraceID

type StackTraceID struct {
	ID string `json:"id"`
	// Optional.
	DebuggerID UniqueDebuggerID `json:"debuggerId,omitempty"`
}

StackTraceID - If debuggerID is set stack trace comes from another debugger and can be resolved there. This allows to track cross-debugger calls. See StackTrace and Debugger.paused for usages. EXPERIMENTAL.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-StackTraceId

type Timestamp

type Timestamp int

Timestamp is the number of milliseconds since epoch.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-Timestamp

type UniqueDebuggerID

type UniqueDebuggerID string

UniqueDebuggerID is the unique identifier of the current debugger. EXPERIMENTAL.

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-UniqueDebuggerId

type UnserializableValueEnum

type UnserializableValueEnum int

UnserializableValueEnum is a primitive value which cannot be JSON-stringified. Allowed values:

  • UnserializableValue.Infinity "Infinity"
  • UnserializableValue.NaN "NaN"
  • UnserializableValue.NegInfinity "-Infinity"
  • UnserializableValue.NegZero "-0"

https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-UnserializableValue

func (UnserializableValueEnum) MarshalJSON

func (enum UnserializableValueEnum) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (UnserializableValueEnum) String

func (enum UnserializableValueEnum) String() string

String implements Stringer

func (*UnserializableValueEnum) UnmarshalJSON

func (enum *UnserializableValueEnum) UnmarshalJSON(bytes []byte) error

UnmarshalJSON implements json.Unmarshaler

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL