Since Google Chrome and Firefox does not support Web Share yet, I need some alternative way to test this in development.
Sharing is achieved via this example:
if (navigator.share) {
  navigator.share({
    title: 'web.dev',
    text: 'Check out web.dev.',
    url: 'https://web.dev/',
  })
    .then(() => console.log('Successful share'))
    .catch((error) => console.log('Error sharing', error));
} else {
  console.warn('Cannot share in this browser')
}
Which will log for any unsupported browser:
Cannot share in this browser
Any ideas of how to get this to work for development?
 
     
    