← Back to CSS domain
CSS.getInlineStylesForNode
Returns the styles defined inline (explicitly in the "style" attribute and implicitly, using DOM
attributes) for a DOM node identified by `nodeId`.
Domain: CSS
experimental
Parameters
| Name | Type | Description |
nodeId | DOM.NodeId | |
Returns
| Name | Type | Description |
inlineStyle | CSSStyle | Inline style for the specified DOM node. |
attributesStyle | CSSStyle | Attribute-defined element style (e.g. resulting from "width=20 height=100%"). |
Example Request
{
"id": 1,
"method": "CSS.getInlineStylesForNode",
"params": {
"nodeId": 1
}
}
Example Response
{
"id": 1,
"result": {
"inlineStyle": "inlineStyle-value",
"attributesStyle": "attributesStyle-value"
}
}
Usage in Node.js
const result = await send('CSS.getInlineStylesForNode', {"nodeId": 1});
console.log(result);
// {"inlineStyle": "inlineStyle-value", "attributesStyle": "attributesStyle-value"}