From 3722aef8be5d31a7dbf3de6998cdf249081f028c Mon Sep 17 00:00:00 2001 From: Rick Waldron Date: Fri, 10 Aug 2012 19:34:01 -0400 Subject: [PATCH] Use window.getComputedStyle to prevent breaking jsdom/node.js . Fixes #12235 --- src/css.js | 4 ++-- 1 file 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 ) { -- 2.39.5