@@ -16,7 +16,7 @@ import scala.scalajs.js.|
1616 */
1717@ js.native
1818@ JSGlobal
19- class FormData (form : HTMLFormElement = js.native) extends js.Iterable [js.Tuple2 [String , String ]] {
19+ class FormData (form : HTMLFormElement = js.native) extends js.Iterable [js.Tuple2 [String , String | Blob ]] {
2020
2121 /** The `append()` method of the `FormData` interface appends a new value onto an existing key inside a `FormData`
2222 * object, or adds the key if it does not already exist.
@@ -41,7 +41,7 @@ class FormData(form: HTMLFormElement = js.native) extends js.Iterable[js.Tuple2[
4141 * The filename reported to the server (a string), when a `Blob` or `File` is passed as the second parameter. The
4242 * default filename for `Blob` objects is "blob". The default filename for `File` objects is the file's filename.
4343 */
44- def append (name : String , value : Blob , blobName : String ): Unit = js.native
44+ def append (name : String , value : Blob , blobName : String = js.native ): Unit = js.native
4545
4646 /** The `delete()` method of the `FormData` interface deletes a key and its value(s) from a `FormData` object.
4747 * @param name
@@ -89,11 +89,11 @@ class FormData(form: HTMLFormElement = js.native) extends js.Iterable[js.Tuple2[
8989 * The field's value.
9090 */
9191 def set (
92- name : String , value : Blob , blobName : String
92+ name : String , value : Blob , blobName : String = js.native
9393 ): Unit = js.native
9494
9595 @ JSName (js.Symbol .iterator)
96- override def jsIterator (): js.Iterator [js.Tuple2 [String , String ]] = js.native
96+ override def jsIterator (): js.Iterator [js.Tuple2 [String , String | Blob ]] = js.native
9797
9898 /** The `FormData.entries()` method returns an iterator which iterates through all key/value pairs contained in the
9999 * `FormData`. The key of each pair is a string object, and the value is either a string or a `Blob`.
0 commit comments