Index: lib/ui.js |
=================================================================== |
--- a/lib/ui.js |
+++ b/lib/ui.js |
@@ -1714,19 +1714,21 @@ let UI = exports.UI = |
} |
// Look for a background image |
if (!hadImage) |
{ |
function extractImageURL(computedStyle, property) |
{ |
let value = computedStyle.getPropertyCSSValue(property); |
- if (value instanceof Ci.nsIDOMCSSValueList && value.length >= 1) |
+ // CSSValueList |
+ if ("length" in value && value.length >= 1) |
Thomas Greiner
2013/01/14 14:16:24
What about using |value instanceof CSSValueList| i
Wladimir Palant
2013/01/14 14:46:54
CSSValueList won't be defined in this context - it
|
value = value[0]; |
- if (value instanceof Ci.nsIDOMCSSPrimitiveValue && value.primitiveType == Ci.nsIDOMCSSPrimitiveValue.CSS_URI) |
+ // CSSValuePrimitiveType |
+ if ("primitiveType" in value && value.primitiveType == value.CSS_URI) |
Thomas Greiner
2013/01/14 14:16:24
What about using |value instanceof CSSPrimitiveVal
Wladimir Palant
2013/01/14 14:46:54
Same as above.
|
return Utils.unwrapURL(value.getStringValue()).spec; |
return null; |
} |
let node = target; |
while (node) |
{ |