← Back to LayerTree domain
LayerTree.replaySnapshot
Replays the layer snapshot and returns the resulting bitmap.
Domain: LayerTree
experimental
Parameters
| Name | Type | Description |
snapshotId | SnapshotId | The id of the layer snapshot. |
fromStep (optional) | integer | The first step to replay from (replay from the very start if not specified). |
toStep (optional) | integer | The last step to replay to (replay till the end if not specified). |
scale (optional) | number | The scale to apply while replaying (defaults to 1). |
Returns
| Name | Type | Description |
dataURL | string | A data: URL for resulting image. |
Example Request
{
"id": 1,
"method": "LayerTree.replaySnapshot",
"params": {
"snapshotId": "snapshotId-value"
}
}
Example Response
{
"id": 1,
"result": {
"dataURL": "dataURL-value"
}
}
Usage in Node.js
const result = await send('LayerTree.replaySnapshot', {"snapshotId": "snapshotId-value"});
console.log(result);
// {"dataURL": "dataURL-value"}