class FormData extends Object with Iterable[Tuple2[String, |[String, Blob]]]
XMLHttpRequest Level 2 adds support for the new FormData interface. FormData objects provide 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.
- Annotations
- @JSType() @native() @JSGlobal()
- Alphabetic
- By Inheritance
- FormData
- Iterable
- Object
- Any
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new FormData(form: HTMLFormElement, submitter: HTMLElement)
- new FormData(form: HTMLFormElement)
- new FormData()
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def append(name: String, value: Blob, blobName: String = js.native): Unit
The
append()method of theFormDatainterface appends a new value onto an existing key inside aFormDataobject, or adds the key if it does not already exist.The
append()method of theFormDatainterface appends a new value onto an existing key inside aFormDataobject, or adds the key if it does not already exist.- name
The name of the field whose data is contained in value.
- value
The field's value. This can be a string or
Blob(including subclasses such as File). If none of these are specified the value is converted to a string.- blobName
The filename reported to the server (a string), when a
BloborFileis passed as the second parameter. The default filename forBlobobjects is "blob". The default filename forFileobjects is the file's filename.
- def append(name: String, value: String): Unit
The
append()method of theFormDatainterface appends a new value onto an existing key inside aFormDataobject, or adds the key if it does not already exist.The
append()method of theFormDatainterface appends a new value onto an existing key inside aFormDataobject, or adds the key if it does not already exist.- name
The name of the field whose data is contained in value.
- value
The field's value. This can be a string or
Blob(including subclasses such as File). If none of these are specified the value is converted to a string.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def delete(name: String): Unit
The
delete()method of theFormDatainterface deletes a key and its value(s) from aFormDataobject.The
delete()method of theFormDatainterface deletes a key and its value(s) from aFormDataobject.- name
The name of the key you want to delete.
- def entries(): Iterator[Tuple2[String, |[String, Blob]]]
The
FormData.entries()method returns an iterator which iterates through all key/value pairs contained in theFormData.The
FormData.entries()method returns an iterator which iterates through all key/value pairs contained in theFormData. The key of each pair is a string object, and the value is either a string or aBlob. - final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- def get(name: String): |[String, Blob]
The
get()method of theFormDatainterface returns the first value associated with a given key from within aFormDataobject.The
get()method of theFormDatainterface returns the first value associated with a given key from within aFormDataobject. If you expect multiple values and want all of them, use thegetAll()method instead.- name
A string representing the name of the key you want to retrieve.
- returns
A value whose key matches the specified name. Otherwise,
null.
- def getAll(name: String): Array[|[String, Blob]]
The
getAll()method of theFormDatainterface returns all the values associated with a given key from within aFormDataobject. - final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def has(name: String): Boolean
The
has()method of theFormDatainterface returns whether aFormDataobject contains a certain key.The
has()method of theFormDatainterface returns whether aFormDataobject contains a certain key.- name
A string representing the name of the key you want to test for.
- returns
trueif a key ofFormDatamatches the specified name. Otherwise,false.
- def hasOwnProperty(v: String): Boolean
- Definition Classes
- Object
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isPrototypeOf(v: Object): Boolean
- Definition Classes
- Object
- def jsIterator(): Iterator[Tuple2[String, |[String, Blob]]]
- Definition Classes
- FormData → Iterable
- Annotations
- @JSName(js.Symbol.iterator)
- def keys(): Iterator[String]
The
FormData.keys()method returns an iterator which iterates through all keys contained in theFormData.The
FormData.keys()method returns an iterator which iterates through all keys contained in theFormData. The keys are strings. - final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def propertyIsEnumerable(v: String): Boolean
- Definition Classes
- Object
- def set(name: String, value: Blob, blobName: String = js.native): Unit
The
set()method of theFormDatainterface sets a new value for an existing key inside aFormDataobject, or adds the key/value if it does not already exist.The
set()method of theFormDatainterface sets a new value for an existing key inside aFormDataobject, or adds the key/value if it does not already exist.- name
The name of the field whose data is contained in value.
- value
The field's value.
- def set(name: String, value: String): Unit
The
set()method of theFormDatainterface sets a new value for an existing key inside aFormDataobject, or adds the key/value if it does not already exist.The
set()method of theFormDatainterface sets a new value for an existing key inside aFormDataobject, or adds the key/value if it does not already exist.- name
The name of the field whose data is contained in value.
- value
The field's value.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toLocaleString(): String
- Definition Classes
- Object
- def toString(): String
- Definition Classes
- AnyRef → Any
- def valueOf(): Any
- Definition Classes
- Object
- def values(): Iterator[|[String, Blob]]
The
FormData.values()method returns an iterator which iterates through all values contained in theFormData.The
FormData.values()method returns an iterator which iterates through all values contained in theFormData. The values are strings orBlobobjects. - final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()