简体   繁体   English

我在哪里可以学习ECMAScript标准中尚未包含的JavaScript功能?

[英]Where can I learn JavaScript features not yet included in ECMAScript standard?

I just tried in Firebug console, 我刚试过Firebug控制台,

let (X=10) X/2

and

[x,y]=[y,x]

These are features supported by SpiderMonkey, I guess V8 has its own share. 这些是SpiderMonkey支持的功能,我猜V8有自己的共享。

Where can I learn of features that are not yet included in ECMAScript, but work in various browsers? 我在哪里可以了解ECMAScript中尚未包含但在各种浏览器中工作的功能? Is there a place where these are collected together? 有没有这些收集在一起的地方?

ECMAScript 6 (aka ECMAScript 2015) is the current standard for JavaScript, but engines have yet to implement it completely: ECMAScript 6(又名ECMAScript 2015)是JavaScript的当前标准,但引擎尚未完全实现它:

Starting with ECMAScript 2016, there will be yearly releases and a new release process: 从ECMAScript 2016开始,将有每年发布和新的发布过程:

If you want to use any of the new features even on older engines, you can transpile them to ES5 via Babel: https://babeljs.io/ 如果您想在旧引擎上使用任何新功能,可以通过Babel将它们转换为ES5: https ://babeljs.io/

And here is a article covering various resources around Harmony/ES6/Javascript.next: 这是一篇涵盖Harmony / ES6 / Javascript.next的各种资源的文章:

http://addyosmani.com/blog/ecmascript-6-resources-for-the-curious-javascripter/ http://addyosmani.com/blog/ecmascript-6-resources-for-the-curious-javascripter/

That first feature is known as a " let expression" and it is nonstandard; 第一个特征被称为“ let表达”,它是非标准的; it was dropped from Firefox 41, and the similarly nonstandard " let block" was dropped from Firefox 44: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let#Non-standard_let_extensions 它从Firefox 41中删除,类似的非标准“ let block”从Firefox 44中删除: https//developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let#Non-standard_let_extensions

I was surprised to find that this particular non-standard JS was not mentioned in Kangax's table, but I guess he had to restrict this list to non-standard JS extensions that are supported by multiple engines: https://kangax.github.io/compat-table/non-standard/ 我很惊讶地发现在Kangax的表中没有提到这个特殊的非标准JS,但我猜他必须将此列表限制为多个引擎支持的非标准JS扩展: https//kangax.github.io / compat的表/非标准/

If you want to go deeper down the rabbit-hole, and Kangax and MDN haven't satisfied your curiosity, this old reference may tell you about curiosities in older browsers: help.dottoro.com/ljsdaoxj.php 如果你想深入挖掘兔洞,Kangax和MDN不满足你的好奇心,这个旧参考可能会告诉你旧浏览器中的好奇心:help.dottoro.com/ljsdaoxj.php

Beyond that, the browser-makers usually document the quirks of their own browsers (MDN is also good about documenting non-Mozilla quirks, but it's not perfect); 除此之外,浏览器制造商通常记录他们自己的浏览器的怪癖(MDN也非常适合记录非Mozilla怪癖,但它并不完美); speaking of quirks, Peter-Paul Koch documents both standard and non-standard DOM methods here: quirksmode.org/dom/ 谈到怪癖,Peter-Paul Koch在这里记录了标准和非标准的DOM方法:quirksmode.org/dom/


Anyway, these aren't just "not yet" in the standards, but likely "not ever" and you shouldn't use them in your own code. 无论如何,这些不仅仅是“尚未”的标准,但可能“永远不会”,你不应该在你自己的代码中使用它们。

For current ECMAScript 264 implementation here is a list of features supported by different browser vendors: http://kangax.github.com/es5-compat-table/ 对于当前的ECMAScript 264实现,这里列出了不同浏览器供应商支持的功能: http//kangax.github.com/es5-compat-table/

For the next generation ECMAScript Harmony some resources: 对于下一代ECMAScript Harmony的一些资源:

http://addyosmani.com/blog/ecmascript-6-resources-for-the-curious-javascripter/ http://addyosmani.com/blog/ecmascript-6-resources-for-the-curious-javascripter/

http://kangax.github.com/es5-compat-table/es6/ http://kangax.github.com/es5-compat-table/es6/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 setTimeout():如果没有在EcmaScript规范中定义,我在哪里可以了解它是如何工作的? - setTimeout(): If not defined in EcmaScript spec, where can I learn how it works? 在 ECMAScript 规范中我可以找到为什么 {}?== {} 的原因? - Where in the ECMAScript specification can I find the reason about why {} !== {}? 在哪里可以找到具有ECMAScript 5功能的参考表? - Where can I find a reference sheet with ECMAScript 5 functions? javascript中的裸对象是ECMAScript标准的一部分吗? - Are bare objects in javascript part of the ECMAScript standard? 我在哪里可以学习jQuery?这值得么? - Where can I learn jQuery? Is it worth it? 我该在何处引用引用尚未构建的字段的Javascript? - Where can I put this Javascript that references a field that hasn't been built yet? 我在哪里可以学习如何在Ruby on Rails中创建一个支持Javascript的下拉菜单? - Where can I learn how to make a Javascript powered dropdown menu in Ruby on Rails? 在语言功能方面,ECMAScript 5和JavaScript 1.8.5之间有什么关联? - What is the correlation between ECMAScript 5 and JavaScript 1.8.5 in terms of language features? javascript 中的数组,我如何学习操作它? - Arrays in javascript, how can i learn manipulating it? 我如何学习javascript编码模式 - how can i learn javascript coding patterns
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM