|
39 | 39 | };
|
40 | 40 | script>
|
41 | 41 | head>
|
42 |
| - <body> |
| 42 | + <body data-cite="FILEAPI"> |
43 | 43 | <section id="abstract">
|
44 | 44 | <p>
|
45 | 45 | This specification defines an API for sharing text, links and other
|
|
141 | 141 | rejected witha> {{InvalidStateError}}.
|
142 | 142 | li>
|
143 | 143 | <li>If none of |data|'s members {{ShareData/title}},
|
144 |
| - {{ShareData/text}}, or {{ShareData/url}} are present, return <a>a |
145 |
| - promise rejected witha> a {{TypeError}}. |
| 144 | + {{ShareData/text}}, or {{ShareData/url}} or {{ShareData/file}} are |
| 145 | + present, return <a>a promise rejected witha> 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 witha> a {{TypeError}}, and abort these |
| 152 | + steps. |
| 153 | + li> |
| 154 | + ol> |
146 | 155 | li>
|
147 | 156 | <li>If |data|'s {{ShareData/url}} member is present:
|
148 | 157 | <ol>
|
|
163 | 172 | ol>
|
164 | 173 | li>
|
165 | 174 | <li>If the [=relevant global object=] of [=this=] does not have
|
166 |
| - [=transient activation=], return <a>a promise rejected witha> |
| 175 | + [=transient activation=], or a file type is being blocked due to |
| 176 | + security considerations, return <a>a promise rejected witha> |
167 | 177 | with a {{"NotAllowedError"}} {{DOMException}}.
|
168 | 178 | li>
|
169 | 179 | <li>Set {{[[sharePromise]]}} to be <a>a new promisea>.
|
|
244 | 254 | h3>
|
245 | 255 | <pre class="idl">
|
246 | 256 | dictionary ShareData {
|
| 257 | + FrozenArray<File> files; |
247 | 258 | USVString title;
|
248 | 259 | USVString text;
|
249 | 260 | USVString url;
|
|
254 | 265 | members:
|
255 | 266 | p>
|
256 | 267 | <dl data-sort="">
|
| 268 | + <dt> |
| 269 | + <dfn>filesdfn> member |
| 270 | + dt> |
| 271 | + <dd> |
| 272 | + Files to be shared. |
| 273 | + dd> |
257 | 274 | <dt>
|
258 | 275 | <dfn>titledfn> member
|
259 | 276 | dt>
|
|
0 commit comments