Chrome Remote Interface v0.0.4
ChromeRemoteInterface.RPC.Runtime
View Source
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.
Add handler to promise with given promise object id
Calls function with given declaration on the given object. Object group of the result is inherited from the target object
Disables reporting of execution contexts creation
Discards collected exceptions and console API calls
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
Evaluates expression on global object
Returns properties of a given object. Object group of the result is inherited from the target object
Releases remote object with given id
Releases all remote objects that belong to a given group
Tells inspected instance to run if it was waiting for debugger to attach
Runs script with given id in a given context
Add handler to promise with given promise object id.
Parameters:
promiseObjectId - - Identifier of the promise.returnByValue - - Whether the result is expected to be a JSON object that should be sent by value.generatePreview - - Whether preview should be generated for the result.
Calls function with given declaration on the given object. Object group of the result is inherited from the target object.
Parameters:
objectId - - Identifier of the object to call function on.functionDeclaration - - Declaration of the function to call.arguments - - Call arguments. All call arguments must belong to the same JavaScript world as the target object.silent - - In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException
state.returnByValue - - Whether the result is expected to be a JSON object which should be sent by value.generatePreview - - Whether preview should be generated for the result.userGesture - - Whether execution should be treated as initiated by user in the UI.awaitPromise - - Whether execution should wait for promise to be resolved. If the result of evaluation is not a Promise, it’s considered to be an error.
Compiles expression.
Parameters:
expression - - Expression to compile.sourceURL - - Source url to be set for the script.persistScript - - Specifies whether the compiled script should be persisted.executionContextId - - 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.
Disables reporting of execution contexts creation.
Parameters:
Discards collected exceptions and console API calls.
Parameters:
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.
Parameters:
Evaluates expression on global object.
Parameters:
expression - - Expression to evaluate.objectGroup - - Symbolic group name that can be used to release multiple objects.includeCommandLineAPI - - Determines whether Command Line API should be available during the evaluation.silent - - In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException
state.contextId - - 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.returnByValue - - Whether the result is expected to be a JSON object that should be sent by value.generatePreview - - Whether preview should be generated for the result.userGesture - - Whether execution should be treated as initiated by user in the UI.awaitPromise - - Whether execution should wait for promise to be resolved. If the result of evaluation is not a Promise, it’s considered to be an error.
Returns properties of a given object. Object group of the result is inherited from the target object.
Parameters:
objectId - - Identifier of the object to return properties for.ownProperties - - If true, returns properties belonging only to the element itself, not to its prototype chain.accessorPropertiesOnly - - If true, returns accessor properties (with getter/setter) only; internal properties are not returned either.generatePreview - - Whether preview should be generated for the results.
Releases remote object with given id.
Parameters:
objectId - - Identifier of the object to release.
Releases all remote objects that belong to a given group.
Parameters:
objectGroup - - Symbolic object group name.
Tells inspected instance to run if it was waiting for debugger to attach.
Parameters:
Runs script with given id in a given context.
Parameters:
scriptId - - Id of the script to run.executionContextId - - 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 - - Symbolic group name that can be used to release multiple objects.silent - - In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException
state.includeCommandLineAPI - - Determines whether Command Line API should be available during the evaluation.returnByValue - - Whether the result is expected to be a JSON object which should be sent by value.generatePreview - - Whether preview should be generated for the result.awaitPromise - - Whether execution should wait for promise to be resolved. If the result of evaluation is not a Promise, it’s considered to be an error.