mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-16 23:39:44 +00:00
LibWeb: Implement the DataTransfer items attribute
This commit is contained in:
parent
34ad67e056
commit
1b70362954
Notes:
github-actions[bot]
2024-08-22 12:23:05 +00:00
Author: https://github.com/trflynn89
Commit: 1b70362954
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1158
Reviewed-by: https://github.com/shannonbooth
5 changed files with 43 additions and 3 deletions
|
@ -49,6 +49,8 @@ public:
|
|||
void set_effect_allowed(FlyString);
|
||||
void set_effect_allowed_internal(FlyString);
|
||||
|
||||
JS::NonnullGCPtr<DataTransferItemList> items();
|
||||
|
||||
ReadonlySpan<String> types() const;
|
||||
String get_data(String const& format) const;
|
||||
JS::NonnullGCPtr<FileAPI::FileList> files() const;
|
||||
|
@ -60,6 +62,7 @@ private:
|
|||
DataTransfer(JS::Realm&);
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
virtual void visit_edges(JS::Cell::Visitor&) override;
|
||||
|
||||
void update_data_transfer_types_list();
|
||||
|
||||
|
@ -69,6 +72,9 @@ private:
|
|||
// 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#dom-datatransfer-items
|
||||
JS::GCPtr<DataTransferItemList> m_items;
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/dnd.html#concept-datatransfer-types
|
||||
Vector<String> m_types;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue