mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-16 08:02:52 +00:00
LibWeb: Implement Blob::bytes()
Implements https://w3c.github.io/FileAPI/#dom-blob-bytes.
This commit is contained in:
parent
1ce9bbdd6d
commit
c5f1e47883
Notes:
github-actions[bot]
2024-07-26 08:22:29 +00:00
Author: https://github.com/kemzeb
Commit: c5f1e47883
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/802
Reviewed-by: https://github.com/kennethmyhra ✅
Reviewed-by: https://github.com/shannonbooth
12 changed files with 52 additions and 10 deletions
|
@ -0,0 +1,13 @@
|
|||
<script src="../include.js"></script>
|
||||
<script>
|
||||
asyncTest(async (done) => {
|
||||
const blob = new Blob(["This is some data to be read! 🦬"]);
|
||||
const uint8Array = await blob.bytes();
|
||||
const string = new TextDecoder().decode(uint8Array);
|
||||
if (string === "This is some data to be read! 🦬")
|
||||
println("PASS");
|
||||
else
|
||||
println("FAIL");
|
||||
done();
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue