Index: core/html/FormData.idl |
diff --git a/core/html/FormData.idl b/core/html/FormData.idl |
index bab02fce4da8f3c27b36e402ca45a37079ac3130..dccbd43de03f2eca2feeff50b9b4c2493fe2bac0 100644 |
--- a/core/html/FormData.idl |
+++ b/core/html/FormData.idl |
@@ -28,14 +28,29 @@ |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
-// https://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#formdata |
+// https://xhr.spec.whatwg.org/#interface-formdata |
+ |
+// TODO(philipj): The FormDataEntryValue typedef should use Blob, not File. |
+typedef (File or USVString) FormDataEntryValue; |
[ |
Constructor(optional HTMLFormElement form), |
Exposed=(Window,Worker), |
+ GarbageCollected, |
ImplementedAs=DOMFormData, |
- WillBeGarbageCollected, |
] interface FormData { |
- [DartCustom] void append(DOMString name, Blob value, optional DOMString filename); |
- [DartCustom] void append(DOMString name, DOMString value); |
+ // TODO(philipj): The value argument should be FormDataEntryValue and there |
+ // should be no optional filename argument. crbug.com/498790 |
+ [CallWith=ExecutionContext] void append(USVString name, Blob value, optional USVString filename); |
+ void append(USVString name, USVString value); |
+ |
+ [RuntimeEnabled=FormDataNewMethods, ImplementedAs=deleteEntry] void delete(USVString name); |
+ [RuntimeEnabled=FormDataNewMethods] FormDataEntryValue? get(USVString name); |
+ [RuntimeEnabled=FormDataNewMethods] sequence<FormDataEntryValue> getAll(USVString name); |
+ [RuntimeEnabled=FormDataNewMethods, ImplementedAs=hasEntry] boolean has(USVString name); |
+ // TODO(philipj): The value argument should be FormDataEntryValue and there |
+ // should be no optional filename argument. |
+ [RuntimeEnabled=FormDataNewMethods] void set(USVString name, Blob value, optional USVString filename); |
+ [RuntimeEnabled=FormDataNewMethods] void set(USVString name, USVString value); |
+ [RuntimeEnabled=FormDataNewMethods] iterable<USVString, FormDataEntryValue>; |
}; |