← Back to Animation domain

Animation.getCurrentTime

Returns the current time of the an animation.

Domain: Animation experimental

Parameters

NameTypeDescription
idstringId of animation.

Returns

NameTypeDescription
currentTimenumberCurrent time of the page.

Example Request

{
  "id": 1,
  "method": "Animation.getCurrentTime",
  "params": {
    "id": "id-value"
  }
}

Example Response

{
  "id": 1,
  "result": {
    "currentTime": 1.0
  }
}

Usage in Node.js

const result = await send('Animation.getCurrentTime', {"id": "id-value"});
console.log(result);
// {"currentTime": 1.0}