handle FF 3.6 arguments 'object'
This commit is contained in:
parent
c8cc037ef6
commit
80549fe4e2
1 changed files with 9 additions and 3 deletions
|
@ -338,12 +338,18 @@ Ox.typeOf = function(value) {
|
|||
return Object.prototype.toString.call(value).slice(8, -1).toLowerCase();
|
||||
};
|
||||
(function() {
|
||||
// Internet Explorer returns 'HTMLCollection' instead of 'NodeList',
|
||||
// Firefox 3.6 returns 'Object' instead of 'Arguments',
|
||||
// Internet Explorer 9 returns 'HTMLCollection' instead of 'NodeList',
|
||||
// Mobile Safari doesn't like null and undefined
|
||||
var nodelist = Ox.typeOf(document.getElementsByTagName('a'));
|
||||
if (nodelist != 'nodelist' || Ox.typeOf() != 'undefined') {
|
||||
if (
|
||||
Ox.typeOf(arguments) != 'arguments'
|
||||
&& nodelist != 'nodelist'
|
||||
|| Ox.typeOf() != 'undefined'
|
||||
) {
|
||||
Ox.typeOf = function(value) {
|
||||
var type = value === null ? 'null'
|
||||
var type = value && Ox.hasOwn(value, 'callee') ? 'arguments'
|
||||
: value === null ? 'null'
|
||||
: value === void 0 ? 'undefined'
|
||||
: Object.prototype.toString.call(
|
||||
value
|
||||
|
|
Loading…
Reference in a new issue