mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 18:17:22 +02:00
LibWeb: Implement DataTransferItem.prototype.getAsString()
This commit is contained in:
committed by
Tim Ledbetter
parent
8865d18a67
commit
181ece4d9c
Notes:
github-actions[bot]
2024-08-23 09:11:32 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/181ece4d9c6 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1163 Reviewed-by: https://github.com/tcl3 ✅
@@ -1,6 +1,6 @@
|
||||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
test(async () => {
|
||||
let dataTransfer = new DataTransfer();
|
||||
println(`dropEffect: ${dataTransfer.dropEffect}`);
|
||||
println(`effectAllowed: ${dataTransfer.effectAllowed}`);
|
||||
@@ -16,6 +16,14 @@
|
||||
println("FAILED");
|
||||
}
|
||||
|
||||
let promise = new Promise((resolve, reject) => {
|
||||
stringItem.getAsString(data => {
|
||||
println(`stringItemAsString: data=${data}`);
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
await promise;
|
||||
|
||||
try {
|
||||
dataTransferItemList.add("well hello friends", "custom-type");
|
||||
println("FAILED");
|
||||
|
||||
Reference in New Issue
Block a user