mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:57:45 +00:00
LibWeb: Add FormDataIterator implementation
This adds the FormDataIterator implementation so we can iterate over FormData.{keys(),values(),entries()}.
This commit is contained in:
parent
680e970597
commit
be52e7171a
8 changed files with 133 additions and 2 deletions
|
@ -41,7 +41,12 @@ public:
|
|||
WebIDL::ExceptionOr<void> set(String const& name, String const& value);
|
||||
WebIDL::ExceptionOr<void> set(String const& name, JS::NonnullGCPtr<FileAPI::Blob> const& blob_value, Optional<String> const& filename = {});
|
||||
|
||||
using ForEachCallback = Function<JS::ThrowCompletionOr<void>(String const&, FormDataEntryValue const&)>;
|
||||
JS::ThrowCompletionOr<void> for_each(ForEachCallback);
|
||||
|
||||
private:
|
||||
friend class FormDataIterator;
|
||||
|
||||
explicit FormData(JS::Realm&, Vector<FormDataEntry> entry_list = {});
|
||||
|
||||
virtual JS::ThrowCompletionOr<void> initialize(JS::Realm&) override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue