Skip to content

Instantly share code, notes, and snippets.

@bogas04 bogas04/share.js
Created Sep 22, 2017

Embed
What would you like to do?
Web Share API Example
async handleClick (e) {
// feature detection
if ('share' in navigator) {
try {
await navigator.share({
title: 'Click-bait title #6314',
url: 'http://www.theuselessweb.com/'
});
} catch (err) {
console.error(err);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.