mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
LibWeb: Implement DataTransferItem.prototype.getAsString()
This commit is contained in:
parent
8865d18a67
commit
181ece4d9c
Notes:
github-actions[bot]
2024-08-23 09:11:32 +00:00
Author: https://github.com/trflynn89
Commit: 181ece4d9c
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1163
Reviewed-by: https://github.com/tcl3 ✅
5 changed files with 46 additions and 2 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue