Skip to content

Commit 3bc95bf

Browse files
committed
Editorial: bind [[sharePromise]] to [=this=]
1 parent ffbb6ab commit 3bc95bf

File tree

1 file changed

+21
-18
lines changed

1 file changed

+21
-18
lines changed

index.html

+21-18
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,9 @@ <h4>
157157
{{Promise}}? <dfn>[[\sharePromise]]</dfn>
158158
</dt>
159159
<dd>
160-
The {{Navigator/[[sharePromise]]}} is a promise that represents a
161-
user's current intent to share some data with a <a>share
162-
target</a>. It is initialized to `null`.
160+
The [=this=].{{Navigator/[[sharePromise]]}} is a promise that
161+
represents a user's current intent to share some data with a
162+
<a>share target</a>. It is initialized to `null`.
163163
</dd>
164164
</dl>
165165
</section>
@@ -177,8 +177,8 @@ <h4>
177177
<a>"web-share"</a>, return [=a promise rejected with=] a
178178
{{"NotAllowedError"}} {{DOMException}}.
179179
</li>
180-
<li>If {{Navigator/[[sharePromise]]}} is not `null`, return [=a
181-
promise rejected with=] an {{"InvalidStateError"}}
180+
<li>If [=this=].{{Navigator/[[sharePromise]]}} is not `null`,
181+
return [=a promise rejected with=] an {{"InvalidStateError"}}
182182
{{DOMException}}.
183183
</li>
184184
<li>Let |window| be [=relevant global object=] of [=this=].
@@ -211,17 +211,19 @@ <h4>
211211
return [=a promise rejected with=] a {{"NotAllowedError"}}
212212
{{DOMException}}.
213213
</li>
214-
<li>Set {{Navigator/[[sharePromise]]}} to be <a>a new promise</a>.
214+
<li>Set [=this=].{{Navigator/[[sharePromise]]}} to be <a>a new
215+
promise</a>.
215216
</li>
216-
<li>Return {{Navigator/[[sharePromise]]}} and <a>in parallel</a>:
217+
<li>Return [=this=].{{Navigator/[[sharePromise]]}} and <a>in
218+
parallel</a>:
217219
<ol>
218220
<li>If there are no <a>share targets</a> available:
219221
<ol>
220222
<li>
221-
<a>Reject</a> {{Navigator/[[sharePromise]]}} with an
222-
{{"AbortError"}} {{DOMException}}.
223+
<a>Reject</a> [=this=].{{Navigator/[[sharePromise]]}}
224+
with an {{"AbortError"}} {{DOMException}}.
223225
</li>
224-
<li>Set {{Navigator/[[sharePromise]]}} to `null`.
226+
<li>Set [=this=].{{Navigator/[[sharePromise]]}} to `null`.
225227
</li>
226228
<li>Abort these steps.
227229
</li>
@@ -235,10 +237,10 @@ <h4>
235237
<li>If the user chose to cancel the share operation:
236238
<ol>
237239
<li>
238-
<a>Reject</a> {{Navigator/[[sharePromise]]}} with an
239-
{{"AbortError"}} {{DOMException}},
240+
<a>Reject</a> [=this=].{{Navigator/[[sharePromise]]}}
241+
with an {{"AbortError"}} {{DOMException}},
240242
</li>
241-
<li>Set {{Navigator/[[sharePromise]]}} to `null`.
243+
<li>Set [=this=].{{Navigator/[[sharePromise]]}} to `null`.
242244
</li>
243245
<li>Abort these steps.
244246
</li>
@@ -252,10 +254,10 @@ <h4>
252254
data:
253255
<ol>
254256
<li>
255-
<a>Reject</a> {{Navigator/[[sharePromise]]}} with an
256-
{{"DataError"}} {{DOMException}}.
257+
<a>Reject</a> [=this=].{{Navigator/[[sharePromise]]}}
258+
with an {{"DataError"}} {{DOMException}}.
257259
</li>
258-
<li>Set {{Navigator/[[sharePromise]]}} to `null`.
260+
<li>Set [=this=].{{Navigator/[[sharePromise]]}} to `null`.
259261
</li>
260262
<li>Abort these steps.
261263
</li>
@@ -264,9 +266,10 @@ <h4>
264266
<li>Once the data has either been successfully transmitted to
265267
the [=share target=], or successfully transmitted to the OS (if
266268
the transmission to the [=share target=] cannot be confirmed),
267-
<a>resolve</a> {{Navigator/[[sharePromise]]}} with `undefined`.
269+
<a>resolve</a> [=this=].{{Navigator/[[sharePromise]]}} with
270+
`undefined`.
268271
</li>
269-
<li>Set {{Navigator/[[sharePromise]]}} to `null`.
272+
<li>Set [=this=].{{Navigator/[[sharePromise]]}} to `null`.
270273
</li>
271274
</ol>
272275
</li>

0 commit comments

Comments
 (0)