- From: Anne van Kesteren <notifications@github.com>
- Date: Wed, 21 Aug 2019 07:15:32 -0700
- To: heycam/webidl <webidl@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <heycam/webidl/pull/772/review/277823533@github.com>
annevk commented on this pull request. > - 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, « »): Unless there's precedent for this pattern I'd prefer assigning the following steps to a variable and then using that variable in the creation of this builtin function. > </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=] Maybe make the parenthetical a type assertion step? -- 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#pullrequestreview-277823533
Received on Wednesday, 21 August 2019 14:15:55 UTC