init(promise, parent)


  • promise <Promise> 正在创建的 promise。
  • parent <Promise> 如果适用,则 promise 从此继续。

当构造 promise 时调用。 这不意味着会发生相应的 before/after 事件,只是存在可能性。 如果在没有获得继续的情况下创建了 promise,则会发生这种情况。

  • promise <Promise> The promise being created.
  • parent <Promise> The promise continued from, if applicable.

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.