init(promise, parent)


  • promise <Promise> 正在创建的 promise。

    ¥promise <Promise> The promise being created.

  • parent <Promise> 如果适用,则 promise 从此继续。

    ¥parent <Promise> The promise continued from, if applicable.

当构造 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.