Blob-intialized-with-strings-read-from-bytes.html 424 B

12345678910111213
  1. <script src="../include.js"></script>
  2. <script>
  3. asyncTest(async (done) => {
  4. const blob = new Blob(["This is some data to be read! 🦬"]);
  5. const uint8Array = await blob.bytes();
  6. const string = new TextDecoder().decode(uint8Array);
  7. if (string === "This is some data to be read! 🦬")
  8. println("PASS");
  9. else
  10. println("FAIL");
  11. done();
  12. });
  13. </script>