Name

CSSStyleDeclaration.getPropertyPriority( ) — get the priority of a CSS attribute

Availability

DOM Level 2 CSS

Synopsis

String getPropertyPriority(String propertyName);

Arguments

propertyName

The name of the CSS attribute.

Returns

The string “important” if the named CSS attribute is explicitly specified in this declaration block and has the !important priority modifier. Returns the empty string otherwise.

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.