-
Notifications
You must be signed in to change notification settings - Fork 157
Open
Labels
Description
When using your library on a website, every usages of navigator.sendBeacon(url, formData) are broken.
It seems that your library is patching the FormData object. It works fine with fetch and xhr because it is also patching them. But it is still an issue with sendBeacon: the browser is receiving an unexpected Xhook instance and because it does not recognize it, just runs toString on the provided value which produces "[object Object]".
How to reproduce:
- With
xhookinstalled on a HTML document, run something like this:
const formData = new FormData()
formData.append("foo", "bar")
navigator.sendBeacon("/", formData)
