Runtime.runScript
Runs script with given id in a given context.
{
"name": "runScript",
"parameters": [
{
"name": "scriptId",
"$ref": "ScriptId",
"description": "Id of the script to run."
},
{
"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."
},
{
"name": "objectGroup",
"type": "string",
"optional": true,
"description": "Symbolic group name that can be used to release multiple objects."
},
{
"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": "includeCommandLineAPI",
"type": "boolean",
"optional": true,
"description": "Determines whether Command Line API should be available during the evaluation."
},
{
"name": "returnByValue",
"type": "boolean",
"optional": true,
"description": "Whether the result is expected to be a JSON object which should be sent by value."
},
{
"name": "generatePreview",
"type": "boolean",
"optional": true,
"description": "Whether preview should be generated for the result."
},
{
"name": "awaitPromise",
"type": "boolean",
"optional": true,
"description": "Whether execution should await
for resulting value and return once awaited promise is resolved."
}
],
"returns": [
{
"name": "result",
"$ref": "RemoteObject",
"description": "Run result."
},
{
"name": "exceptionDetails",
"$ref": "ExceptionDetails",
"optional": true,
"description": "Exception details."
}
],
"description": "Runs script with given id in a given context."
}