Typeof Window.close Is Different For Ie
Today I saw weird behavior when I typed window.close it showing function close() { [native code] } in IE and function () { [native code] } in chrome, I thought both are func
Solution 1:
Look here for what you should have (ie "function"
).
And here for the less readable but official ECMAScript reference.
IE 8 simply doesn't follow the norm. That's really not the sole occurrence.
Regarding the How to test if a variable is a function on IE8 ? question, I can't test it myself but this probably works :
var myvar = window.close;
var isfunc = Object.prototype.toString.call( myvar ) === '[object Function]';
Post a Comment for "Typeof Window.close Is Different For Ie"