Runtime.evaluate

Evaluates expression on global object.

{
  "name": "evaluate",
  "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.",
      "hidden": true
    },
    {
      "name": "doNotPauseOnExceptionsAndMuteConsole",
      "type": "boolean",
      "optional": true,
      "description": "Specifies whether evaluation should stop on exceptions and mute console. Overrides setPauseOnException state.",
      "hidden": true
    },
    {
      "name": "contextId",
      "$ref": "ExecutionContextId",
      "optional": true,
      "description": "Specifies in which isolated context to perform evaluation. Each content script lives in an isolated context and this parameter may be used to specify one of those contexts. If the parameter is omitted or 0 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,
      "hidden": true,
      "description": "Whether preview should be generated for the result."
    }
  ],
  "returns": [
    {
      "name": "result",
      "$ref": "RemoteObject",
      "description": "Evaluation result."
    },
    {
      "name": "wasThrown",
      "type": "boolean",
      "optional": true,
      "description": "True if the result was thrown during the evaluation."
    },
    {
      "name": "exceptionDetails",
      "$ref": "Debugger.ExceptionDetails",
      "optional": true,
      "hidden": true,
      "description": "Exception details."
    }
  ],
  "description": "Evaluates expression on global object."
}