Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
<button id="eme">Encrypted Media (EME)</button>
<button id="idle-detection">Idle Detection</button>
<button id="persistent-storage">Persistent Storage</button>
<button id="show-open-file-picker">Show Open File Picker</button>
<button id="show-directory-picker">Show Directory Picker</button>
<button id="protocol-handler">Protocol Handler</button>
<button id="webauthn-attestation">WebAuthn Attestation</button>
<button id="nfc">NFC</button>
Expand Down
30 changes: 30 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,36 @@ window.addEventListener("load", () => {
displayOutcome("persistent-storage", "error"),
);
},
"show-open-file-picker": () => {
if ("showOpenFilePicker" in window) {
window
.showOpenFilePicker()
.then(
displayOutcome("show-open-file-picker", "success"),
displayOutcome("show-open-file-picker", "error"),
);
} else {
displayOutcome(
"show-open-file-picker",
"error",
)("window.showOpenFilePicker not available");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this logging is actually broken. I've pushed a separate fix: 144752c

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, checking in, this is resolved now?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, should be fixed.

}
},
"show-directory-picker": () => {
if ("showDirectoryPicker" in window) {
window
.showDirectoryPicker()
.then(
displayOutcome("show-directory-picker", "success"),
displayOutcome("show-directory-picker", "error"),
);
} else {
displayOutcome(
"show-directory-picker",
"error",
)("window.showDirectoryPicker not available");
}
},

"protocol-handler": () => {
// https://www.w3.org/TR/html5/webappapis.html#navigatorcontentutils
Expand Down