jquery core: closes #2968. Simplified isFunction, dropping support for DOM methods and functions like alert() on IE.
This commit is contained in:
parent
43c4b64f32
commit
69212c501f
2 changed files with 8 additions and 5 deletions
|
@ -613,9 +613,10 @@ jQuery.extend({
|
|||
},
|
||||
|
||||
// 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 ) {
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue