I'm attempting to access the navigator function in my project to share a specific URL, but I'm facing difficulties accessing it on Mac OS when using browsers other than Safari. Is there a solution to this issue?
Below is the function I created for the share feature:
function shareFunction() {
if(navigator.share) {
navigator.share({
title: document.title,
url: window.location.href
})
.then(() =>{
setShareClick(true)
})
.catch(err => console.error(err));
}
}
This functionality works on Safari in Mac OS and all Windows browsers, but not on Mac Chrome or Firefox. How can I implement the share sheet in Mac Chrome?