(obj)
| 20 | return obj != null && obj === obj.window; |
| 21 | } |
| 22 | function isArraylike(obj) { |
| 23 | var length = "length" in obj && obj.length, ltype = typeof obj; |
| 24 | if (ltype === "function" || isWindow(obj)) { |
| 25 | return false; |
| 26 | } |
| 27 | if (obj.nodeType === 1 && length) { |
| 28 | return true; |
| 29 | } |
| 30 | return ltype === "array" || length === 0 || typeof length === "number" && length > 0 && length - 1 in obj; |
| 31 | } |
| 32 | function isValidElement(elem) { |
| 33 | return elem instanceof window.Element; |
| 34 | } |