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,31 @@ 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+ * Gives the legacy object representation of the value of a CSS property if it
89+ * has been explicitly set within this declaration block.
90+ * <p>
91+ * This method returns <code>null</code> if the property is a shorthand
92+ * property. Shorthand property values can only be accessed and modified as
93+ * strings, using the <code>getPropertyValue</code> and <code>setProperty</code>
94+ * methods.
95+ * </p>
96+ *
97+ * @param propertyName The name of the CSS property.
98+ * @return the value of the property if it has been explicitly set for this
99+ * declaration block. Returns <code>null</code> if the property has not
100+ * been set, or the implementation does not support legacy object
101+ * values.
102+ */
103+ @ SuppressWarnings ("exports" )
104+ @ Override
105+ default CSSValue getPropertyCSSValue (String propertyName ) {
106+ return null ;
107+ }
108+
79109 /**
80110 * Gets the object representation of the value of a CSS property if it has been
81111 * explicitly set for this declaration block.
@@ -109,6 +139,7 @@ default CSSStyleValue getCSSStyleValue(String propertyName) {
109139 * block, or the empty string if the property has not been set or is a shorthand
110140 * that could not be serialized.
111141 */
142+ @ Override
112143 String getPropertyValue (String propertyName );
113144
114145 /**
@@ -117,6 +148,7 @@ default CSSStyleValue getCSSStyleValue(String propertyName) {
117148 * @return the CSS rule that contains this declaration block or <code>null</code> if this
118149 * <code>CSSStyleDeclaration</code> is not attached to a <code>CSSRule</code>.
119150 */
151+ @ Override
120152 CSSRule getParentRule ();
121153
122154}
0 commit comments