0
votes

I want to teach the user a different flow if the Web Share Target API is available. Is there a way to detect if it's available?

1
If you go to that page in Firefox, it'll say navigator.share is not supported in this browser, try sharing from another app instead., so presumably yes. Look for the line if ('share' in navigator) { in the source.ceejayoz
@ceejayoz this detects if the Web Share API is available. I'm trying to find out if the Web Share Target API is available.Dimitar Nestorov

1 Answers

-1
votes
if (navigator.share === undefined) {
    console.log('Error: Unsupported  feature: navigator.share');
}

if (navigator.share === undefined) {
   alert('Error: Unsupported  feature: navigator.share');
}