canShare

fun canShare(data: ShareData = definedExternally): Boolean(source)

The canShare() method of the Navigator interface returns true if the equivalent call to navigator.share() would succeed. Available only in secure contexts.

MDN Reference