From: Rick Waldron Date: Fri, 10 Aug 2012 23:34:01 +0000 (-0400) Subject: Use window.getComputedStyle to prevent breaking jsdom/node.js . Fixes #12235 X-Git-Tag: 1.8.1~52 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3722aef8be5d31a7dbf3de6998cdf249081f028c;p=jquery.git Use window.getComputedStyle to prevent breaking jsdom/node.js . Fixes #12235 --- 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 ) {