fix Ox.isArguments
This commit is contained in:
parent
f919d64044
commit
4f5a2e8072
1 changed files with 8 additions and 3 deletions
|
@ -7,11 +7,16 @@ Ox.isArguments <f> Tests if a value is an arguments "array"
|
||||||
> Ox.isArguments((function() { return arguments; }()))
|
> Ox.isArguments((function() { return arguments; }()))
|
||||||
true
|
true
|
||||||
@*/
|
@*/
|
||||||
Ox.isArguments = /MSIE/.test(navigator.userAgent) ? function(val) {
|
Ox.isArguments = function(val) {
|
||||||
return !!(val && Object.hasOwnProperty.call(val, 'callee'));
|
|
||||||
} : function(val) {
|
|
||||||
return !!(val && val.toString() == '[object Arguments]');
|
return !!(val && val.toString() == '[object Arguments]');
|
||||||
}
|
}
|
||||||
|
if (!(function() {
|
||||||
|
return Ox.isArguments(arguments);
|
||||||
|
}())) {
|
||||||
|
Ox.isArguments = function(val) {
|
||||||
|
return !!(val && Object.hasOwnProperty.call(val, 'callee'));
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
/*@
|
/*@
|
||||||
Ox.isArray <f> Tests if a value is an array
|
Ox.isArray <f> Tests if a value is an array
|
||||||
|
|
Loading…
Reference in a new issue