Runtime.evaluate

Evaluates expression on global object.

{
  "name": "evaluate",
  "async": true,
  "parameters": [
    {
      "name": "expression",
      "type": "string",
      "description": "Expression to evaluate."
    },
    {
      "name": "objectGroup",
      "type": "string",
      "optional": true,
      "description": "Symbolic group name that can be used to release multiple objects."
    },
    {
      "name": "includeCommandLineAPI",
      "type": "boolean",
      "optional": true,
      "description": "Determines whether Command Line API should be available during the evaluation."
    },
    {
      "name": "silent",
      "type": "boolean",
      "optional": true,
      "description": "In silent mode exceptions thrown during evaluation are not reported and do not pause execution. Overrides setPauseOnException state."
    },
    {
      "name": "contextId",
      "$ref": "ExecutionContextId",
      "optional": true,
      "description": "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."
    },
    {
      "name": "returnByValue",
      "type": "boolean",
      "optional": true,
      "description": "Whether the result is expected to be a JSON object that should be sent by value."
    },
    {
      "name": "generatePreview",
      "type": "boolean",
      "optional": true,
      "experimental": true,
      "description": "Whether preview should be generated for the result."
    },
    {
      "name": "userGesture",
      "type": "boolean",
      "optional": true,
      "experimental": true,
      "description": "Whether execution should be treated as initiated by user in the UI."
    },
    {
      "name": "awaitPromise",
      "type": "boolean",
      "optional": true,
      "description": "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": [
    {
      "name": "result",
      "$ref": "RemoteObject",
      "description": "Evaluation result."
    },
    {
      "name": "exceptionDetails",
      "$ref": "ExceptionDetails",
      "optional": true,
      "description": "Exception details."
    }
  ],
  "description": "Evaluates expression on global object."
}