Name
CSSStyleDeclaration.getPropertyCSSValue( ) — return a CSS attribute value as an object
Availability
DOM Level 2 CSS
Synopsis
CSSValue getPropertyCSSValue(String propertyName
);
Arguments
-
propertyName
The name of the desired CSS attribute.
Returns
A CSSValue object that represents the value of the named attribute if
it is explicitly specified in this style declaration, or
null
if the named attribute is not specified. This
method also returns null
if
propertyName
specifies a CSS shorthand
attribute, since shorthand attributes specify more than one value and
cannot be represented with CSSValue objects.
Get JavaScript: The Definitive Guide, Fourth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.