Internet Explorer 9 (IE9): Platform Preview feedback helped in JavaScript change to ECMAScript 5th Edition standard

The IE team published how recent users regarding the third IE9 Platform Preview resulted in a correction to the new ECMAScript 5th Edition (ES5) standard for JavaScript. "Soon after releasing 3rd platform, we received reports that some web-apps using jQuery framework didn't work correctly in preview. The problem was tracked to a specific jQuery API […]

The IE team published how recent users regarding the third IE9 Platform Preview resulted in a correction to the new ECMAScript 5th Edition (ES5) standard for JavaScript. "Soon after releasing 3rd platform, we received reports that some web-apps using jQuery framework didn't work correctly in preview. The problem was tracked to a specific jQuery API method that in some cases passed a caller provided value to Object.prototype.toString without first checking if the value was null or undefined. ES5 changed this so that null or undefined isn't replaced with the window object and definition for each built-in method was updated specifically to deal with receiving these values as their this value. ECMAScript technical committee tried to do this in a way that preserves backwards compatibility for normal usage and throws an exception in cases where that's not possible. Object.prototype.toString was specified in ES5 to throw such an exception. This created the compatibility problem, that's easily corrected by a simple change jQuery code:

OLD:

isFunction: function( obj ) {
     return toString.call(obj) === "[object Function]";
},

NEW:

isFunction: function( obj ) {
     return obj && toString.call(obj) === "[object Function]";
},

[Source]