fix Ox.isArguments

This commit is contained in:
rlx 2012-02-17 10:30:47 +00:00 committed by j
parent f919d64044
commit 4f5a2e8072

View file

@ -7,11 +7,16 @@ Ox.isArguments <f> Tests if a value is an arguments "array"
> Ox.isArguments((function() { return arguments; }()))
true
@*/
Ox.isArguments = /MSIE/.test(navigator.userAgent) ? function(val) {
return !!(val && Object.hasOwnProperty.call(val, 'callee'));
} : function(val) {
Ox.isArguments = function(val) {
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