Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(808)

Unified Diff: Source/core/html/FormData.idl

Issue 564963002: New FormData methods: get, getAll, has, set, delete and iterable (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Implement getAll(), fix get() with no matches Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/html/FormData.idl
diff --git a/Source/core/html/FormData.idl b/Source/core/html/FormData.idl
index c4b1c21a830fc9368675191e9ff4a9584887b4eb..86d1b17132c9f10a7a214876c502ccfee65c48b5 100644
--- a/Source/core/html/FormData.idl
+++ b/Source/core/html/FormData.idl
@@ -28,7 +28,9 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-// https://dvcs.w3.org/hg/xhr/raw-file/tip/Overview.html#formdata
+// http://xhr.spec.whatwg.org/#interface-formdata
+
+typedef (File or ScalarValueString) FormDataEntryValue;
[
Constructor(optional HTMLFormElement form),
@@ -36,6 +38,17 @@
ImplementedAs=DOMFormData,
WillBeGarbageCollected,
] interface FormData {
- void append(DOMString name, Blob value, optional DOMString filename);
- void append(DOMString name, DOMString value);
+ void append(ScalarValueString name, Blob value, optional ScalarValueString filename);
+ void append(ScalarValueString name, ScalarValueString value);
+ [ImplementedAs=deleteFunction] void delete(ScalarValueString name);
+
+ // FIXME: replace 'any' with nullable union type, per spec.
+ // FormDataEntryValue? get(ScalarValueString name);
+ [CallWith=ScriptState] any get(ScalarValueString name);
+ // sequence<FormDataEntryValue> getAll(ScalarValueString name);
+ [CallWith=ScriptState] any[] getAll(ScalarValueString name);
+
+ boolean has(ScalarValueString name);
+ void set(ScalarValueString name, Blob value, optional ScalarValueString filename);
+ void set(ScalarValueString name, ScalarValueString value);
};

Powered by Google App Engine
This is Rietveld 408576698