init(promise, parent)


  • promise <Promise> 正在创建的 promise。
  • parent <Promise> 承诺继续,如适用。

在构造一个 promise 时调用。这并不意味着相应的 before/after 事件会发生,只是表示存在这种可能性。如果创建了一个 promise,但从未获取过后续操作,就会发生这种情况。

【Called when a promise is constructed. This does not mean that corresponding before/after events will occur, only that the possibility exists. This will happen if a promise is created without ever getting a continuation.】