File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 577577 ok ( ! _ . isFunction ( undefined ) , 'undefined vars are not functions' ) ;
578578 ok ( ! _ . isFunction ( [ 1 , 2 , 3 ] ) , 'arrays are not functions' ) ;
579579 ok ( ! _ . isFunction ( 'moe' ) , 'strings are not functions' ) ;
580+ ok ( ! _ . isFunction ( document . createElement ( 'div' ) ) , 'elements are not functions' ) ;
580581 ok ( _ . isFunction ( _ . isFunction ) , 'but functions are' ) ;
581582 ok ( _ . isFunction ( iFunction ) , 'even from another frame' ) ;
582583 ok ( _ . isFunction ( function ( ) { } ) , 'even anonymous ones' ) ;
647648 ok ( ! _ . isNull ( xml ) ) ;
648649 ok ( ! _ . isUndefined ( xml ) ) ;
649650 } ) ;
651+
652+ test ( '#1621 IE 11 compat mode DOM elements are not functions' , function ( ) {
653+ var fn = function ( ) { } ;
654+ var xml = new ActiveXObject ( 'Msxml2.DOMDocument.3.0' ) ;
655+ var div = document . createElement ( 'div' ) ;
656+
657+ // JIT the function
658+ var count = 200 ;
659+ while ( count -- ) {
660+ _ . isFunction ( fn ) ;
661+ }
662+
663+ equal ( _ . isFunction ( xml ) , false ) ;
664+ equal ( _ . isFunction ( div ) , false ) ;
665+ equal ( _ . isFunction ( fn ) , true ) ;
666+ } ) ;
650667 }
651668
652669 test ( 'tap' , function ( ) {
You can’t perform that action at this time.
0 commit comments