mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-13 11:39:43 +00:00
LibWeb: Implement the DataTransfer types attribute
This commit is contained in:
parent
e8a1b89447
commit
9f4e3c7e25
Notes:
github-actions[bot]
2024-08-19 11:30:40 +00:00
Author: https://github.com/trflynn89
Commit: 9f4e3c7e25
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1111
5 changed files with 90 additions and 8 deletions
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue