- From: Ms2ger <notifications@github.com>
- Date: Wed, 21 Aug 2019 07:30:16 -0700
- To: heycam/webidl <webidl@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <heycam/webidl/pull/772/review/277836929@github.com>
Ms2ger commented on this pull request. > </div> -<p class="issue"> - Include an example of how to write spec text using this term. -</p> +<div algorithm> + To <dfn export for=Promise lt="a new promise">create</dfn> a new + <a interface lt="Promise">Promise<<var ignore>T</var>></a> in a [=Realm=] |realm|, + perform the following steps: + + 1. Let |constructor| be |realm|.\[[Intrinsics]].[[{{%Promise%}}]]. + 1. Return [=?=] [$NewPromiseCapability$](|constructor|). +</div> + +<div algorithm> + To create a <dfn export for=Promise>resolved promise</dfn> of type + <a interface lt="Promise">Promise<|T|></a>, with |x| (a value of type |T|) in a [=Realm=] I think it makes more sense to make it part of the "signature" of the algorithm, so to say. > - 1. Let |promise| be the promise object of type <a interface lt="Promise">Promise<|T|></a>. - 1. Let |onFulfilled| be a new [=built-in function object=] whose - behavior when invoked is as follows: + 1. Let |onFulfilled| be [=!=] [$CreateBuiltinFunction$](the following steps, « »): I thought there was precedent, but now I can't find it. Changed. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/heycam/webidl/pull/772#discussion_r316217713
Received on Wednesday, 21 August 2019 14:30:39 UTC