Chrome Remote Interface v0.0.3 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.

Link to this section Summary

Functions

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

Compiles expression

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

Link to this section Functions

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.

Link to this function awaitPromise(page_pid, parameters) View Source
Link to this function awaitPromise(page_pid, parameters, opts) View Source
Link to this function callFunctionOn(page_pid) View Source

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.

Link to this function callFunctionOn(page_pid, parameters) View Source
Link to this function callFunctionOn(page_pid, parameters, opts) View Source

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.

Link to this function compileScript(page_pid, parameters) View Source
Link to this function compileScript(page_pid, parameters, opts) View Source

Disables reporting of execution contexts creation.

Parameters:

Link to this function disable(page_pid, parameters) View Source
Link to this function disable(page_pid, parameters, opts) View Source
Link to this function discardConsoleEntries(page_pid) View Source

Discards collected exceptions and console API calls.

Parameters:

Link to this function discardConsoleEntries(page_pid, parameters) View Source
Link to this function discardConsoleEntries(page_pid, parameters, opts) View Source

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:

Link to this function enable(page_pid, parameters) View Source
Link to this function enable(page_pid, parameters, opts) View Source

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.

Link to this function evaluate(page_pid, parameters) View Source
Link to this function evaluate(page_pid, parameters, opts) View Source

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.

Link to this function getProperties(page_pid, parameters) View Source
Link to this function getProperties(page_pid, parameters, opts) View Source

Releases remote object with given id.

Parameters: objectId - - Identifier of the object to release.

Link to this function releaseObject(page_pid, parameters) View Source
Link to this function releaseObject(page_pid, parameters, opts) View Source
Link to this function releaseObjectGroup(page_pid) View Source

Releases all remote objects that belong to a given group.

Parameters: objectGroup - - Symbolic object group name.

Link to this function releaseObjectGroup(page_pid, parameters) View Source
Link to this function releaseObjectGroup(page_pid, parameters, opts) View Source
Link to this function runIfWaitingForDebugger(page_pid) View Source

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

Parameters:

Link to this function runIfWaitingForDebugger(page_pid, parameters) View Source
Link to this function runIfWaitingForDebugger(page_pid, parameters, opts) View Source

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.

Link to this function runScript(page_pid, parameters) View Source
Link to this function runScript(page_pid, parameters, opts) View Source
Link to this function setCustomObjectFormatterEnabled(page_pid) View Source

Parameters: enabled - -

Link to this function setCustomObjectFormatterEnabled(page_pid, parameters) View Source
Link to this function setCustomObjectFormatterEnabled(page_pid, parameters, opts) View Source