Plugin
share_plus
Use case
See discussion in #1643
Several users complain that the shareFiles and shareXFiles method fail in web with obscure errors.
Proposal
The Navigator API provides a canShare method, which can be called with the list of files and will return true if the files are shareable: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/canShare
The Navigator.canShare() method of the Web Share API returns true if the equivalent call to navigator.share() would succeed.
The idea would be that use this method to verify if the files are shareable, and if not throw an exception with an error similar to: "Files cannot be share, canShare returned false, check https://developer.mozilla.org/en-US/docs/Web/API/Navigator/canShare for more information"
Plugin
share_plus
Use case
See discussion in #1643
Several users complain that the
shareFilesandshareXFilesmethod fail in web with obscure errors.Proposal
The Navigator API provides a
canSharemethod, which can be called with the list of files and will return true if the files are shareable: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/canShareThe idea would be that use this method to verify if the files are shareable, and if not throw an exception with an error similar to: "Files cannot be share, canShare returned false, check https://developer.mozilla.org/en-US/docs/Web/API/Navigator/canShare for more information"