3939 } ;
4040 </ script >
4141 </ head >
42- < body >
42+ < body data-cite =" FILEAPI " >
4343 < section id ="abstract ">
4444 < p >
4545 This specification defines an API for sharing text, links and other
@@ -141,8 +141,17 @@ <h4>
141141 rejected with</ a > {{InvalidStateError}}.
142142 </ li >
143143 < li > If none of |data|'s members {{ShareData/title}},
144- {{ShareData/text}}, or {{ShareData/url}} are present, return < a > a
145- promise rejected with</ a > a {{TypeError}}.
144+ {{ShareData/text}}, or {{ShareData/url}} or {{ShareData/file}} are
145+ present, return < a > a promise rejected with</ a > a {{TypeError}}.
146+ </ li >
147+ < li > If |data|'s {{ShareData/files}} member is present:
148+ < ol >
149+ < li > If |data|'s {{ShareData/files}} member is empty, or if the
150+ implementation does not support file sharing, return < a > a
151+ promise rejected with</ a > a {{TypeError}}, and abort these
152+ steps.
153+ </ li >
154+ </ ol >
146155 </ li >
147156 < li > If |data|'s {{ShareData/url}} member is present:
148157 < ol >
163172 </ ol >
164173 </ li >
165174 < li > If the [=relevant global object=] of [=this=] does not have
166- [=transient activation=], return < a > a promise rejected with</ a >
175+ [=transient activation=], or a file type is being blocked due to
176+ security considerations, return < a > a promise rejected with</ a >
167177 with a {{"NotAllowedError"}} {{DOMException}}.
168178 </ li >
169179 < li > Set {{[[sharePromise]]}} to be < a > a new promise</ a > .
244254 </ h3 >
245255 < pre class ="idl ">
246256 dictionary ShareData {
257+ FrozenArray<File> files;
247258 USVString title;
248259 USVString text;
249260 USVString url;
@@ -254,6 +265,12 @@ <h3>
254265 members:
255266 </ p >
256267 < dl data-sort ="">
268+ < dt >
269+ < dfn > files</ dfn > member
270+ </ dt >
271+ < dd >
272+ Files to be shared.
273+ </ dd >
257274 < dt >
258275 < dfn > title</ dfn > member
259276 </ dt >
0 commit comments