mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 01:29:17 +00:00
LibWeb: Implement the DataTransferItemList indexed getter
This commit is contained in:
parent
843f8f04a5
commit
ceb9e30d42
Notes:
github-actions[bot]
2024-08-22 12:22:27 +00:00
Author: https://github.com/trflynn89
Commit: ceb9e30d42
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1158
Reviewed-by: https://github.com/shannonbooth
6 changed files with 36 additions and 1 deletions
|
@ -12,6 +12,10 @@
|
|||
println(`stringItem: ${stringItem}`);
|
||||
println(`length=${dataTransferItemList.length}, types=${dataTransfer.types}`);
|
||||
|
||||
if (dataTransferItemList[0] !== stringItem) {
|
||||
println("FAILED");
|
||||
}
|
||||
|
||||
try {
|
||||
dataTransferItemList.add("well hello friends", "custom-type");
|
||||
println("FAILED");
|
||||
|
@ -24,5 +28,13 @@
|
|||
let fileItem = dataTransferItemList.add(file);
|
||||
println(`fileItem: ${fileItem}`);
|
||||
println(`length=${dataTransferItemList.length}, types=${dataTransfer.types}`);
|
||||
|
||||
if (dataTransferItemList[1] !== fileItem) {
|
||||
println("FAILED");
|
||||
}
|
||||
|
||||
if (dataTransferItemList[2] !== undefined) {
|
||||
println("FAILED");
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue