If web share API is supported it should show up native share dialog else it should go to the URL defined in href of the anchor tag
Below code works well on devices where web share API is supported and shows the native share dialog but throughs "Uncaught (in promise) DOMException: Share canceled" error where web share API is not supported and do not goes to the…