share-api-polyfill icon indicating copy to clipboard operation
share-api-polyfill copied to clipboard

No longer displays on desktop - Chrome 89+

Open aamir-madari opened this issue 4 years ago • 3 comments

The support for the Web Share API has been added to desktop as of Chrome 89. Therefore the polyfill no longer displays on desktop in Chrome/Edge.

The issue is the Windows equivalent isn't as great as it is on iOS and Android and lacks the ability to share on social media like in the polyfill.

Is there any way of utilising the polyfill rather than the native API? Can it be manually evoked via JS?

aamir-madari avatar Apr 24 '21 01:04 aamir-madari

I don't think there is an option for that. As you can see here the polyfill is a fallback to navigator.share. So if navigator.share exists, then the browser's implementation is used and not the polyfill. Well, that's the definition of a polyfill I guess.

valentinoli avatar Jun 17 '21 19:06 valentinoli

The Web Share feature in recent Edge and Chrome versions for Windows also appeared to me as really limited, there doesn't seem to be an option for sharing on social media which is arguably the most popular way to use it nowadays. However, this is because you might not have a Windows app for any social media installed and that supports sharing. The Twitter app in the Windows Store offers sharing. If you click on "Get apps in Store" I think you get a list of apps that support sharing.

valentinoli avatar Jun 17 '21 19:06 valentinoli

You might be able to do

navigator.share = undefined

before importing the polyfill.

valentinoli avatar Dec 17 '21 10:12 valentinoli