package js.html
Available on js
The FormData interface provides a way to easily construct a set of key/value pairs representing form fields and their values, which can then be easily sent using the XMLHttpRequest.send() method. It uses the same format a form would use if the encoding type were set to "multipart/form-data".
Documentation FormData by Mozilla Contributors, licensed under CC-BY-SA 2.5.
See also:
new(?form:FormElement)Throws:
null |
DOMError |
|---|
append(name:String, value:String):Voidappend(name:String, value:Blob, ?filename:String):VoidAppends a new value onto an existing key inside a FormData object, or adds the key if it does not already exist.
Throws:
null |
DOMError |
|---|
delete(name:String):VoidDeletes a key/value pair from a FormData object.
entries():FormDataIteratorReturns an Iteration_protocols allowing to go through all key/value pairs contained in this object.
Throws:
null |
DOMError |
|---|
forEach(callback:Dynamic, ?thisArg:Dynamic):VoidThrows:
null |
DOMError |
|---|
get(name:String):EitherType<Blob, EitherType<Directory, String>>Returns the first value associated with a given key from within a FormData object.
getAll(name:String):Array<EitherType<Blob, EitherType<Directory, String>>>Returns an array of all the values associated with a given key from within a FormData.
has(name:String):BoolReturns a boolean stating whether a FormData object contains a certain key/value pair.
keys():FormDataIteratorReturns an Iteration_protocols allowing to go through all keys of the key/value pairs contained in this object.
Throws:
null |
DOMError |
|---|
set(name:String, value:String):Voidset(name:String, value:Blob, ?filename:String):VoidSets a new value for an existing key inside a FormData object, or adds the key/value if it does not already exist.
Throws:
null |
DOMError |
|---|
values():FormDataIteratorReturns an Iteration_protocols allowing to go through all values of the key/value pairs contained in this object.
Throws:
null |
DOMError |
|---|
© 2005–2020 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/html/FormData.html