Skip to content

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/Blob/Browser.Blob.fs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ namespace Browser.Types
open System
open Fable.Core
open Fable.Core.JS
open Browser.Dom

[<StringEnum; RequireQualifiedAccess>]
type BlobEndings =
Expand Down Expand Up @@ -39,7 +40,7 @@ type [<AllowNullLiteral; Global>] FormData =
abstract values: unit -> obj seq

type [<AllowNullLiteral>] FormDataType =
[<Emit("new $0($1...)")>] abstract Create: unit -> FormData
[<Emit("new $0($1...)")>] abstract Create: ?form : HTMLFormElement -> FormData

namespace Browser

Expand Down
3 changes: 3 additions & 0 deletions src/Blob/Browser.Blob.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
<ItemGroup>
<PackageReference Include="Fable.Core" Version="3.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Dom\Browser.Dom.fsproj" />
</ItemGroup>
<!-- This package doesn't contain actual code
so we don't need to add the sources -->
<!-- <ItemGroup>
Expand Down