Runtime.compileScript

Compiles expression.

{
  "name": "compileScript",
  "parameters": [
    {
      "name": "expression",
      "type": "string",
      "description": "Expression to compile."
    },
    {
      "name": "sourceURL",
      "type": "string",
      "description": "Source url to be set for the script."
    },
    {
      "name": "persistScript",
      "type": "boolean",
      "description": "Specifies whether the compiled script should be persisted."
    },
    {
      "name": "executionContextId",
      "$ref": "ExecutionContextId",
      "optional": true,
      "description": "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."
    }
  ],
  "returns": [
    {
      "name": "scriptId",
      "$ref": "ScriptId",
      "optional": true,
      "description": "Id of the script."
    },
    {
      "name": "exceptionDetails",
      "$ref": "ExceptionDetails",
      "optional": true,
      "description": "Exception details."
    }
  ],
  "description": "Compiles expression."
}