Open mgrubinger opened 1 year ago
Sometimes you can't test the native [Navigator.share()](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/share) API, e.g. when the site you're developing is not served via https.
I used this tiny logger to preview what would have been passed to navigator.share()
navigator.share()
!navigator.share && navigator.share = (...args) => { return new Promise(() => { console.log(...args) , () => { console.log("error"); }}) }
date: '2021-01-20' short: For testing in non-secure environments
Sometimes you can't test the native [Navigator.share()](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/share) API, e.g. when the site you're developing is not served via https.
I used this tiny logger to preview what would have been passed to
navigator.share()