- From: François Beaufort <notifications@github.com>
- Date: Tue, 14 Dec 2021 08:51:50 -0800
- To: w3ctag/design-reviews <design-reviews@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 14 December 2021 16:52:02 UTC
Rejecting the `showPicker()` promise with `NotSupportedError ` may help with whether picker was shown or not. What do you think @domenic?
```js
if ("showPicker" in HTMLInputElement.prototype) {
try {
await document.querySelector("input").showPicker();
}
catch (error) {
if (error == "NotSupportedError") {
/* Show custom picker */
}
}
} else {
/* Show custom picker */
}
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3ctag/design-reviews/issues/688#issuecomment-993763531
Received on Tuesday, 14 December 2021 16:52:02 UTC