Ad

IE11 Edge JavaScript Deprecated And Obsolete Features

Mozilla Developer Network said "You should use toISOString instead of the deprecated toGMTString method in new code."

However,

In MSDN JavaScript Version Information to check the toGMTString Method, IE11 still support this element.

I am working for IE11 Edge Mode, I should follow MSDN or Mozilla? Thanks for help.

Ad

Answer

ECMAScript says toGMTString is deprecated. toISOString is not supported in IE8 and earlier. If you need to support IE7/IE8, use the deprecated one. If you want to be compatible with current standards, use the recommended one. "deprecated" does not mean it doesn't exist any more; it means there are reasons not to use it (including, potentially, that it won't exist for much longer). Even better, use both - see which is available and use that, for the best coverage. MDN has a polyfill you can use to patch up the deficiencies of older browsers.

Ad
source: stackoverflow.com
Ad