← Back to LayerTree domain

LayerTree.replaySnapshot

Replays the layer snapshot and returns the resulting bitmap.

Domain: LayerTree experimental

Parameters

NameTypeDescription
snapshotIdSnapshotIdThe id of the layer snapshot.
fromStep (optional)integerThe first step to replay from (replay from the very start if not specified).
toStep (optional)integerThe last step to replay to (replay till the end if not specified).
scale (optional)numberThe scale to apply while replaying (defaults to 1).

Returns

NameTypeDescription
dataURLstringA 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"}