Refine the jQuery.isWindow check.

This commit is contained in:
RafaC3ABl Blais Masson
2011-12-06 16:17:09 -05:00
committed by Dave Methvin
parent 166b9d252a
commit 0fcfac7568
2 changed files with 4 additions and 5 deletions

View File

@@ -476,9 +476,8 @@ jQuery.extend({
return jQuery.type(obj) === "array";
},
// A crude way of determining if an object is a window
isWindow: function( obj ) {
return obj && typeof obj === "object" && "setInterval" in obj;
return obj != null && obj == obj.window;
},
isNumeric: function( obj ) {