-
Notifications
You must be signed in to change notification settings - Fork 40
Add way to pass HTML form to FormData creation #117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
As it is, this introduces a cirular dependency between |
|
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? |
|
I realise this has been idle for a while, but I would strongly agree with this (merging the packages). As it is, it's a real hassle to find out which packages you should be referencing to bring in a specific platform feature. When you discover (as is often the case) that the feature you want hasn't been added yet, It also makes it more difficult to contribute bindings for it, because you have to create a new project and all that. Having a single package would at least make that whole process less frustrating. |
|
Hello @robitar, There is a rework of Fable.Core planned for Fable 5. I am ok with merging Fable.Browser into a single package, but it will be done once Fable.Core rework is done as the API are going to be changing slightly. And this way the new Fable.Browser package will use the new APIs directly without having to support multiple version of Fable (making the maintenance easier) |
|
Any info on the rework ooc? I'm putting a bit of time aside this year to do some work on Fable, mostly around the bindings for the web platform. I want to have 100% coverage based on the source WebIDL rather than the current setup of handwritten ones, or Typescript conversions. The idea is to make it low level and accurate, not ergonomic, no no DUs etc. I should be able to look at the MDN documentation, and be able to use the same API in F#, even if its a bit clunky, it exists. Part of that is also covering over the ES/JS 'standard library' and making sure all those features are available. A lot of this is covered in Fable.Core, but its not always clear what's supported, or what form its in etc, or where it lives. In particular, I can never figure out if something is in Because of the real issue of backwards compat, I was thinking of suggesting something like the |
There is old issue on Fable, but it doesn't explains the gobal pictures and is missing examples of how it will look like / be used. My plan is to create a PR starting this work during this month, so you can keep an eye on Fable repository for that.
This is part of what the re-work will address, as this will create the foundation for all the languages supported by Fable and their interop APIs.
Fable don't modify the compiler so I don't know if this is possible. The way we are thinking of doing it is marking the old API as obsolete, and in a next major version remove everything. It should work ok because the news APIs are going to be under their own module and so people will not need to open the default |
|
Fantastic, I'll keep an eye on things over there. Do you have any idea of what shape the APIs will have? As I said up above, discoverability and predictability are not fantastic with the current setup. Even when I do know something exists, I can never figure out where it is and how to bring it in. Re deprecated, yes thats much more straightforward! I assumed there wouldn't be an appetite for this even with major version jumps, because of all the churn it will cause. |
|
Just looking at the linked comment, it looks like I laid out all the concerns there a few years back 😄 Mostly around the It really should be Has there been any discussion around why it needs to be nested under |
|
The modules and namespaces will probably be I am not sure yet if Experimentation and proposition will be made, changing these modules/namespaces is not as simple as for any .NET libraries because we also need to update Fable internal mapping. |
|
Yes that makes a lot of sense, and agreed with the full language name. Ironically, making things verbose and spelling them out tends to make it easier to remember imo. I suppose there will also need to be some experimentation about what actually goes into these namespaces. What are the things that Anyway, I'll keep an eye out for the proposals and perhaps we can continue the discussion there. Also happy to offer any help. I have a few bugs to post and I thought it might be a good opportunity to get involved by trying to fix some of them! |
According to https://developer.mozilla.org/en-US/docs/Web/API/FormData/FormData, the constructor should be able to take an optional
<form>/HTMLFormElement.