Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 30 additions & 13 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ urlPrefix: https://tc39.github.io/ecma262/; spec: ECMA-262
type: dfn; text: realm; url: realm
urlPrefix: https://storage.spec.whatwg.org/; spec: storage
type: dfn; text: storage; url: site-storage
urlPrefix: https://www.w3.org/TR/webdriver-bidi/; spec: webdriver-bidi
type: dfn; text: WebDriver BiDi file dialog opened; url: webdriver-bidi-file-dialog-opened
</pre>

<style>
Expand Down Expand Up @@ -706,19 +708,26 @@ these steps:

1. Optionally, wait until any prior execution of this algorithm has terminated.

1. Display a prompt to the user requesting that the user pick some files.
If |options|["{{OpenFilePickerOptions/multiple}}"] is false,
there must be no more than one file selected;
otherwise any number may be selected.
1. Let |filePickerOptions| be an empty [=/map=].

The displayed prompt should let the user pick one of the |accepts options| to filter the list of displayed files.
Exactly how this is implemented, and what this prompt looks like is [=implementation-defined=].
1. Set |filePickerOptions|["multiple"] to |options|["{{OpenFilePickerOptions/multiple}}"].

When possible, this prompt should start out showing |starting directory|.
1. Let |dismissed| be the result of [=WebDriver BiDi file dialog opened=] with null and |filePickerOptions|.

1. Wait for the user to have made their selection.
1. If |dismissed| is false:

1. If the user dismissed the prompt without making a selection,
1. Display a prompt to the user requesting that the user pick some files.
If |filePickerOptions|["multiple"] is false, there must be no more than one file selected;
otherwise any number may be selected.

The displayed prompt should let the user pick one of the |accepts options| to filter the list of displayed files.
Exactly how this is implemented, and what this prompt looks like is [=implementation-defined=].

When possible, this prompt should start out showing |starting directory|.

1. Wait for the user to have made their selection.

1. If |dismissed| is true or if the user dismissed the prompt without making a selection,
[=/reject=] |p| with an "{{AbortError}}" {{DOMException}} and abort.

1. Let |entries| be a [=/list=] of [=file entries=] representing the selected files or directories.
Expand Down Expand Up @@ -873,13 +882,21 @@ these steps:

1. Optionally, wait until any prior execution of this algorithm has terminated.

1. Display a prompt to the user requesting that the user pick a directory.
1. Let |filePickerOptions| be an empty [=/map=].

When possible, this prompt should start out showing |starting directory|.
1. Set |filePickerOptions|["multiple"] to false.

1. Wait for the user to have made their selection.
1. Let |dismissed| be the result of [=WebDriver BiDi file dialog opened=] with null and |filePickerOptions|.

1. If the user dismissed the prompt without making a selection,
1. If |dismissed| is false:

1. Display a prompt to the user requesting that the user pick a directory.

When possible, this prompt should start out showing |starting directory|.

1. Wait for the user to have made their selection.

1. If |dismissed| is true or if the user dismissed the prompt without making a selection,
[=/reject=] |p| with an "{{AbortError}}" {{DOMException}} and abort.

1. Let |entry| be a [=directory entry=] representing the selected directory.
Expand Down
Loading