12
12
13
13
import org .w3c .css .om .typed .CSSStyleValue ;
14
14
import org .w3c .dom .DOMException ;
15
+ import org .w3c .dom .css .CSSValue ;
15
16
16
17
/**
17
18
* CSS style declaration.
18
19
*/
19
- public interface CSSStyleDeclaration {
20
+ public interface CSSStyleDeclaration extends org . w3c . dom . css . CSSStyleDeclaration {
20
21
21
22
/**
22
23
* A parsable serialization of the declaration.
23
24
*
24
25
* @return the textual representation of the declaration.
25
26
*/
27
+ @ Override
26
28
String getCssText ();
27
29
28
30
/**
@@ -31,6 +33,7 @@ public interface CSSStyleDeclaration {
31
33
*
32
34
* @param cssText the serialized style declaration.
33
35
*/
36
+ @ Override
34
37
void setCssText (String cssText ) throws DOMException ;
35
38
36
39
/**
@@ -40,6 +43,7 @@ public interface CSSStyleDeclaration {
40
43
* @return the value of the removed property, or the empty string if that
41
44
* property was not explicitly set in this declaration.
42
45
*/
46
+ @ Override
43
47
String removeProperty (String propertyName ) throws DOMException ;
44
48
45
49
/**
@@ -48,6 +52,7 @@ public interface CSSStyleDeclaration {
48
52
* @param propertyName the name of the property.
49
53
* @return the priority string, or the empty string if no priority was set.
50
54
*/
55
+ @ Override
51
56
String getPropertyPriority (String propertyName );
52
57
53
58
/**
@@ -57,13 +62,15 @@ public interface CSSStyleDeclaration {
57
62
* @param value the property value.
58
63
* @param priority the priority.
59
64
*/
65
+ @ Override
60
66
void setProperty (String propertyName , String value , String priority ) throws DOMException ;
61
67
62
68
/**
63
69
* The number of properties in this declaration.
64
70
*
65
71
* @return the number of properties in this declaration.
66
72
*/
73
+ @ Override
67
74
int getLength ();
68
75
69
76
/**
@@ -74,8 +81,27 @@ public interface CSSStyleDeclaration {
74
81
* less than zero, or greater or equal to the length of this
75
82
* declaration.
76
83
*/
84
+ @ Override
77
85
String item (int index );
78
86
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
+
79
105
/**
80
106
* Gets the object representation of the value of a CSS property if it has been
81
107
* explicitly set for this declaration block.
@@ -109,6 +135,7 @@ default CSSStyleValue getCSSStyleValue(String propertyName) {
109
135
* block, or the empty string if the property has not been set or is a shorthand
110
136
* that could not be serialized.
111
137
*/
138
+ @ Override
112
139
String getPropertyValue (String propertyName );
113
140
114
141
/**
@@ -117,6 +144,7 @@ default CSSStyleValue getCSSStyleValue(String propertyName) {
117
144
* @return the CSS rule that contains this declaration block or <code>null</code> if this
118
145
* <code>CSSStyleDeclaration</code> is not attached to a <code>CSSRule</code>.
119
146
*/
147
+ @ Override
120
148
CSSRule getParentRule ();
121
149
122
150
}
0 commit comments