LibWeb: Implement the DataTransfer files attribute

This commit is contained in:
Timothy Flynn 2024-08-17 14:44:26 -04:00 committed by Andreas Kling
commit 4bb9168712
Notes: github-actions[bot] 2024-08-19 11:30:24 +00:00
5 changed files with 64 additions and 1 deletions

View file

@ -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 => {