日期:2014-05-17  浏览次数:20636 次

ECMAScript 5与HTML5 的支持情况

ECMAScript 5与HTML5离我们越来越近了,触摸屏相关的API开发中,未来的web世界更加多姿多彩。

Object.getPrototypeOf

支持浏览器:firefox3.6 chrome4

http://codereview.chromium.org/518056

Object.getOwnPropertyDescriptor

支持浏览器:IE8 chrome4

http://code.google.com/p/chromium/issues/detail?id=20345

Object.keys

支持浏览器: chrome4

http://code.google.com/p/chromium/issues/detail?id=21767

Object.defineProperty

支持浏览器: IE8

http://msdn.microsoft.com/en-us/library/dd548687(VS.85).aspx

https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object/defineProperty

Object.create

支持浏览器: chrome4

http://msdn.microsoft.com/en-us/library/dd548687(VS.85).aspx

Object.getOwnPropertyNames

支持浏览器: chrome4

http://code.google.com/p/v8/source/detail?r=3620

关于Object的扩展,可以看John Resig的这一篇博文《ECMAScript 5 Objects and Properties》

JSON

支持浏览器: IE8 chrome1+ safari3+ firefox3+

JSON.parse( text, translate )
JSON.stringify( obj, translate )
String.prototype.toJSON
Boolean.prototype.toJSON
Number.prototype.toJSON
Date.prototype.toJSON

http://blog.mozilla.com/webdev/2009/02/12/native-json-in-firefox-31/

http://blogs.msdn.com/ie/archive/2008/09/10/native-json-in-ie8.aspx

Date.now

支持浏览器: chrome4 firefox2+ safari4

http://trac.webkit.org/changeset/33422

?

https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Date/now

?

Date.prototype.toISOString

支持浏览器: chrome4 firefox3.6 safari4

https://bugs.webkit.org/show_bug.cgi?id=26594

String.prototype.trim

支持浏览器: chrome1+ firefox3+

https://bugs.webkit.org/show_bug.cgi?id=26590

http://code.google.com/p/v8/issues/detail?id=465