LibWeb: Implement the DataTransfer types attribute

This commit is contained in:
Timothy Flynn 2024-08-17 14:23:13 -04:00 committed by Andreas Kling
commit 9f4e3c7e25
Notes: github-actions[bot] 2024-08-19 11:30:40 +00:00
5 changed files with 90 additions and 8 deletions

View file

@ -49,20 +49,27 @@ public:
void set_effect_allowed(FlyString);
void set_effect_allowed_internal(FlyString);
void associate_with_drag_data_store(DragDataStore& drag_data_store) { m_associated_drag_data_store = drag_data_store; }
void disassociate_with_drag_data_store() { m_associated_drag_data_store.clear(); }
ReadonlySpan<String> types() const;
void associate_with_drag_data_store(DragDataStore& drag_data_store);
void disassociate_with_drag_data_store();
private:
DataTransfer(JS::Realm&);
virtual void initialize(JS::Realm&) override;
void update_data_transfer_types_list();
// https://html.spec.whatwg.org/multipage/dnd.html#dom-datatransfer-dropeffect
FlyString m_drop_effect { DataTransferEffect::none };
// https://html.spec.whatwg.org/multipage/dnd.html#dom-datatransfer-effectallowed
FlyString m_effect_allowed { DataTransferEffect::none };
// https://html.spec.whatwg.org/multipage/dnd.html#concept-datatransfer-types
Vector<String> m_types;
// https://html.spec.whatwg.org/multipage/dnd.html#the-datatransfer-interface:drag-data-store-3
Optional<DragDataStore&> m_associated_drag_data_store;
};