]> source.dussan.org Git - jquery-ui.git/commitdiff
Updating to latest QUnit
authorjzaefferer <joern.zaefferer@gmail.com>
Thu, 1 Apr 2010 07:57:56 +0000 (09:57 +0200)
committerjzaefferer <joern.zaefferer@gmail.com>
Thu, 1 Apr 2010 07:57:56 +0000 (09:57 +0200)
external/qunit.js

index 0dd3155305a832b7045edfb2bfbe3d1f7ee5a903..9ef5f8d6f75f06151b31ecdf3489ce927a8b4576 100644 (file)
@@ -953,16 +953,14 @@ QUnit.jsDump = (function() {
                                type = "date";
                        } else if (QUnit.is("Function", obj)) {
                                type = "function";
-                       } else if (QUnit.is("Array", obj)) {
-                               type = "array";
-                       } else if (QUnit.is("Window", obj) || QUnit.is("global", obj)) {
+                       } else if (obj.setInterval && obj.document && !obj.nodeType) {
                                type = "window";
-                       } else if (QUnit.is("HTMLDocument", obj)) {
+                       } else if (obj.nodeType === 9) {
                                type = "document";
-                       } else if (QUnit.is("HTMLCollection", obj) || QUnit.is("NodeList", obj)) {
-                               type = "nodelist";
-                       } else if (/^\[object HTML/.test(Object.prototype.toString.call( obj ))) {
+                       } else if (obj.nodeType) {
                                type = "node";
+                       } else if (typeof obj === "object" && typeof obj.length === "number" && obj.length >= 0) {
+                               type = "array";
                        } else {
                                type = typeof obj;
                        }