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.

Method names for the Runtime domain, for use with CdpClient::call.

Constantsยง

ADD_BINDING
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.
AWAIT_PROMISE
Add handler to promise with given promise object id.
CALL_FUNCTION_ON
Calls function with given declaration on the given object. Object group of the result is inherited from the target object.
COMPILE_SCRIPT
Compiles expression.
DISABLE
Disables reporting of execution contexts creation.
DISCARD_CONSOLE_ENTRIES
Discards collected exceptions and console API calls.
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.
EVALUATE
Evaluates expression on global object.
GET_EXCEPTION_DETAILS
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.
GET_HEAP_USAGE
Returns the JavaScript heap usage. It is the total usage of the corresponding isolate not scoped to a particular Runtime.
GET_ISOLATE_ID
Returns the isolate id.
GET_PROPERTIES
Returns properties of a given object. Object group of the result is inherited from the target object.
GLOBAL_LEXICAL_SCOPE_NAMES
Returns all let, const and class variables from global scope.
QUERY_OBJECTS
Runtime.queryObjects
RELEASE_OBJECT
Releases remote object with given id.
RELEASE_OBJECT_GROUP
Releases all remote objects that belong to a given group.
REMOVE_BINDING
This method does not remove binding function from global object but unsubscribes current runtime agent from Runtime.bindingCalled notifications.
RUN_IF_WAITING_FOR_DEBUGGER
Tells inspected instance to run if it was waiting for debugger to attach.
RUN_SCRIPT
Runs script with given id in a given context.
SET_ASYNC_CALL_STACK_DEPTH
Enables or disables async call stacks tracking.
SET_CUSTOM_OBJECT_FORMATTER_ENABLED
Runtime.setCustomObjectFormatterEnabled
SET_MAX_CALL_STACK_SIZE_TO_CAPTURE
Runtime.setMaxCallStackSizeToCapture
TERMINATE_EXECUTION
Terminate current or next JavaScript execution. Will cancel the termination when the outer-most script execution ends.