Skip to content

Commit a94067a

Browse files
committed
Link resolve and reject to promises spec.
1 parent 61b6b8d commit a94067a

File tree

1 file changed

+22
-14
lines changed

1 file changed

+22
-14
lines changed

index.html

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@ <h4>
127127
<a data-cite="!HTML#document-base-url">base URL</a>, and no
128128
<var>encoding override</var>.
129129
</li>
130-
<li>If <var>url</var> is failure, reject <var>p</var> with
130+
<li>If <var>url</var> is failure, <a data-cite=
131+
"!promises-guide#reject-promise">reject</a> <var>p</var> with
131132
<a data-cite=
132133
"!WEBIDL#exceptiondef-typeerror"><code>TypeError</code></a>,
133134
and abort these steps.
@@ -141,38 +142,45 @@ <h4>
141142
</li>
142143
<li>If the method call was not <a data-cite=
143144
"!HTML#triggered-by-user-activation">triggered by user
144-
activation</a>, reject <var>p</var> with <a data-cite=
145+
activation</a>, <a data-cite=
146+
"!promises-guide#reject-promise">reject</a> <var>p</var> with
147+
<a data-cite=
145148
"!WEBIDL#securityerror"><code>SecurityError</code></a>, and abort
146149
these steps.
147150
</li>
148151
<li>
149152
<a data-cite="!HTML#in-parallel">In parallel</a>:
150153
<ol>
151-
<li>If there are no <a>share targets</a> available, reject
152-
<var>p</var> with <a data-cite=
153-
"!WEBIDL#aborterror"><code>AbortError</code></a>, and abort
154-
these steps.
154+
<li>If there are no <a>share targets</a> available,
155+
<a data-cite="!promises-guide#reject-promise">reject</a> <var>
156+
p</var> with <a data-cite=
157+
"!WEBIDL#aborterror"><code>AbortError</code></a>, and abort
158+
these steps.
155159
</li>
156160
<li>Present the user with a choice of one or more <a>share
157161
targets</a>, selected at the user agent's discretion. The user
158162
MUST be given the option to cancel rather than choosing any of
159163
the share targets. Wait for the user's choice.
160164
</li>
161-
<li>If the user chose to cancel the share operation, reject
162-
<var>p</var> with <a data-cite=
163-
"!WEBIDL#aborterror"><code>AbortError</code></a>, and abort
164-
these steps.
165+
<li>If the user chose to cancel the share operation,
166+
<a data-cite="!promises-guide#reject-promise">reject</a> <var>
167+
p</var> with <a data-cite=
168+
"!WEBIDL#aborterror"><code>AbortError</code></a>, and abort
169+
these steps.
165170
</li>
166171
<li>Activate the chosen <a>share target</a>, <a>convert
167172
<var>data</var> to a format suitable for ingestion into the
168173
target</a>, and transmit the converted data to the target. If
169174
an error occurs starting the target or transmitting the data,
170-
reject <var>p</var> with <a data-cite=
171-
"!WEBIDL#aborterror"><code>AbortError</code></a>, and abort
172-
these steps.
175+
<a data-cite="!promises-guide#reject-promise">reject</a> <var>
176+
p</var> with <a data-cite=
177+
"!WEBIDL#aborterror"><code>AbortError</code></a>, and abort
178+
these steps.
173179
</li>
174180
<li>Once the data has been successfully transmitted to the
175-
target, resolve <var>p</var> with <b>undefined</b>.
181+
target, <a data-cite=
182+
"!promises-guide#resolve-promise">resolve</a> <var>p</var> with
183+
<b>undefined</b>.
176184
</li>
177185
</ol>
178186
</li>

0 commit comments

Comments
 (0)