thenable.then is not called syncly? #523
-
console.log(1, "returned promise", Promise.resolve({
then(broadcastFulfillment, broadcastRejection) {
console.log(1, "called .then");
},
log: (() => console.log(1, "thenable object evaluated"))()
}));
console.log(2, "returned promise", Promise.resolve(Promise.resolve()));
|
Beta Was this translation helpful? Give feedback.
Replies: 0 comments 2 replies
-
Yep, you can see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/Promise#resolver_function:
The
|
Beta Was this translation helpful? Give feedback.
Yep, you can see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/Promise#resolver_function:
The
Promise.resolve
page mentions that for non-native promises, it's essentially a shorthand fornew Promise((res…