LibWeb: Implement DataTransferItemList.prototype.add()

This commit is contained in:
Timothy Flynn 2024-08-21 09:35:25 -04:00 committed by Andreas Kling
commit 74d9cfbf2a
Notes: github-actions[bot] 2024-08-22 12:22:38 +00:00
8 changed files with 126 additions and 3 deletions

View file

@ -8,6 +8,7 @@
#include <LibJS/Forward.h>
#include <LibWeb/Bindings/PlatformObject.h>
#include <LibWeb/WebIDL/ExceptionOr.h>
namespace Web::HTML {
@ -20,6 +21,9 @@ public:
static JS::NonnullGCPtr<DataTransferItemList> create(JS::Realm&, JS::NonnullGCPtr<DataTransfer>);
virtual ~DataTransferItemList() override;
WebIDL::ExceptionOr<JS::GCPtr<DataTransferItem>> add(String const& data, String const& type);
JS::GCPtr<DataTransferItem> add(JS::NonnullGCPtr<FileAPI::File>);
private:
DataTransferItemList(JS::Realm&, JS::NonnullGCPtr<DataTransfer>);