fable-browser icon indicating copy to clipboard operation
fable-browser copied to clipboard

Add way to pass HTML form to FormData creation

Open aronerben opened this issue 2 years ago • 2 comments

According to https://developer.mozilla.org/en-US/docs/Web/API/FormData/FormData, the constructor should be able to take an optional <form>/HTMLFormElement.

aronerben avatar Feb 10 '23 18:02 aronerben

As it is, this introduces a cirular dependency between Browser.Dom and Browser.Blob (therefore this is a draft), how should this be resolved? Should I extract FormData into its own file?

aronerben avatar Feb 10 '23 18:02 aronerben

I suppose the only clean way to resolve would be to merge Browser.Blob and Browser.Dom together.

But if we go this way I wonder, if you should not merge back all the packages together. This would be easier for the consumer too because if he wants to target the Browser he would only have 1 package to import.

I think the original split was to make designing the API/Packages easier and also perhaps a faster compilation. I think faster compilation is false good idea in this case.

@alfonsogarciacaro What do you think?

MangelMaxime avatar Feb 10 '23 19:02 MangelMaxime