diff --git a/index.html b/index.html index 9f90840..2702d8b 100644 --- a/index.html +++ b/index.html @@ -2980,12 +2980,15 @@

Stage 1 Draft / February 7, 2024

Promise.try

+

Stage 1 Draft / February 8, 2024

Promise.try

1 Promise.try ( callbackfn )

When the try method is called with argument callbackfn, the following steps are taken:

  1. Let C be the this value.
  2. If C is not an Object, throw a TypeError exception.
  3. Let promiseCapability be ? NewPromiseCapability(C).
  4. Let status be Completion(Call(callbackfn, undefined, « »)).
  5. If status is an abrupt completion, then
    1. Perform ? Call(promiseCapability.[[Reject]], undefined, « status.[[Value]] »).
  6. Else,
    1. Perform ? Call(promiseCapability.[[Resolve]], undefined, « status.[[Value]] »).
  7. Return promiseCapability.[[Promise]].
+ Note
+

This function expects its this value to be a constructor function that supports the parameter conventions of the Promise constructor.

+

A Copyright & Software License

diff --git a/spec.emu b/spec.emu index c7b4132..1aec732 100644 --- a/spec.emu +++ b/spec.emu @@ -20,4 +20,7 @@ contributors: Jordan Harband 1. Perform ? Call(_promiseCapability_.[[Resolve]], *undefined*, « _status_.[[Value]] »). 1. Return _promiseCapability_.[[Promise]]. + +

This function expects its *this* value to be a constructor function that supports the parameter conventions of the Promise constructor.

+