mirror of
https://github.com/SerenityOS/serenity
synced 2026-05-11 17:37:00 +02:00
Implements https://w3c.github.io/FileAPI/#dom-blob-bytes. (cherry picked from commit c5f1e478838092dcf6e4ad8ee0bfef32a47e2d68)
14 lines
424 B
HTML
14 lines
424 B
HTML
<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>
|