You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When browsing the DaisyUI Website that uses minimal-analytics, the navigation to links does not work. In the console of the browser an error is displayed linking to code of minimal-analytics: Uncaught (in promise) TypeError: navigator.sendBeacon is not a function. Source Location.
I guess my company modified the default Firefox installation to disable sending beacons using this API.
Is it possible to check if the API is available before calling it, so in case of corporate browsers like mine we do not run into exception but degrade gracefully?
The text was updated successfully, but these errors were encountered:
Yes this should be a fairly simple change, we'd just need to fall back to making a fetch request instead. The only consideration being sendBeacon ensures to request is made, regardless of navigation away from the page that initiates it, whereas fetch does not. I believe this is a fairly reasonable compromise (it being the only one, really).
I'll try and get to this when I have some time, but feel free to open a PR, all contributions welcome 👍
When browsing the DaisyUI Website that uses minimal-analytics, the navigation to links does not work. In the console of the browser an error is displayed linking to code of minimal-analytics:
Uncaught (in promise) TypeError: navigator.sendBeacon is not a function
. Source Location.I guess my company modified the default Firefox installation to disable sending beacons using this API.
Is it possible to check if the API is available before calling it, so in case of corporate browsers like mine we do not run into exception but degrade gracefully?
The text was updated successfully, but these errors were encountered: