1212
1313import org .w3c .css .om .typed .CSSStyleValue ;
1414import org .w3c .dom .DOMException ;
15+ import org .w3c .dom .css .CSSValue ;
1516
1617/**
1718 * CSS style declaration.
1819 */
19- public interface CSSStyleDeclaration {
20+ public interface CSSStyleDeclaration extends org . w3c . dom . css . CSSStyleDeclaration {
2021
2122 /**
2223 * A parsable serialization of the declaration.
2324 *
2425 * @return the textual representation of the declaration.
2526 */
27+ @ Override
2628 String getCssText ();
2729
2830 /**
@@ -31,6 +33,7 @@ public interface CSSStyleDeclaration {
3133 *
3234 * @param cssText the serialized style declaration.
3335 */
36+ @ Override
3437 void setCssText (String cssText ) throws DOMException ;
3538
3639 /**
@@ -40,6 +43,7 @@ public interface CSSStyleDeclaration {
4043 * @return the value of the removed property, or the empty string if that
4144 * property was not explicitly set in this declaration.
4245 */
46+ @ Override
4347 String removeProperty (String propertyName ) throws DOMException ;
4448
4549 /**
@@ -48,6 +52,7 @@ public interface CSSStyleDeclaration {
4852 * @param propertyName the name of the property.
4953 * @return the priority string, or the empty string if no priority was set.
5054 */
55+ @ Override
5156 String getPropertyPriority (String propertyName );
5257
5358 /**
@@ -57,13 +62,15 @@ public interface CSSStyleDeclaration {
5762 * @param value the property value.
5863 * @param priority the priority.
5964 */
65+ @ Override
6066 void setProperty (String propertyName , String value , String priority ) throws DOMException ;
6167
6268 /**
6369 * The number of properties in this declaration.
6470 *
6571 * @return the number of properties in this declaration.
6672 */
73+ @ Override
6774 int getLength ();
6875
6976 /**
@@ -74,8 +81,27 @@ public interface CSSStyleDeclaration {
7481 * less than zero, or greater or equal to the length of this
7582 * declaration.
7683 */
84+ @ Override
7785 String item (int index );
7886
87+ /**
88+ * Used to retrieve the object representation of the value of a CSS property if
89+ * it has been explicitly set within this declaration block. This method returns
90+ * <code>null</code> if the property is a shorthand property. Shorthand property
91+ * values can only be accessed and modified as strings, using the
92+ * <code>getPropertyValue</code> and <code>setProperty</code> methods.
93+ *
94+ * @param propertyName The name of the CSS property. See the CSS property index.
95+ * @return Returns the value of the property if it has been explicitly set for
96+ * this declaration block. Returns <code>null</code> if the property has
97+ * not been set.
98+ */
99+ @ SuppressWarnings ("exports" )
100+ @ Override
101+ default CSSValue getPropertyCSSValue (String propertyName ) {
102+ return null ;
103+ }
104+
79105 /**
80106 * Gets the object representation of the value of a CSS property if it has been
81107 * explicitly set for this declaration block.
@@ -109,6 +135,7 @@ default CSSStyleValue getCSSStyleValue(String propertyName) {
109135 * block, or the empty string if the property has not been set or is a shorthand
110136 * that could not be serialized.
111137 */
138+ @ Override
112139 String getPropertyValue (String propertyName );
113140
114141 /**
@@ -117,6 +144,7 @@ default CSSStyleValue getCSSStyleValue(String propertyName) {
117144 * @return the CSS rule that contains this declaration block or <code>null</code> if this
118145 * <code>CSSStyleDeclaration</code> is not attached to a <code>CSSRule</code>.
119146 */
147+ @ Override
120148 CSSRule getParentRule ();
121149
122150}
0 commit comments