← Back to CSS domain

CSS.getAnimatedStylesForNode

Returns the styles coming from animations & transitions including the animation & transition styles coming from inheritance chain.

Domain: CSS experimental

Parameters

NameTypeDescription
nodeIdDOM.NodeId

Returns

NameTypeDescription
animationStylesarrayStyles coming from animations.
transitionsStyleCSSStyleStyle coming from transitions.
inheritedarrayInherited style entries for animationsStyle and transitionsStyle from the inheritance chain of the element.

Example Request

{
  "id": 1,
  "method": "CSS.getAnimatedStylesForNode",
  "params": {
    "nodeId": 1
  }
}

Example Response

{
  "id": 1,
  "result": {
    "animationStyles": [],
    "transitionsStyle": "transitionsStyle-value",
    "inherited": []
  }
}

Usage in Node.js

const result = await send('CSS.getAnimatedStylesForNode', {"nodeId": 1});
console.log(result);
// {"animationStyles": [], "transitionsStyle": "transitionsStyle-value", "inherited": []}