mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
21 lines
733 B
HTML
21 lines
733 B
HTML
<!DOCTYPE html>
|
|
<script src="../include.js"></script>
|
|
<script type="text/javascript">
|
|
asyncTest(async (done) => {
|
|
const blob = new Blob(['https://example.com'], {type: 'text/uri-list'});
|
|
|
|
const item = new ClipboardItem({'text/plain': 'hello', 'text/uri-list': blob});
|
|
|
|
println(`types: ${item.types}`);
|
|
|
|
const blobOutput = await item.getType('text/plain');
|
|
const text = await (new Response(blobOutput)).text();
|
|
println(`getType('text/plain'): ${text}`);
|
|
|
|
const blobOutput2 = await item.getType('text/uri-list');
|
|
const text2 = await (new Response(blobOutput2)).text();
|
|
println(`getType('text/uri-list'): ${text2}`);
|
|
|
|
done();
|
|
});
|
|
</script>
|