},
// 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
});\r
\r
test("isFunction", function() {\r
- expect(21);\r
+ expect(19);\r
\r
// Make sure that false values return false\r
ok( !jQuery.isFunction(), "No Value" );\r
ok( !jQuery.isFunction(obj), "Object Element" );\r
\r
// IE says this is an object\r
- ok( jQuery.isFunction(obj.getAttribute), "getAttribute Function" );\r
+ // Since 1.3, this isn't supported (#2968)\r
+ //ok( jQuery.isFunction(obj.getAttribute), "getAttribute Function" );\r
\r
var nodes = document.body.childNodes;\r
\r
document.body.appendChild( input );\r
\r
// IE says this is an object\r
- ok( jQuery.isFunction(input.focus), "A default function property" );\r
+ // Since 1.3, this isn't supported (#2968)\r
+ //ok( jQuery.isFunction(input.focus), "A default function property" );\r
\r
document.body.removeChild( input );\r
\r