You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there are no share targets available:
Reject [[sharePromise]] with an "AbortError" DOMException.
However, in the above, it's possible that there is no share service available at all (or the service may fail to be initiated). It's not really possible to know this beforehand if it will succeed. In such a case, it may be more suitable to reject with a "NotSupportedError".
The text was updated successfully, but these errors were encountered:
The user agent might decide there are no suitable share targets available because of the specific file types being shared. Future share attempts might use different file types, or the user might install a new app that receives the relevant file types. In this scenario, NotSupportedError will not be the appropriate error - it would allow the website to learn which apps are installed.
We expected that browsers would know if the share service was available, and not define navigator.share if it wasn't available, so web apps could hide their Share buttons. If I understand correctly, you are suggesting a NotSupportedError would be useful to indicate that all future attempts will fail (regardless of the shared data), so web app can disable their Share buttons when they receive such an error.
With #113, the spec says:
However, in the above, it's possible that there is no share service available at all (or the service may fail to be initiated). It's not really possible to know this beforehand if it will succeed. In such a case, it may be more suitable to reject with a "NotSupportedError".
The text was updated successfully, but these errors were encountered: