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
executionContextCreatedevent. 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.