Mokku
Mokku copied to clipboard
FormData class is redefined
Hi,
when Mokku is enabled, the FormData class gets redefined as this:
> const formData = new FormData(<a form with values>)
> formData
g {fd: FormData, form: form.standard-form, append: ƒ}
append: ƒ ()
fd: FormData {}
form: form.standard-form
entries: (...)
get entries: ƒ ()
__proto__: Object
And doing any operations on that variable like formData.get("")
throws an exception:
TypeError: formData.get is not a function
Tried it in Chrome Version 89.0.4389.90 (Official Build) (64-bit)
Hi @xorxsan, thanks for reporting, will look into it.
Hi @xorxsan just an update, this is not very straightforward as I am using a library xhook
that does that, I am exploring new ways to mock which takes page injection out of context, no injection - no unexpected modification like this, if it works then well and good, if not I will try to inject getter and setters to current form data class.
Hi @xorxsan, Can you check this again, I checked with 2.0.0(1), not happening anymore. Feel free to reopen.