Skip to main content

Module runtime

Module runtime 

Source
Expand description

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.

Types, command parameters and event payloads for the Runtime domain. The method-name constants for the same domain are in crate::methods.

Structs§

AddBindingParams
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.
AwaitPromiseParams
Add handler to promise with given promise object id.
AwaitPromiseReturns
What Runtime.awaitPromise answers with.
BindingCalledEvent
Notification is issued every time when binding is called.
CallArgument
Represents function call argument. Either remote object id objectId, primitive value, unserializable primitive value or neither of (for undefined) them should be specified.
CallFrame
Stack entry for runtime errors and assertions.
CallFunctionOnParams
Calls function with given declaration on the given object. Object group of the result is inherited from the target object.
CallFunctionOnReturns
What Runtime.callFunctionOn answers with.
CompileScriptParams
Compiles expression.
CompileScriptReturns
What Runtime.compileScript answers with.
ConsoleApiCalledEvent
Issued when console API was called.
CustomPreview
Experimental: may change without notice.
DeepSerializedValue
Represents deep serialized value.
DisableParams
Disables reporting of execution contexts creation.
DiscardConsoleEntriesParams
Discards collected exceptions and console API calls.
EnableParams
Enables reporting of execution contexts creation by means of executionContextCreated event. When the reporting gets enabled the event will be sent immediately for each existing execution context.
EntryPreview
Experimental: may change without notice.
EvaluateParams
Evaluates expression on global object.
EvaluateReturns
What Runtime.evaluate answers with.
ExceptionDetails
Detailed information about exception (or error) that was thrown during script compilation or execution.
ExceptionRevokedEvent
Issued when unhandled exception was revoked.
ExceptionThrownEvent
Issued when exception was thrown and unhandled.
ExecutionContextCreatedEvent
Issued when new execution context is created.
ExecutionContextDescription
Description of an isolated world.
ExecutionContextDestroyedEvent
Issued when execution context is destroyed.
ExecutionContextsClearedEvent
Issued when all executionContexts were cleared in browser
GetExceptionDetailsParams
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.
GetExceptionDetailsReturns
What Runtime.getExceptionDetails answers with.
GetHeapUsageParams
Returns the JavaScript heap usage. It is the total usage of the corresponding isolate not scoped to a particular Runtime.
GetHeapUsageReturns
What Runtime.getHeapUsage answers with.
GetIsolateIdParams
Returns the isolate id.
GetIsolateIdReturns
What Runtime.getIsolateId answers with.
GetPropertiesParams
Returns properties of a given object. Object group of the result is inherited from the target object.
GetPropertiesReturns
What Runtime.getProperties answers with.
GlobalLexicalScopeNamesParams
Returns all let, const and class variables from global scope.
GlobalLexicalScopeNamesReturns
What Runtime.globalLexicalScopeNames answers with.
InspectRequestedEvent
Issued when object should be inspected (for example, as a result of inspect() command line API call).
InternalPropertyDescriptor
Object internal property descriptor. This property isn’t normally visible in JavaScript code.
ObjectPreview
Object containing abbreviated remote object value.
PrivatePropertyDescriptor
Object private field descriptor.
PropertyDescriptor
Object property descriptor.
PropertyPreview
Experimental: may change without notice.
QueryObjectsParams
Parameters of Runtime.queryObjects.
QueryObjectsReturns
What Runtime.queryObjects answers with.
ReleaseObjectGroupParams
Releases all remote objects that belong to a given group.
ReleaseObjectParams
Releases remote object with given id.
RemoteObject
Mirror object referencing original JavaScript object.
RemoveBindingParams
This method does not remove binding function from global object but unsubscribes current runtime agent from Runtime.bindingCalled notifications.
RunIfWaitingForDebuggerParams
Tells inspected instance to run if it was waiting for debugger to attach.
RunScriptParams
Runs script with given id in a given context.
RunScriptReturns
What Runtime.runScript answers with.
SerializationOptions
Represents options for serialization. Overrides generatePreview and returnByValue.
SetAsyncCallStackDepthParams
Enables or disables async call stacks tracking.
SetCustomObjectFormatterEnabledParams
Experimental: may change without notice.
SetMaxCallStackSizeToCaptureParams
Experimental: may change without notice.
StackTrace
Call frames for assertions or error messages.
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.
TerminateExecutionParams
Terminate current or next JavaScript execution. Will cancel the termination when the outer-most script execution ends.

Enums§

ConsoleApiCalledType
The values type accepts on consoleAPICalled.
DeepSerializedValueType
The values type accepts on DeepSerializedValue.
ObjectPreviewSubtype
The values subtype accepts on ObjectPreview.
ObjectPreviewType
The values type accepts on ObjectPreview.
PropertyPreviewSubtype
The values subtype accepts on PropertyPreview.
PropertyPreviewType
The values type accepts on PropertyPreview.
RemoteObjectSubtype
The values subtype accepts on RemoteObject.
RemoteObjectType
The values type accepts on RemoteObject.
SerializationOptionsSerialization
The values serialization accepts on SerializationOptions.

Type Aliases§

ExecutionContextId
Id of an execution context.
RemoteObjectId
Unique object identifier.
ScriptId
Unique script identifier.
TimeDelta
Number of milliseconds.
Timestamp
Number of milliseconds since epoch.
UniqueDebuggerId
Unique identifier of current debugger.
UnserializableValue
Primitive value which cannot be JSON-stringified. Includes values -0, NaN, Infinity, -Infinity, and bigint literals.