diff options
Diffstat (limited to 'src/css.js')
-rw-r--r-- | src/css.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/css.js b/src/css.js index 7215fe620..5b6b7b9b6 100644 --- a/src/css.js +++ b/src/css.js @@ -141,7 +141,13 @@ jQuery.extend({ name = name.replace( rupper, "-$1" ).toLowerCase(); - var computedStyle = elem.ownerDocument.defaultView.getComputedStyle( elem, null ); + var defaultView = elem.ownerDocument.defaultView; + + if ( !defaultView ) { + return null; + } + + var computedStyle = defaultView.getComputedStyle( elem, null ); if ( computedStyle ) { ret = computedStyle.getPropertyValue( name ); |