runtime

package
v0.157.3 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2026 License: MIT Imports: 2 Imported by: 301

Documentation

Overview

Package runtime provides the Chrome DevTools Protocol commands, types, and events for the 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 pdlgen command.

Index

Constants

View Source
const (
	CommandAwaitPromise                    = "Runtime.awaitPromise"
	CommandCallFunctionOn                  = "Runtime.callFunctionOn"
	CommandCompileScript                   = "Runtime.compileScript"
	CommandDisable                         = "Runtime.disable"
	CommandDiscardConsoleEntries           = "Runtime.discardConsoleEntries"
	CommandEnable                          = "Runtime.enable"
	CommandEvaluate                        = "Runtime.evaluate"
	CommandGetIsolateID                    = "Runtime.getIsolateId"
	CommandGetHeapUsage                    = "Runtime.getHeapUsage"
	CommandGetProperties                   = "Runtime.getProperties"
	CommandGlobalLexicalScopeNames         = "Runtime.globalLexicalScopeNames"
	CommandQueryObjects                    = "Runtime.queryObjects"
	CommandReleaseObject                   = "Runtime.releaseObject"
	CommandReleaseObjectGroup              = "Runtime.releaseObjectGroup"
	CommandRunIfWaitingForDebugger         = "Runtime.runIfWaitingForDebugger"
	CommandRunScript                       = "Runtime.runScript"
	CommandSetCustomObjectFormatterEnabled = "Runtime.setCustomObjectFormatterEnabled"
	CommandSetMaxCallStackSizeToCapture    = "Runtime.setMaxCallStackSizeToCapture"
	CommandTerminateExecution              = "Runtime.terminateExecution"
	CommandAddBinding                      = "Runtime.addBinding"
	CommandRemoveBinding                   = "Runtime.removeBinding"
	CommandGetExceptionDetails             = "Runtime.getExceptionDetails"
)

Command names.

Variables

AddBinding if executionContextId is empty, adds binding with the given name on the global objects of all inspected contexts, including those created later, bindings survive reloads. Binding function takes exactly one argument, this argument should be string, in case of any other input, function throws an exception. Each binding function call produces Runtime.bindingCalled notification.

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

AwaitPromise add handler to promise with given promise object id.

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

View Source
var BindingCalled = cdp.Event[EventBindingCalled]{Method: "Runtime.bindingCalled"}

BindingCalled notification is issued every time when binding is called.

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

CallFunctionOn calls function with given declaration on the given object. Object group of the result is inherited from the target object.

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

CompileScript compiles expression.

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

View Source
var ConsoleAPICalled = cdp.Event[EventConsoleAPICalled]{Method: "Runtime.consoleAPICalled"}

ConsoleAPICalled issued when console API was called.

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

View Source
var Disable = cdp.Command[cdp.Empty, cdp.Empty]{Method: CommandDisable}

Disable disables reporting of execution contexts creation.

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

View Source
var DiscardConsoleEntries = cdp.Command[cdp.Empty, cdp.Empty]{Method: CommandDiscardConsoleEntries}

DiscardConsoleEntries discards collected exceptions and console API calls.

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

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.

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

Evaluate evaluates expression on global object.

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

View Source
var ExceptionRevoked = cdp.Event[EventExceptionRevoked]{Method: "Runtime.exceptionRevoked"}

ExceptionRevoked issued when unhandled exception was revoked.

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

View Source
var ExceptionThrown = cdp.Event[EventExceptionThrown]{Method: "Runtime.exceptionThrown"}

ExceptionThrown issued when exception was thrown and unhandled.

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

View Source
var ExecutionContextCreated = cdp.Event[EventExecutionContextCreated]{Method: "Runtime.executionContextCreated"}

ExecutionContextCreated issued when new execution context is created.

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

View Source
var ExecutionContextDestroyed = cdp.Event[EventExecutionContextDestroyed]{Method: "Runtime.executionContextDestroyed"}

ExecutionContextDestroyed issued when execution context is destroyed.

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

View Source
var ExecutionContextsCleared = cdp.Event[EventExecutionContextsCleared]{Method: "Runtime.executionContextsCleared"}

ExecutionContextsCleared issued when all executionContexts were cleared in browser.

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

GetExceptionDetails this method tries to lookup and populate exception details for a JavaScript Error object. Note that the stackTrace portion of the resulting exceptionDetails will only be populated if the Runtime domain was enabled at the time when the Error was thrown.

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

GetHeapUsage returns the JavaScript heap usage. It is the total usage of the corresponding isolate not scoped to a particular Runtime.

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

GetIsolateID returns the isolate id.

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

GetProperties returns properties of a given object. Object group of the result is inherited from the target object.

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

GlobalLexicalScopeNames returns all let, const and class variables from global scope.

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

View Source
var InspectRequested = cdp.Event[EventInspectRequested]{Method: "Runtime.inspectRequested"}

InspectRequested issued when object should be inspected (for example, as a result of inspect() command line API call).

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

QueryObjects [no description].

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

ReleaseObject releases remote object with given id.

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

ReleaseObjectGroup releases all remote objects that belong to a given group.

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

RemoveBinding this method does not remove binding function from global object but unsubscribes current runtime agent from Runtime.bindingCalled notifications.

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

View Source
var RunIfWaitingForDebugger = cdp.Command[cdp.Empty, cdp.Empty]{Method: CommandRunIfWaitingForDebugger}

RunIfWaitingForDebugger tells inspected instance to run if it was waiting for debugger to attach.

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

RunScript runs script with given id in a given context.

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

SetCustomObjectFormatterEnabled [no description].

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

SetMaxCallStackSizeToCapture [no description].

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

View Source
var TerminateExecution = cdp.Command[cdp.Empty, cdp.Empty]{Method: CommandTerminateExecution}

TerminateExecution terminate current or next JavaScript execution. Will cancel the termination when the outer-most script execution ends.

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

Functions

This section is empty.

Types

type AddBindingParams

type AddBindingParams struct {
	Name                 string `json:"name"`
	ExecutionContextName string `json:"executionContextName,omitempty,omitzero"` // If specified, the binding is exposed to the executionContext with matching name, even for contexts created after the binding is added. See also ExecutionContext.name and worldName parameter to Page.addScriptToEvaluateOnNewDocument. This parameter is mutually exclusive with executionContextId.
}

AddBindingParams are the parameters of the command Runtime.addBinding.

type AwaitPromiseParams

type AwaitPromiseParams struct {
	PromiseObjectID RemoteObjectID `json:"promiseObjectId"`                    // Identifier of the promise.
	ReturnByValue   *bool          `json:"returnByValue,omitempty,omitzero"`   // Whether the result is expected to be a JSON object that should be sent by value.
	GeneratePreview *bool          `json:"generatePreview,omitempty,omitzero"` // Whether preview should be generated for the result.
}

AwaitPromiseParams are the parameters of the command Runtime.awaitPromise.

type AwaitPromiseResult added in v0.157.3

type AwaitPromiseResult struct {
	Result           *RemoteObject     `json:"result,omitempty,omitzero"`           // Promise result. Will contain rejected value if promise was rejected.
	ExceptionDetails *ExceptionDetails `json:"exceptionDetails,omitempty,omitzero"` // Exception details if stack strace is available.
}

AwaitPromiseResult is the result of the command Runtime.awaitPromise.

type CallArgument

type CallArgument struct {
	Value               jsontext.Value      `json:"value,omitempty,omitzero"`               // Primitive value or serializable javascript object.
	UnserializableValue UnserializableValue `json:"unserializableValue,omitempty,omitzero"` // Primitive value which can not be JSON-stringified.
	ObjectID            RemoteObjectID      `json:"objectId,omitempty,omitzero"`            // 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.

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

type CallFrame

type CallFrame struct {
	FunctionName string       `json:"functionName"` // JavaScript function name.
	ScriptID     cdp.ScriptID `json:"scriptId"`     // JavaScript script id.
	URL          string       `json:"url"`          // JavaScript script name or url.
	LineNumber   int64        `json:"lineNumber"`   // JavaScript script line number (0-based).
	ColumnNumber int64        `json:"columnNumber"` // JavaScript script column number (0-based).
}

CallFrame stack entry for runtime errors and assertions.

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

type CallFunctionOnParams

type CallFunctionOnParams struct {
	FunctionDeclaration  string                `json:"functionDeclaration"`                     // Declaration of the function to call.
	ObjectID             RemoteObjectID        `json:"objectId,omitempty,omitzero"`             // Identifier of the object to call function on. Either objectId or executionContextId should be specified.
	Arguments            []*CallArgument       `json:"arguments,omitempty,omitzero"`            // Call arguments. All call arguments must belong to the same JavaScript world as the target object.
	Silent               *bool                 `json:"silent,omitempty,omitzero"`               // In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state.
	ReturnByValue        *bool                 `json:"returnByValue,omitempty,omitzero"`        // Whether the result is expected to be a JSON object which should be sent by value. Can be overridden by serializationOptions.
	GeneratePreview      *bool                 `json:"generatePreview,omitempty,omitzero"`      // Whether preview should be generated for the result.
	UserGesture          *bool                 `json:"userGesture,omitempty,omitzero"`          // Whether execution should be treated as initiated by user in the UI.
	AwaitPromise         *bool                 `json:"awaitPromise,omitempty,omitzero"`         // Whether execution should await for resulting value and return once awaited promise is resolved.
	ExecutionContextID   ExecutionContextID    `json:"executionContextId,omitempty,omitzero"`   // Specifies execution context which global object will be used to call function on. Either executionContextId or objectId should be specified.
	ObjectGroup          string                `json:"objectGroup,omitempty,omitzero"`          // 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.
	ThrowOnSideEffect    *bool                 `json:"throwOnSideEffect,omitempty,omitzero"`    // Whether to throw an exception if side effect cannot be ruled out during evaluation.
	UniqueContextID      string                `json:"uniqueContextId,omitempty,omitzero"`      // An alternative way to specify the execution context to call function on. Compared to contextId that may be reused across processes, this is guaranteed to be system-unique, so it can be used to prevent accidental function call in context different than intended (e.g. as a result of navigation across process boundaries). This is mutually exclusive with executionContextId.
	SerializationOptions *SerializationOptions `json:"serializationOptions,omitempty,omitzero"` // Specifies the result serialization. If provided, overrides generatePreview and returnByValue.
}

CallFunctionOnParams are the parameters of the command Runtime.callFunctionOn.

type CallFunctionOnResult added in v0.157.3

type CallFunctionOnResult struct {
	Result           *RemoteObject     `json:"result,omitempty,omitzero"`           // Call result.
	ExceptionDetails *ExceptionDetails `json:"exceptionDetails,omitempty,omitzero"` // Exception details.
}

CallFunctionOnResult is the result of the command Runtime.callFunctionOn.

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,omitzero"` // 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 are the parameters of the command Runtime.compileScript.

type CompileScriptResult added in v0.157.3

type CompileScriptResult struct {
	ScriptID         cdp.ScriptID      `json:"scriptId,omitempty,omitzero"`         // Id of the script.
	ExceptionDetails *ExceptionDetails `json:"exceptionDetails,omitempty,omitzero"` // Exception details.
}

CompileScriptResult is the result of the command Runtime.compileScript.

type ConsoleAPICalledType added in v0.157.1

type ConsoleAPICalledType string

ConsoleAPICalledType type of the call.

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

const (
	ConsoleAPICalledTypeLog                 ConsoleAPICalledType = "log"
	ConsoleAPICalledTypeDebug               ConsoleAPICalledType = "debug"
	ConsoleAPICalledTypeInfo                ConsoleAPICalledType = "info"
	ConsoleAPICalledTypeError               ConsoleAPICalledType = "error"
	ConsoleAPICalledTypeWarning             ConsoleAPICalledType = "warning"
	ConsoleAPICalledTypeDir                 ConsoleAPICalledType = "dir"
	ConsoleAPICalledTypeDirxml              ConsoleAPICalledType = "dirxml"
	ConsoleAPICalledTypeTable               ConsoleAPICalledType = "table"
	ConsoleAPICalledTypeTrace               ConsoleAPICalledType = "trace"
	ConsoleAPICalledTypeClear               ConsoleAPICalledType = "clear"
	ConsoleAPICalledTypeStartGroup          ConsoleAPICalledType = "startGroup"
	ConsoleAPICalledTypeStartGroupCollapsed ConsoleAPICalledType = "startGroupCollapsed"
	ConsoleAPICalledTypeEndGroup            ConsoleAPICalledType = "endGroup"
	ConsoleAPICalledTypeAssert              ConsoleAPICalledType = "assert"
	ConsoleAPICalledTypeProfile             ConsoleAPICalledType = "profile"
	ConsoleAPICalledTypeProfileEnd          ConsoleAPICalledType = "profileEnd"
	ConsoleAPICalledTypeCount               ConsoleAPICalledType = "count"
	ConsoleAPICalledTypeTimeEnd             ConsoleAPICalledType = "timeEnd"
)

ConsoleAPICalledType values.

func (ConsoleAPICalledType) String added in v0.157.1

func (t ConsoleAPICalledType) String() string

String returns the ConsoleAPICalledType as string value.

type CustomPreview

type CustomPreview struct {
	Header       string         `json:"header"`                          // The JSON-stringified result of formatter.header(object, config) call. It contains json ML array that represents RemoteObject.
	BodyGetterID RemoteObjectID `json:"bodyGetterId,omitempty,omitzero"` // If formatter returns true as a result of formatter.hasBody call then bodyGetterId will contain RemoteObjectId for the function that returns result of formatter.body(object, config) call. The result value is json ML array.
}

CustomPreview [no description].

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

type DeepSerializedValue

type DeepSerializedValue struct {
	Type                     DeepSerializedValueType `json:"type"`
	Value                    jsontext.Value          `json:"value,omitempty,omitzero"`
	ObjectID                 string                  `json:"objectId,omitempty,omitzero"`
	WeakLocalObjectReference int64                   `json:"weakLocalObjectReference,omitempty,omitzero"` // Set if value reference met more then once during serialization. In such case, value is provided only to one of the serialized values. Unique per value in the scope of one CDP call.
}

DeepSerializedValue represents deep serialized value.

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

type DeepSerializedValueType added in v0.157.1

type DeepSerializedValueType string

DeepSerializedValueType [no description].

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

const (
	DeepSerializedValueTypeUndefined   DeepSerializedValueType = "undefined"
	DeepSerializedValueTypeNull        DeepSerializedValueType = "null"
	DeepSerializedValueTypeString      DeepSerializedValueType = "string"
	DeepSerializedValueTypeNumber      DeepSerializedValueType = "number"
	DeepSerializedValueTypeBoolean     DeepSerializedValueType = "boolean"
	DeepSerializedValueTypeBigint      DeepSerializedValueType = "bigint"
	DeepSerializedValueTypeRegexp      DeepSerializedValueType = "regexp"
	DeepSerializedValueTypeDate        DeepSerializedValueType = "date"
	DeepSerializedValueTypeSymbol      DeepSerializedValueType = "symbol"
	DeepSerializedValueTypeArray       DeepSerializedValueType = "array"
	DeepSerializedValueTypeObject      DeepSerializedValueType = "object"
	DeepSerializedValueTypeFunction    DeepSerializedValueType = "function"
	DeepSerializedValueTypeMap         DeepSerializedValueType = "map"
	DeepSerializedValueTypeSet         DeepSerializedValueType = "set"
	DeepSerializedValueTypeWeakmap     DeepSerializedValueType = "weakmap"
	DeepSerializedValueTypeWeakset     DeepSerializedValueType = "weakset"
	DeepSerializedValueTypeError       DeepSerializedValueType = "error"
	DeepSerializedValueTypeProxy       DeepSerializedValueType = "proxy"
	DeepSerializedValueTypePromise     DeepSerializedValueType = "promise"
	DeepSerializedValueTypeTypedarray  DeepSerializedValueType = "typedarray"
	DeepSerializedValueTypeArraybuffer DeepSerializedValueType = "arraybuffer"
	DeepSerializedValueTypeNode        DeepSerializedValueType = "node"
	DeepSerializedValueTypeWindow      DeepSerializedValueType = "window"
	DeepSerializedValueTypeGenerator   DeepSerializedValueType = "generator"
)

DeepSerializedValueType values.

func (DeepSerializedValueType) String added in v0.157.1

func (t DeepSerializedValueType) String() string

String returns the DeepSerializedValueType as string value.

type EntryPreview

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

EntryPreview [no description].

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

type EvaluateParams

type EvaluateParams struct {
	Expression                  string                `json:"expression"`                                     // Expression to evaluate.
	ObjectGroup                 string                `json:"objectGroup,omitempty,omitzero"`                 // Symbolic group name that can be used to release multiple objects.
	IncludeCommandLineAPI       *bool                 `json:"includeCommandLineAPI,omitempty,omitzero"`       // Determines whether Command Line API should be available during the evaluation.
	Silent                      *bool                 `json:"silent,omitempty,omitzero"`                      // In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state.
	ContextID                   ExecutionContextID    `json:"contextId,omitempty,omitzero"`                   // 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. This is mutually exclusive with uniqueContextId, which offers an alternative way to identify the execution context that is more reliable in a multi-process environment.
	ReturnByValue               *bool                 `json:"returnByValue,omitempty,omitzero"`               // Whether the result is expected to be a JSON object that should be sent by value.
	GeneratePreview             *bool                 `json:"generatePreview,omitempty,omitzero"`             // Whether preview should be generated for the result.
	UserGesture                 *bool                 `json:"userGesture,omitempty,omitzero"`                 // Whether execution should be treated as initiated by user in the UI.
	AwaitPromise                *bool                 `json:"awaitPromise,omitempty,omitzero"`                // Whether execution should await for resulting value and return once awaited promise is resolved.
	ThrowOnSideEffect           *bool                 `json:"throwOnSideEffect,omitempty,omitzero"`           // Whether to throw an exception if side effect cannot be ruled out during evaluation. This implies disableBreaks below.
	Timeout                     TimeDelta             `json:"timeout,omitempty,omitzero"`                     // Terminate execution after timing out (number of milliseconds).
	DisableBreaks               *bool                 `json:"disableBreaks,omitempty,omitzero"`               // Disable breakpoints during execution.
	ReplMode                    *bool                 `json:"replMode,omitempty,omitzero"`                    // Setting this flag to true enables let re-declaration and top-level await. Note that let variables can only be re-declared if they originate from replMode themselves.
	AllowUnsafeEvalBlockedByCSP *bool                 `json:"allowUnsafeEvalBlockedByCSP,omitempty,omitzero"` // The Content Security Policy (CSP) for the target might block 'unsafe-eval' which includes eval(), Function(), setTimeout() and setInterval() when called with non-callable arguments. This flag bypasses CSP for this evaluation and allows unsafe-eval. Defaults to true.
	UniqueContextID             string                `json:"uniqueContextId,omitempty,omitzero"`             // An alternative way to specify the execution context to evaluate in. Compared to contextId that may be reused across processes, this is guaranteed to be system-unique, so it can be used to prevent accidental evaluation of the expression in context different than intended (e.g. as a result of navigation across process boundaries). This is mutually exclusive with contextId.
	SerializationOptions        *SerializationOptions `json:"serializationOptions,omitempty,omitzero"`        // Specifies the result serialization. If provided, overrides generatePreview and returnByValue.
}

EvaluateParams are the parameters of the command Runtime.evaluate.

type EvaluateResult added in v0.157.3

type EvaluateResult struct {
	Result           *RemoteObject     `json:"result,omitempty,omitzero"`           // Evaluation result.
	ExceptionDetails *ExceptionDetails `json:"exceptionDetails,omitempty,omitzero"` // Exception details.
}

EvaluateResult is the result of the command Runtime.evaluate.

type EventBindingCalled

type EventBindingCalled struct {
	Name               string             `json:"name"`
	Payload            string             `json:"payload"`
	ExecutionContextID ExecutionContextID `json:"executionContextId"` // Identifier of the context where the call was made.
}

EventBindingCalled notification is issued every time when binding is called.

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

type EventConsoleAPICalled

type EventConsoleAPICalled struct {
	Type               ConsoleAPICalledType `json:"type"`                          // Type of the call.
	Args               []*RemoteObject      `json:"args"`                          // Call arguments.
	ExecutionContextID ExecutionContextID   `json:"executionContextId"`            // Identifier of the context where the call was made.
	Timestamp          Timestamp            `json:"timestamp"`                     // Call timestamp.
	StackTrace         *StackTrace          `json:"stackTrace,omitempty,omitzero"` // Stack trace captured when the call was made. The async stack chain is automatically reported for the following call types: assert, error, trace, warning. For other types the async call chain can be retrieved using Debugger.getStackTrace and stackTrace.parentId field.
	Context            string               `json:"context,omitempty,omitzero"`    // 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.
}

EventConsoleAPICalled issued when console API was called.

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

type EventExceptionRevoked

type EventExceptionRevoked struct {
	Reason      string `json:"reason"`      // Reason describing why exception was revoked.
	ExceptionID int64  `json:"exceptionId"` // The id of revoked exception, as reported in exceptionThrown.
}

EventExceptionRevoked issued when unhandled exception was revoked.

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

type EventExceptionThrown

type EventExceptionThrown struct {
	Timestamp        Timestamp         `json:"timestamp"` // Timestamp of the exception.
	ExceptionDetails *ExceptionDetails `json:"exceptionDetails"`
}

EventExceptionThrown issued when exception was thrown and unhandled.

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

type EventExecutionContextCreated

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

EventExecutionContextCreated issued when new execution context is created.

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

type EventExecutionContextDestroyed

type EventExecutionContextDestroyed struct {
	ExecutionContextUniqueID string `json:"executionContextUniqueId"` // Unique Id of the destroyed context
}

EventExecutionContextDestroyed issued when execution context is destroyed.

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

type EventExecutionContextsCleared

type EventExecutionContextsCleared struct{}

EventExecutionContextsCleared issued when all executionContexts were cleared in browser.

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

type EventInspectRequested

type EventInspectRequested struct {
	Object             *RemoteObject      `json:"object"`
	Hints              jsontext.Value     `json:"hints"`
	ExecutionContextID ExecutionContextID `json:"executionContextId,omitempty,omitzero"` // Identifier of the context where the call was made.
}

EventInspectRequested issued when object should be inspected (for example, as a result of inspect() command line API call).

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

type ExceptionDetails

type ExceptionDetails struct {
	ExceptionID        int64              `json:"exceptionId"`                           // Exception id.
	Text               string             `json:"text"`                                  // Exception text, which should be used together with exception object when available.
	LineNumber         int64              `json:"lineNumber"`                            // Line number of the exception location (0-based).
	ColumnNumber       int64              `json:"columnNumber"`                          // Column number of the exception location (0-based).
	ScriptID           cdp.ScriptID       `json:"scriptId,omitempty,omitzero"`           // Script ID of the exception location.
	URL                string             `json:"url,omitempty,omitzero"`                // URL of the exception location, to be used when the script was not reported.
	StackTrace         *StackTrace        `json:"stackTrace,omitempty,omitzero"`         // JavaScript stack trace if available.
	Exception          *RemoteObject      `json:"exception,omitempty,omitzero"`          // Exception object if available.
	ExecutionContextID ExecutionContextID `json:"executionContextId,omitempty,omitzero"` // Identifier of the context where exception happened.
	ExceptionMetaData  jsontext.Value     `json:"exceptionMetaData,omitempty,omitzero"`
}

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

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

type ExecutionContextDescription

type ExecutionContextDescription struct {
	ID       ExecutionContextID `json:"id"`       // 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"`   // Execution context origin.
	Name     string             `json:"name"`     // Human readable name describing given context.
	UniqueID string             `json:"uniqueId"` // A system-unique execution context identifier. Unlike the id, this is unique across multiple processes, so can be reliably used to identify specific context while backend performs a cross-process navigation.
	AuxData  jsontext.Value     `json:"auxData,omitempty,omitzero"`
}

ExecutionContextDescription description of an isolated world.

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

type ExecutionContextID

type ExecutionContextID int64

ExecutionContextID ID of an execution context.

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

func (ExecutionContextID) Int64

func (t ExecutionContextID) Int64() int64

Int64 returns the ExecutionContextID as int64 value.

type GetExceptionDetailsParams

type GetExceptionDetailsParams struct {
	ErrorObjectID RemoteObjectID `json:"errorObjectId"` // The error object for which to resolve the exception details.
}

GetExceptionDetailsParams are the parameters of the command Runtime.getExceptionDetails.

type GetExceptionDetailsResult added in v0.157.3

type GetExceptionDetailsResult struct {
	ExceptionDetails *ExceptionDetails `json:"exceptionDetails,omitempty,omitzero"`
}

GetExceptionDetailsResult is the result of the command Runtime.getExceptionDetails.

type GetHeapUsageResult added in v0.157.3

type GetHeapUsageResult struct {
	UsedSize             float64 `json:"usedSize,omitempty,omitzero"`             // Used JavaScript heap size in bytes.
	TotalSize            float64 `json:"totalSize,omitempty,omitzero"`            // Allocated JavaScript heap size in bytes.
	EmbedderHeapUsedSize float64 `json:"embedderHeapUsedSize,omitempty,omitzero"` // Used size in bytes in the embedder's garbage-collected heap.
	BackingStorageSize   float64 `json:"backingStorageSize,omitempty,omitzero"`   // Size in bytes of backing storage for array buffers and external strings.
}

GetHeapUsageResult is the result of the command Runtime.getHeapUsage.

type GetIsolateIDResult added in v0.157.3

type GetIsolateIDResult struct {
	ID string `json:"id,omitempty,omitzero"` // The isolate id.
}

GetIsolateIDResult is the result of the command Runtime.getIsolateId.

type GetPropertiesParams

type GetPropertiesParams struct {
	ObjectID                 RemoteObjectID `json:"objectId"`                                    // Identifier of the object to return properties for.
	OwnProperties            *bool          `json:"ownProperties,omitempty,omitzero"`            // If true, returns properties belonging only to the element itself, not to its prototype chain.
	AccessorPropertiesOnly   *bool          `json:"accessorPropertiesOnly,omitempty,omitzero"`   // If true, returns accessor properties (with getter/setter) only; internal properties are not returned either.
	GeneratePreview          *bool          `json:"generatePreview,omitempty,omitzero"`          // Whether preview should be generated for the results.
	NonIndexedPropertiesOnly *bool          `json:"nonIndexedPropertiesOnly,omitempty,omitzero"` // If true, returns non-indexed properties only.
}

GetPropertiesParams are the parameters of the command Runtime.getProperties.

type GetPropertiesResult added in v0.157.3

type GetPropertiesResult struct {
	Result             []*PropertyDescriptor         `json:"result,omitempty,omitzero"`             // Object properties.
	InternalProperties []*InternalPropertyDescriptor `json:"internalProperties,omitempty,omitzero"` // Internal object properties (only of the element itself).
	PrivateProperties  []*PrivatePropertyDescriptor  `json:"privateProperties,omitempty,omitzero"`  // Object private properties.
	ExceptionDetails   *ExceptionDetails             `json:"exceptionDetails,omitempty,omitzero"`   // Exception details.
}

GetPropertiesResult is the result of the command Runtime.getProperties.

type GlobalLexicalScopeNamesParams

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

GlobalLexicalScopeNamesParams are the parameters of the command Runtime.globalLexicalScopeNames.

type GlobalLexicalScopeNamesResult added in v0.157.3

type GlobalLexicalScopeNamesResult struct {
	Names []string `json:"names,omitempty,omitzero"`
}

GlobalLexicalScopeNamesResult is the result of the command Runtime.globalLexicalScopeNames.

type InternalPropertyDescriptor

type InternalPropertyDescriptor struct {
	Name  string        `json:"name"`                     // Conventional property name.
	Value *RemoteObject `json:"value,omitempty,omitzero"` // The value associated with the property.
}

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

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

type ObjectPreview

type ObjectPreview struct {
	Type        ObjectPreviewType    `json:"type"`                           // Object type.
	Subtype     ObjectPreviewSubtype `json:"subtype,omitempty,omitzero"`     // Object subtype hint. Specified for object type values only.
	Description string               `json:"description,omitempty,omitzero"` // String representation of the object.
	Overflow    bool                 `json:"overflow"`                       // True iff some of the properties or entries of the original object did not fit.
	Properties  []*PropertyPreview   `json:"properties"`                     // List of the properties.
	Entries     []*EntryPreview      `json:"entries,omitempty,omitzero"`     // List of the entries. Specified for map and set subtype values only.
}

ObjectPreview object containing abbreviated remote object value.

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

type ObjectPreviewSubtype added in v0.157.1

type ObjectPreviewSubtype string

ObjectPreviewSubtype object subtype hint. Specified for object type values only.

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

const (
	ObjectPreviewSubtypeArray             ObjectPreviewSubtype = "array"
	ObjectPreviewSubtypeNull              ObjectPreviewSubtype = "null"
	ObjectPreviewSubtypeNode              ObjectPreviewSubtype = "node"
	ObjectPreviewSubtypeRegexp            ObjectPreviewSubtype = "regexp"
	ObjectPreviewSubtypeDate              ObjectPreviewSubtype = "date"
	ObjectPreviewSubtypeMap               ObjectPreviewSubtype = "map"
	ObjectPreviewSubtypeSet               ObjectPreviewSubtype = "set"
	ObjectPreviewSubtypeWeakmap           ObjectPreviewSubtype = "weakmap"
	ObjectPreviewSubtypeWeakset           ObjectPreviewSubtype = "weakset"
	ObjectPreviewSubtypeIterator          ObjectPreviewSubtype = "iterator"
	ObjectPreviewSubtypeGenerator         ObjectPreviewSubtype = "generator"
	ObjectPreviewSubtypeError             ObjectPreviewSubtype = "error"
	ObjectPreviewSubtypeProxy             ObjectPreviewSubtype = "proxy"
	ObjectPreviewSubtypePromise           ObjectPreviewSubtype = "promise"
	ObjectPreviewSubtypeTypedarray        ObjectPreviewSubtype = "typedarray"
	ObjectPreviewSubtypeArraybuffer       ObjectPreviewSubtype = "arraybuffer"
	ObjectPreviewSubtypeDataview          ObjectPreviewSubtype = "dataview"
	ObjectPreviewSubtypeWebassemblymemory ObjectPreviewSubtype = "webassemblymemory"
	ObjectPreviewSubtypeWasmvalue         ObjectPreviewSubtype = "wasmvalue"
	ObjectPreviewSubtypeDeferredmodule    ObjectPreviewSubtype = "deferredmodule"
	ObjectPreviewSubtypeTrustedtype       ObjectPreviewSubtype = "trustedtype"
)

ObjectPreviewSubtype values.

func (ObjectPreviewSubtype) String added in v0.157.1

func (t ObjectPreviewSubtype) String() string

String returns the ObjectPreviewSubtype as string value.

type ObjectPreviewType added in v0.157.1

type ObjectPreviewType string

ObjectPreviewType object type.

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

const (
	ObjectPreviewTypeObject    ObjectPreviewType = "object"
	ObjectPreviewTypeFunction  ObjectPreviewType = "function"
	ObjectPreviewTypeUndefined ObjectPreviewType = "undefined"
	ObjectPreviewTypeString    ObjectPreviewType = "string"
	ObjectPreviewTypeNumber    ObjectPreviewType = "number"
	ObjectPreviewTypeBoolean   ObjectPreviewType = "boolean"
	ObjectPreviewTypeSymbol    ObjectPreviewType = "symbol"
	ObjectPreviewTypeBigint    ObjectPreviewType = "bigint"
)

ObjectPreviewType values.

func (ObjectPreviewType) String added in v0.157.1

func (t ObjectPreviewType) String() string

String returns the ObjectPreviewType as string value.

type PrivatePropertyDescriptor

type PrivatePropertyDescriptor struct {
	Name  string        `json:"name"`                     // Private property name.
	Value *RemoteObject `json:"value,omitempty,omitzero"` // The value associated with the private property.
	Get   *RemoteObject `json:"get,omitempty,omitzero"`   // A function which serves as a getter for the private property, or undefined if there is no getter (accessor descriptors only).
	Set   *RemoteObject `json:"set,omitempty,omitzero"`   // A function which serves as a setter for the private property, or undefined if there is no setter (accessor descriptors only).
}

PrivatePropertyDescriptor object private field descriptor.

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

type PropertyDescriptor

type PropertyDescriptor struct {
	Name         string        `json:"name"`                      // Property name or symbol description.
	Value        *RemoteObject `json:"value,omitempty,omitzero"`  // The value associated with the property.
	Writable     bool          `json:"writable"`                  // True if the value associated with the property may be changed (data descriptors only).
	Get          *RemoteObject `json:"get,omitempty,omitzero"`    // 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,omitzero"`    // A function which serves as a setter for the property, or undefined if there is no setter (accessor descriptors only).
	Configurable bool          `json:"configurable"`              // 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"`                // True if this property shows up during enumeration of the properties on the corresponding object.
	WasThrown    bool          `json:"wasThrown"`                 // True if the result was thrown during the evaluation.
	IsOwn        bool          `json:"isOwn"`                     // True if the property is owned for the object.
	Symbol       *RemoteObject `json:"symbol,omitempty,omitzero"` // Property symbol object, if the property is of the symbol type.
}

PropertyDescriptor object property descriptor.

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

type PropertyPreview

type PropertyPreview struct {
	Name         string                 `json:"name"`                            // Property name.
	Type         PropertyPreviewType    `json:"type"`                            // Object type. Accessor means that the property itself is an accessor property.
	Value        string                 `json:"value,omitempty,omitzero"`        // User-friendly property value string.
	ValuePreview *ObjectPreview         `json:"valuePreview,omitempty,omitzero"` // Nested value preview.
	Subtype      PropertyPreviewSubtype `json:"subtype,omitempty,omitzero"`      // Object subtype hint. Specified for object type values only.
}

PropertyPreview [no description].

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

type PropertyPreviewSubtype added in v0.157.1

type PropertyPreviewSubtype string

PropertyPreviewSubtype object subtype hint. Specified for object type values only.

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

const (
	PropertyPreviewSubtypeArray             PropertyPreviewSubtype = "array"
	PropertyPreviewSubtypeNull              PropertyPreviewSubtype = "null"
	PropertyPreviewSubtypeNode              PropertyPreviewSubtype = "node"
	PropertyPreviewSubtypeRegexp            PropertyPreviewSubtype = "regexp"
	PropertyPreviewSubtypeDate              PropertyPreviewSubtype = "date"
	PropertyPreviewSubtypeMap               PropertyPreviewSubtype = "map"
	PropertyPreviewSubtypeSet               PropertyPreviewSubtype = "set"
	PropertyPreviewSubtypeWeakmap           PropertyPreviewSubtype = "weakmap"
	PropertyPreviewSubtypeWeakset           PropertyPreviewSubtype = "weakset"
	PropertyPreviewSubtypeIterator          PropertyPreviewSubtype = "iterator"
	PropertyPreviewSubtypeGenerator         PropertyPreviewSubtype = "generator"
	PropertyPreviewSubtypeError             PropertyPreviewSubtype = "error"
	PropertyPreviewSubtypeProxy             PropertyPreviewSubtype = "proxy"
	PropertyPreviewSubtypePromise           PropertyPreviewSubtype = "promise"
	PropertyPreviewSubtypeTypedarray        PropertyPreviewSubtype = "typedarray"
	PropertyPreviewSubtypeArraybuffer       PropertyPreviewSubtype = "arraybuffer"
	PropertyPreviewSubtypeDataview          PropertyPreviewSubtype = "dataview"
	PropertyPreviewSubtypeWebassemblymemory PropertyPreviewSubtype = "webassemblymemory"
	PropertyPreviewSubtypeWasmvalue         PropertyPreviewSubtype = "wasmvalue"
	PropertyPreviewSubtypeDeferredmodule    PropertyPreviewSubtype = "deferredmodule"
	PropertyPreviewSubtypeTrustedtype       PropertyPreviewSubtype = "trustedtype"
)

PropertyPreviewSubtype values.

func (PropertyPreviewSubtype) String added in v0.157.1

func (t PropertyPreviewSubtype) String() string

String returns the PropertyPreviewSubtype as string value.

type PropertyPreviewType added in v0.157.1

type PropertyPreviewType string

PropertyPreviewType object type. Accessor means that the property itself is an accessor property.

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

const (
	PropertyPreviewTypeObject    PropertyPreviewType = "object"
	PropertyPreviewTypeFunction  PropertyPreviewType = "function"
	PropertyPreviewTypeUndefined PropertyPreviewType = "undefined"
	PropertyPreviewTypeString    PropertyPreviewType = "string"
	PropertyPreviewTypeNumber    PropertyPreviewType = "number"
	PropertyPreviewTypeBoolean   PropertyPreviewType = "boolean"
	PropertyPreviewTypeSymbol    PropertyPreviewType = "symbol"
	PropertyPreviewTypeAccessor  PropertyPreviewType = "accessor"
	PropertyPreviewTypeBigint    PropertyPreviewType = "bigint"
)

PropertyPreviewType values.

func (PropertyPreviewType) String added in v0.157.1

func (t PropertyPreviewType) String() string

String returns the PropertyPreviewType as string value.

type QueryObjectsParams

type QueryObjectsParams struct {
	PrototypeObjectID RemoteObjectID `json:"prototypeObjectId"`              // Identifier of the prototype to return objects for.
	ObjectGroup       string         `json:"objectGroup,omitempty,omitzero"` // Symbolic group name that can be used to release the results.
}

QueryObjectsParams are the parameters of the command Runtime.queryObjects.

type QueryObjectsResult added in v0.157.3

type QueryObjectsResult struct {
	Objects *RemoteObject `json:"objects,omitempty,omitzero"` // Array with objects.
}

QueryObjectsResult is the result of the command Runtime.queryObjects.

type ReleaseObjectGroupParams

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

ReleaseObjectGroupParams are the parameters of the command Runtime.releaseObjectGroup.

type ReleaseObjectParams

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

ReleaseObjectParams are the parameters of the command Runtime.releaseObject.

type RemoteObject

type RemoteObject struct {
	Type                RemoteObjectType     `json:"type"`                                   // Object type.
	Subtype             RemoteObjectSubtype  `json:"subtype,omitempty,omitzero"`             // Object subtype hint. Specified for object type values only. NOTE: If you change anything here, make sure to also update subtype in ObjectPreview and PropertyPreview below.
	ClassName           string               `json:"className,omitempty,omitzero"`           // Object class (constructor) name. Specified for object type values only.
	Value               jsontext.Value       `json:"value,omitempty,omitzero"`               // Remote object value in case of primitive values or JSON values (if it was requested).
	UnserializableValue UnserializableValue  `json:"unserializableValue,omitempty,omitzero"` // Primitive value which can not be JSON-stringified does not have value, but gets this property.
	Description         string               `json:"description,omitempty,omitzero"`         // String representation of the object.
	DeepSerializedValue *DeepSerializedValue `json:"deepSerializedValue,omitempty,omitzero"` // Deep serialized value.
	ObjectID            RemoteObjectID       `json:"objectId,omitempty,omitzero"`            // Unique object identifier (for non-primitive values).
	Preview             *ObjectPreview       `json:"preview,omitempty,omitzero"`             // Preview containing abbreviated property values. Specified for object type values only.
	CustomPreview       *CustomPreview       `json:"customPreview,omitempty,omitzero"`
}

RemoteObject mirror object referencing original JavaScript object.

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

type RemoteObjectID

type RemoteObjectID string

RemoteObjectID unique object identifier.

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

func (RemoteObjectID) String

func (t RemoteObjectID) String() string

String returns the RemoteObjectID as string value.

type RemoteObjectSubtype added in v0.157.1

type RemoteObjectSubtype string

RemoteObjectSubtype object subtype hint. Specified for object type values only. NOTE: If you change anything here, make sure to also update subtype in ObjectPreview and PropertyPreview below.

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

const (
	RemoteObjectSubtypeArray             RemoteObjectSubtype = "array"
	RemoteObjectSubtypeNull              RemoteObjectSubtype = "null"
	RemoteObjectSubtypeNode              RemoteObjectSubtype = "node"
	RemoteObjectSubtypeRegexp            RemoteObjectSubtype = "regexp"
	RemoteObjectSubtypeDate              RemoteObjectSubtype = "date"
	RemoteObjectSubtypeMap               RemoteObjectSubtype = "map"
	RemoteObjectSubtypeSet               RemoteObjectSubtype = "set"
	RemoteObjectSubtypeWeakmap           RemoteObjectSubtype = "weakmap"
	RemoteObjectSubtypeWeakset           RemoteObjectSubtype = "weakset"
	RemoteObjectSubtypeIterator          RemoteObjectSubtype = "iterator"
	RemoteObjectSubtypeGenerator         RemoteObjectSubtype = "generator"
	RemoteObjectSubtypeError             RemoteObjectSubtype = "error"
	RemoteObjectSubtypeProxy             RemoteObjectSubtype = "proxy"
	RemoteObjectSubtypePromise           RemoteObjectSubtype = "promise"
	RemoteObjectSubtypeTypedarray        RemoteObjectSubtype = "typedarray"
	RemoteObjectSubtypeArraybuffer       RemoteObjectSubtype = "arraybuffer"
	RemoteObjectSubtypeDataview          RemoteObjectSubtype = "dataview"
	RemoteObjectSubtypeWebassemblymemory RemoteObjectSubtype = "webassemblymemory"
	RemoteObjectSubtypeWasmvalue         RemoteObjectSubtype = "wasmvalue"
	RemoteObjectSubtypeDeferredmodule    RemoteObjectSubtype = "deferredmodule"
	RemoteObjectSubtypeTrustedtype       RemoteObjectSubtype = "trustedtype"
)

RemoteObjectSubtype values.

func (RemoteObjectSubtype) String added in v0.157.1

func (t RemoteObjectSubtype) String() string

String returns the RemoteObjectSubtype as string value.

type RemoteObjectType added in v0.157.1

type RemoteObjectType string

RemoteObjectType object type.

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

const (
	RemoteObjectTypeObject    RemoteObjectType = "object"
	RemoteObjectTypeFunction  RemoteObjectType = "function"
	RemoteObjectTypeUndefined RemoteObjectType = "undefined"
	RemoteObjectTypeString    RemoteObjectType = "string"
	RemoteObjectTypeNumber    RemoteObjectType = "number"
	RemoteObjectTypeBoolean   RemoteObjectType = "boolean"
	RemoteObjectTypeSymbol    RemoteObjectType = "symbol"
	RemoteObjectTypeBigint    RemoteObjectType = "bigint"
)

RemoteObjectType values.

func (RemoteObjectType) String added in v0.157.1

func (t RemoteObjectType) String() string

String returns the RemoteObjectType as string value.

type RemoveBindingParams

type RemoveBindingParams struct {
	Name string `json:"name"`
}

RemoveBindingParams are the parameters of the command Runtime.removeBinding.

type RunScriptParams

type RunScriptParams struct {
	ScriptID              cdp.ScriptID       `json:"scriptId"`                                 // Id of the script to run.
	ExecutionContextID    ExecutionContextID `json:"executionContextId,omitempty,omitzero"`    // 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,omitzero"`           // Symbolic group name that can be used to release multiple objects.
	Silent                *bool              `json:"silent,omitempty,omitzero"`                // In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state.
	IncludeCommandLineAPI *bool              `json:"includeCommandLineAPI,omitempty,omitzero"` // Determines whether Command Line API should be available during the evaluation.
	ReturnByValue         *bool              `json:"returnByValue,omitempty,omitzero"`         // Whether the result is expected to be a JSON object which should be sent by value.
	GeneratePreview       *bool              `json:"generatePreview,omitempty,omitzero"`       // Whether preview should be generated for the result.
	AwaitPromise          *bool              `json:"awaitPromise,omitempty,omitzero"`          // Whether execution should await for resulting value and return once awaited promise is resolved.
}

RunScriptParams are the parameters of the command Runtime.runScript.

type RunScriptResult added in v0.157.3

type RunScriptResult struct {
	Result           *RemoteObject     `json:"result,omitempty,omitzero"`           // Run result.
	ExceptionDetails *ExceptionDetails `json:"exceptionDetails,omitempty,omitzero"` // Exception details.
}

RunScriptResult is the result of the command Runtime.runScript.

type SerializationOptions

type SerializationOptions struct {
	Serialization        SerializationOptionsSerialization `json:"serialization"`
	MaxDepth             int64                             `json:"maxDepth,omitempty,omitzero"` // Deep serialization depth. Default is full depth. Respected only in deep serialization mode.
	AdditionalParameters jsontext.Value                    `json:"additionalParameters,omitempty,omitzero"`
}

SerializationOptions represents options for serialization. Overrides generatePreview and returnByValue.

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

type SerializationOptionsSerialization added in v0.157.1

type SerializationOptionsSerialization string

SerializationOptionsSerialization [no description].

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

const (
	SerializationOptionsSerializationDeep   SerializationOptionsSerialization = "deep"
	SerializationOptionsSerializationJSON   SerializationOptionsSerialization = "json"
	SerializationOptionsSerializationIDOnly SerializationOptionsSerialization = "idOnly"
)

SerializationOptionsSerialization values.

func (SerializationOptionsSerialization) String added in v0.157.1

String returns the SerializationOptionsSerialization as string value.

type SetCustomObjectFormatterEnabledParams

type SetCustomObjectFormatterEnabledParams struct {
	Enabled bool `json:"enabled"`
}

SetCustomObjectFormatterEnabledParams are the parameters of the command Runtime.setCustomObjectFormatterEnabled.

type SetMaxCallStackSizeToCaptureParams

type SetMaxCallStackSizeToCaptureParams struct {
	Size int64 `json:"size"`
}

SetMaxCallStackSizeToCaptureParams are the parameters of the command Runtime.setMaxCallStackSizeToCapture.

type StackTrace

type StackTrace struct {
	Description string        `json:"description,omitempty,omitzero"` // 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"`                     // JavaScript function name.
	Parent      *StackTrace   `json:"parent,omitempty,omitzero"`      // Asynchronous JavaScript stack trace that preceded this stack, if available.
	ParentID    *StackTraceID `json:"parentId,omitempty,omitzero"`    // Asynchronous JavaScript stack trace that preceded this stack, if available.
}

StackTrace call frames for assertions or error messages.

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

type StackTraceID

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

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

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

type TimeDelta

type TimeDelta float64

TimeDelta number of milliseconds.

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

func (TimeDelta) Float64

func (t TimeDelta) Float64() float64

Float64 returns the TimeDelta as float64 value.

type Timestamp

type Timestamp float64

Timestamp number of milliseconds since epoch.

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

func (Timestamp) Float64

func (t Timestamp) Float64() float64

Float64 returns the Timestamp as float64 value.

type UnserializableValue

type UnserializableValue string

UnserializableValue primitive value which cannot be JSON-stringified. Includes values -0, NaN, Infinity, -Infinity, and bigint literals.

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

func (UnserializableValue) String

func (t UnserializableValue) String() string

String returns the UnserializableValue as string value.

Jump to

Keyboard shortcuts

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