@@ -172,8 +172,10 @@ <h4>
172
172
|data:ShareData|, run the following steps:
173
173
</ p >
174
174
< ol class ="algorithm ">
175
- < li > If the [=current settings object=]'s [=environment settings
176
- object/responsible document=] is not [=allowed to use=]
175
+ < li > Let |document:Document| be the [=current settings object=]'s
176
+ [=environment settings object/responsible document=].
177
+ </ li >
178
+ < li > If |document| is not < a > allowed to use</ a >
177
179
< a > "web-share"</ a > , return [=a promise rejected with=] a
178
180
{{"NotAllowedError"}} {{DOMException}}.
179
181
</ li >
@@ -188,14 +190,14 @@ <h4>
188
190
</ li >
189
191
< li > [=Consume user activation=] of |window|.
190
192
</ li >
191
- < li > Let |base:URL| be [=this=]'s < a > relevant settings object</ a > 's
192
- [=environment settings object/API base URL=].
193
- </ li >
194
- < li > If [=validate share data=] with |data| and |base| returns
193
+ < li > If [=validate share data=] with |data| and |document| returns
195
194
false, then return [=a promise rejected with=] a {{TypeError}}.
196
195
</ li >
197
196
< li > If |data|'s {{ShareData/url}} member is present:
198
197
< ol >
198
+ < li > Let |base:URL| be [=this=]'s < a > relevant settings
199
+ object</ a > 's [=environment settings object/API base URL=].
200
+ </ li >
199
201
< li > Let |url:URL| be the result of running the < a > URL
200
202
parser</ a > on |data|'s {{ShareData/url}} with |base|.
201
203
</ li >
302
304
</ li >
303
305
< li > Return the result of [=validate share data=] with |data| and
304
306
[=this=]'s [=relevant settings object=]'s [=environment settings
305
- object/API base URL =].
307
+ object/responsible document =].
306
308
</ li >
307
309
</ ol >
308
310
</ section >
@@ -312,9 +314,13 @@ <h3>
312
314
</ h3 >
313
315
< p >
314
316
To < dfn > validate share data</ dfn > with |data:ShareData| and
315
- |base:URL|, run the following steps:
317
+ |document:Document|, run the following steps. The algorithm runs in
318
+ the [=this=] context from where it is invoked (i.e. {{Navigator}}
319
+ instance):
316
320
</ p >
317
321
< ol class ="algorithm ">
322
+ < li > If |document| is not [=Document/fully active=], return false.
323
+ </ li >
318
324
< li > If none of |data|'s members {{ShareData/title}},
319
325
{{ShareData/text}}, or {{ShareData/url}} or {{ShareData/files}} are
320
326
present, return false.
345
351
</ li >
346
352
< li > If |data|'s {{ShareData/url}} member is present:
347
353
< ol >
354
+ < li > Let |base:URL| be [=this=]'s < a > relevant settings
355
+ object</ a > 's [=environment settings object/API base URL=].
356
+ </ li >
348
357
< li > Let |url:URL| be the result of running the [=URL parser=]
349
358
on |data|'s {{ShareData/url}} member, with |base|, and no
350
359
encoding override.
0 commit comments