Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function (obj)
- {
- if (obj === null)
- return "null";
- if (this.isPrimitiveValue(obj))
- return null;
- if (this._isHTMLAllCollection(obj))
- return "array";
- var preciseType = InjectedScriptHost.type(obj);
- if (preciseType)
- return preciseType;
- // FireBug's array detection.
- try {
- if (typeof obj.splice === "function" && isFinite(obj.length))
- return "array";
- if (Object.prototype.toString.call(obj) === "[object Arguments]" && isFinite(obj.length)) // arguments.
- return "array";
- } catch (e) {
- }
- // If owning frame has navigated to somewhere else window properties will be undefined.
- return null;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement