简体   繁体   English

在ES5 / 6中,javascript属性名称如“__proto__”是否未标准化?

[英]Are javascript property names like “__proto__” not standardized in ES5/6?

There're some properties in js starts/ends with double underscores like proto . js开头/结尾有一些属性,有像proto这样的双下划线。 But I know it equals to constructor.prototype, right? 但我知道它等于constructor.prototype,对吧? I wish to know whether ES5/ES6 standard included these xxx_ property names, or they're just implementation specific keywords, might have different behavior in different implementations? 我想知道ES5 / ES6标准是否包含这些xxx_属性名称,或者它们只是特定于实现的关键字,在不同的实现中可能有不同的行为?

Plus: where can I check if a keyword is part of ES stardard, any recommended web-sites? 另外:我在哪里可以检查关键字是否是ES标准,任何推荐的网站的一部分?

Thanks. 谢谢。

I know it equals to constructor.prototype, right? 我知道它等于constructor.prototype,对吧?

No .

I wish to know whether ES5/ES6 standard included these __xxx__ property names, or they're just implementation specific keywords, might have different behavior in different implementations? 我想知道ES5 / ES6标准是否包含这些__xxx__属性名称,或者它们只是特定于实现的关键字,在不同的实现中可能有不同的行为?

You can find an overview in the MDN documentation , there are __count__ , __noSuchMethod__ , __parent__ , __proto__ , __defineGetter__ , __defineSetter__ , __lookupGetter__ , and __lookupSetter__ ; 你可以找到在概述MDN文档 ,有__count____noSuchMethod____parent____proto____defineGetter____defineSetter____lookupGetter____lookupSetter__ ; and all of them are deprecated . 并且所有这些都被弃用了 Other implementations than Gecko might have featured more. 除Gecko之外的其他实现可能具有更多功能。

Only the getter/setter methods and __proto__ were common amongst implementations, and only __proto__ got into the compatibilty section of the ES6 standard . 只有getter / setter方法和__proto__在实现中很常见,只有__proto__进入了ES6标准的兼容性部分

where can I check if a keyword is part of ES stardard, any recommended web-sites? 我在哪里可以检查关键字是否是ES标准,任何推荐的网站的一部分?

Just read the standards themselves ! 只需阅读标准本身

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM