aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRick Waldron <waldron.rick@gmail.com>2012-08-10 19:34:01 -0400
committerRick Waldron <waldron.rick@gmail.com>2012-08-10 19:34:01 -0400
commit3722aef8be5d31a7dbf3de6998cdf249081f028c (patch)
tree6a17e289079931222e2490fc0a1d605f0e180470 /src
parent77412e03056b2299309638212ae708acc190664c (diff)
downloadjquery-3722aef8be5d31a7dbf3de6998cdf249081f028c.tar.gz
jquery-3722aef8be5d31a7dbf3de6998cdf249081f028c.zip
Use window.getComputedStyle to prevent breaking jsdom/node.js . Fixes #12235
Diffstat (limited to 'src')
-rw-r--r--src/css.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/css.js b/src/css.js
index 19dbb049a..518513a2b 100644
--- a/src/css.js
+++ b/src/css.js
@@ -279,11 +279,11 @@ jQuery.extend({
});
// NOTE: To any future maintainer, we've used both window.getComputedStyle
-// and getComputedStyle here to produce a better gzip size
+// because jsdom on node.js will break without it.
if ( window.getComputedStyle ) {
curCSS = function( elem, name ) {
var ret, width, minWidth, maxWidth,
- computed = getComputedStyle( elem, null ),
+ computed = window.getComputedStyle( elem, null ),
style = elem.style;
if ( computed ) {