git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
jquery core: closes #2968. Simplified isFunction, dropping support for DOM methods...
[jquery.git]
/
src
/
core.js
diff --git
a/src/core.js
b/src/core.js
index
7db0a8c
..
c095f74
100644
(file)
--- a/
src/core.js
+++ b/
src/core.js
@@
-613,9
+613,10
@@
jQuery.extend({
},
// See test/unit/core.js for details concerning this function.
},
// See test/unit/core.js for details concerning this function.
+ // Since 1.3 DOM methods and function like alert
+ // aren't supported. They return false on IE (#2968).
isFunction: function( fn ) {
isFunction: function( fn ) {
- return !!fn && typeof fn != "string" && !fn.nodeName &&
- fn.constructor != Array && /^[\s[]?function/.test( fn + "" );
+ return fn instanceof Function;
},
// check if an element is in a (or is an) XML document
},
// check if an element is in a (or is an) XML document