FormData.idl 1.3 KB

123456789101112131415161718192021222324252627
  1. #import <FileAPI/Blob.idl>
  2. #import <FileAPI/File.idl>
  3. // FIXME: This #import currently gives the following error after XHR/FormData.idl was #imported in Fetch/BodyInit.idl:
  4. // "LibWeb/HTML/Window.idl:114: error: Mixin 'WindowOrWorkerGlobalScope' was never defined."
  5. // XHR/FormData.idl needs to be #imported in Fetch/BodyInit.idl while removing #import HTML/HTMLFormElement.idl
  6. // currently makes no difference.
  7. // #import <HTML/HTMLFormElement.idl>
  8. typedef (File or USVString) FormDataEntryValue;
  9. // https://xhr.spec.whatwg.org/#interface-formdata
  10. [Exposed=Window, UseNewAKString]
  11. interface FormData {
  12. constructor(optional HTMLFormElement form);
  13. undefined append(USVString name, USVString value);
  14. undefined append(USVString name, Blob blobValue, optional USVString filename);
  15. undefined delete(USVString name);
  16. // FIXME: The BindingsGenerator is not able to resolve the Variant's visit for FormDataEntryValue when
  17. // the return value for one function returns an optional FormDataEntryValue while the others does not.
  18. (File or USVString)? get(USVString name);
  19. sequence<FormDataEntryValue> getAll(USVString name);
  20. boolean has(USVString name);
  21. undefined set(USVString name, USVString value);
  22. undefined set(USVString name, Blob blobValue, optional USVString filename);
  23. iterable<USVString, FormDataEntryValue>;
  24. };