relopcorporate.blogg.se

Shareit web share
Shareit web share




shareit web share

If you are on a browser that doesn’t yet support the API and you click “share it” at the bottom of this post, you just get directed to the Twitter web intent. This means that it is not widely available and you need to opt in to testing the feature on your site. This is good news right now as the API is only available as an Origin Trial. You can feature detect the existence of the API so you can progressively enhance a site with the web share API. If the user is unable to or chooses not to share, the Promise will reject. The API is Promise based, when a page is successfully shared the Promise will resolve. Also, like other powerful new web platform features, it only works on sites hosted on HTTPS.

shareit web share

You can only invoke navigator.share as a result of a user gesture, so sites can’t surprise a user into sharing a page. It is mandatory to have either a text or url property, though you can have both. The method takes an object that can have title, text or url properties. It is available on the navigator object and consists of one method share. The web share API is actually quite a simple API. I want to share how the API works and my thoughts on it so far. You can keep up with support by checking out the Web Share API on Can I Use. The Web Share API origin trial has finished and after consideration is now supported in Chrome for Android.






Shareit web share