mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Use window.getComputedStyle to prevent breaking jsdom/node.js . Fixes #12235
This commit is contained in:
parent
77412e0305
commit
3722aef8be
@ -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 ) {
|
||||
|
Loading…
Reference in New Issue
Block a user