mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
LibWeb: Implement the DataTransfer files attribute
This commit is contained in:
parent
8b4d28b5fd
commit
4bb9168712
Notes:
github-actions[bot]
2024-08-19 11:30:24 +00:00
Author: https://github.com/trflynn89
Commit: 4bb9168712
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1111
5 changed files with 64 additions and 1 deletions
|
@ -8,6 +8,16 @@
|
|||
const printEvent = (name, e) => {
|
||||
println(name);
|
||||
println(` types: ${e.dataTransfer.types}`);
|
||||
|
||||
const files = e.dataTransfer.files;
|
||||
|
||||
if (files.length !== 0) {
|
||||
println(` files: ${files.length}`);
|
||||
|
||||
for (const file of files) {
|
||||
println(` ${file.name}`);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
target.addEventListener("dragenter", e => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue