Skip to content

Commit d1e655f

Browse files
Editorial: clean up some promise jargon (#252)
1 parent 7432408 commit d1e655f

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

index.bs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -443,15 +443,15 @@ spec:css-syntax-3;
443443
{{[[type]]}} slot, which specifies the [=credential/credential type=] represented by this object.
444444

445445
: <dfn method>isConditionalMediationAvailable()</dfn>
446-
:: Returns a new {{Promise}} that [=resolves=] with `true` if and only if the user agent supports the
446+
:: Returns a {{Promise}} that [=resolves=] with `true` if and only if the user agent supports the
447447
{{CredentialMediationRequirement/conditional}} approach to
448448
[[#mediation-requirements|mediation of credential requests]] for the [=credential/credential type=],
449449
`false` otherwise.
450450

451451
{{Credential}}'s default implementation of {{Credential/isConditionalMediationAvailable()}}:
452452

453453
<ol class="algorithm">
454-
1. Return a new {{Promise}} that immediately [=resolves=] with `false`.
454+
1. Return [=a promise resolved with=] with `false`.
455455
</ol>
456456

457457
The specification for any [=credential/credential type=] supporting
@@ -462,14 +462,14 @@ spec:css-syntax-3;
462462
mediation is not supported for the [=credential/credential type=].
463463

464464
: <dfn method>willRequestConditionalCreation()</dfn>
465-
:: Returns a new {{Promise}} that [=resolves=] after the user agent registers the relying party's intention
465+
:: Returns a {{Promise}} that [=resolves=] after the user agent registers the relying party's intention
466466
to create a credential using the {{CredentialMediationRequirement/conditional}} approach to
467467
[[#mediation-requirements|mediation of credential creation]] for the [=credential/credential type=].
468468

469469
{{Credential}}'s default implementation of {{Credential/willRequestConditionalCreation()}}:
470470

471471
<ol class="algorithm">
472-
1. Return a new {{Promise}} that [=resolves=] with `undefined`.
472+
1. Return [=a promise resolved with=] `undefined`.
473473
</ol>
474474

475475
Note: If this method is not present, {{CredentialMediationRequirement/conditional}}
@@ -828,7 +828,7 @@ spec:css-syntax-3;
828828
Websites can only pass {{CredentialMediationRequirement/conditional}} into the
829829
{{CredentialsContainer/get()}} method if all of the [=relevant credential interface objects|credential
830830
interfaces it refers to=] have overridden {{Credential/isConditionalMediationAvailable()}} to return
831-
a new {{Promise}} that [=resolves=] with `true`.
831+
a {{Promise}} that [=resolves=] with `true`.
832832

833833
For {{CredentialsContainer/create()}}, if a user has previously consented to credential creation and
834834
the user agent knows it recently mediated an authentication, then the `create()` call may resolve without
@@ -1219,8 +1219,6 @@ spec:css-syntax-3;
12191219
then return [=a promise rejected with=]
12201220
<code>|options|.{{CredentialRequestOptions/signal}}</code>'s [=AbortSignal/abort reason=].
12211221

1222-
1. Let |p| be [=a new promise=].
1223-
12241222
1. Let |type| be |interfaces|[0]'s {{Credential/[[type]]}}.
12251223

12261224
1. If |settings|' [=active credential types=] [=set/contains=] |type|, return
@@ -1230,6 +1228,8 @@ spec:css-syntax-3;
12301228

12311229
1. Let |origin| be |settings|'s [=environment settings object/origin=].
12321230

1231+
1. Let |p| be [=a new promise=].
1232+
12331233
1. Run the following steps [=in parallel=]:
12341234

12351235
1. Let |r| be the result of executing |interfaces|[0]'s
@@ -1274,13 +1274,13 @@ spec:css-syntax-3;
12741274
1. If |settings|'s [=relevant global object=]'s [=associated Document=] is not [=Document/fully active=],
12751275
then return [=a promise rejected with=] an "{{InvalidStateError}}" {{DOMException}}.
12761276

1277-
2. Let |p| be [=a new promise=]
1277+
1. Let |p| be [=a new promise=].
12781278

1279-
3. Run the following seps [=in parallel=]:
1279+
1. Run the following seps [=in parallel=]:
12801280

12811281
1. Set |origin|'s [=origin/prevent silent access flag=] in the [=credential store=].
12821282

1283-
2. [=Resolve=] |p| with `undefined`.
1283+
1. [=Resolve=] |p| with `undefined`.
12841284

12851285
4. Return |p|.
12861286
</ol>
@@ -2475,7 +2475,7 @@ spec:css-syntax-3;
24752475

24762476
1. If the new credential type supports {{CredentialMediationRequirement/conditional}} [=user
24772477
mediation=], define `ExampleCredential/isConditionalMediationAvailable()`
2478-
to return a new {{Promise}} that [=resolves=] with `true`.
2478+
to return [=a promise resolved with=] `true`.
24792479

24802480
1. Following the procedure in [[#sctn-registry-requirements]], add an entry to the
24812481
[[#sctn-cred-type-registry|Credential Type Registry]] for the new

0 commit comments

Comments
 (0)