File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
src/main/java/org/htmlunit/css Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -529,6 +529,10 @@ public String getBackgroundAttachment() {
529529 */
530530 @ Override
531531 public String getBackgroundColor () {
532+ if (!getDomElement ().isAttachedToPage ()) {
533+ return EMPTY_FINAL ;
534+ }
535+
532536 final String value = super .getBackgroundColor ();
533537 if (StringUtils .isEmpty (value )) {
534538 return Definition .BACKGROUND_COLOR .getDefaultComputedValue (getBrowserVersion ());
@@ -1180,6 +1184,10 @@ public String getWordSpacing() {
11801184 */
11811185 @ Override
11821186 public String getZIndex () {
1187+ if (!getDomElement ().isAttachedToPage ()) {
1188+ return EMPTY_FINAL ;
1189+ }
1190+
11831191 final String response = super .getZIndex ();
11841192 if (response .isEmpty ()) {
11851193 return AUTO ;
You can’t perform that action at this time.
0 commit comments