Web Share API for Siberian WebApp

Siberian Native Apps has Social Sharing functionality by default but it's not available for Web Apps. 

So here i am sharing a simple Web Share API example. By using this code you can able to use Share functionality in Web Apps. 

Note that this won't work in Native Android or iOS Apps. It's just for Web Apps. So if you want then you can hide this page from Native Android & iOS Apps using CSS.

This feature supports in Android Chrome Browser & iPhone Safari Browser (iOS 12.2+).

You can use below code in Source Code Module.

<button onclick="share()" target-"_system">Share this WebApp</button>
function share() {
if (navigator.share) {
title: 'WebVista',
text: 'I like this, Just check it out...', // Change Share Text Here
url: 'https://webvista.co.in/siberian-pwa.html' // Change URL Here
.then(() => console.log('Successful share'))
.catch((error) => console.log('Error sharing', error));
} else {
alert("Web Share API is not supported in your browser.");