Ecma262: How to find and define a Internal Method?

Created on 3 Dec 2017  路  5Comments  路  Source: tc39/ecma262

At Object Internal Methods and Internal Slots ,
I see the Internal Method, and the essential internal methods listed by table 5 such as [[GetPrototypeOf]] and so on . But I can't find them ... Can you tell me where I can find them?

question

All 5 comments

They are described in Chapter 9 Ordinary and Exotic Objects Behaviours.

@claudepache
Thank you.I see.. But I can't find Internal Methods such as [[GetPrototypeOf]] in Chrome Dev Tool , If they can't see by users, but why can I see the Internal Slots '[[PromiseStatus]]
' in the Promise instance?.. So , Can you explain me the reason? Thank you !

@wangyi7099 internal slots are generally not directly accessible in the language, although some of them, like [[Prototype]], are exposed indirectly. In the repl/developer tools, engines can show you information that you can鈥檛 get any other way, including the internal status of a promise. In your actual code, you can鈥檛 synchronously see the state of a promise.

@ljharb
Thank you! I know !!

This seems answered; closing.

Was this page helpful?
0 / 5 - 0 ratings