Create a gist now

Instantly share code, notes, and snippets.

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