Skip to content Skip to sidebar Skip to footer

Is It Impossible To Get The [[promisevalue]] From A Promise Object Without Using The Promise Object's Then Method?

This Question is intended to be a canonical Question/Answer; see What is a canonical question/answer, and what is their purpose?. Do not have the definitive Answer, here. In lieu o

Solution 1:

Not possible in ES7. The value of a promise is stored in the [[PromiseResult]] internal slot:

The value with which the promise has been fulfilled or rejected, if any. Only meaningful if [[PromiseState]] is not "pending".

That slot is only read in the PerformPromiseThen abstract operation, which is only exposed via Promise.prototype.then.

Post a Comment for "Is It Impossible To Get The [[promisevalue]] From A Promise Object Without Using The Promise Object's Then Method?"