mirror of
https://github.com/servo/servo.git
synced 2025-08-15 18:35:33 +01:00
Refactor FormData code to match updated spec
Use Atoms instead of Strings as keys
This commit is contained in:
parent
61314f5253
commit
7001583047
14 changed files with 469 additions and 89 deletions
|
@ -4,19 +4,20 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
/*
|
||||
* The origin of this IDL file is
|
||||
* https://xhr.spec.whatwg.org
|
||||
* https://xhr.spec.whatwg.org/#interface-formdata
|
||||
*/
|
||||
|
||||
typedef (File or DOMString) FormDataEntryValue;
|
||||
typedef (Blob or USVString) FormDataEntryValue;
|
||||
|
||||
[Constructor(optional HTMLFormElement form)]
|
||||
[Constructor(optional HTMLFormElement form),
|
||||
/*Exposed=(Window,Worker)*/]
|
||||
interface FormData {
|
||||
void append(DOMString name, Blob value, optional DOMString filename);
|
||||
void append(DOMString name, DOMString value);
|
||||
void delete(DOMString name);
|
||||
FormDataEntryValue? get(DOMString name);
|
||||
// sequence<FormDataEntryValue> getAll(DOMString name);
|
||||
boolean has(DOMString name);
|
||||
void set(DOMString name, Blob value, optional DOMString filename);
|
||||
void set(DOMString name, DOMString value);
|
||||
void append(USVString name, USVString value);
|
||||
void append(USVString name, Blob value, optional USVString filename);
|
||||
void delete(USVString name);
|
||||
FormDataEntryValue? get(USVString name);
|
||||
sequence<FormDataEntryValue> getAll(USVString name);
|
||||
boolean has(USVString name);
|
||||
void set(USVString name, FormDataEntryValue value);
|
||||
// iterable<USVString, FormDataEntryValue>;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue