StructuredClone-serializable-objects.html 382 B

123456789101112
  1. <script src="../include.js"></script>
  2. <script>
  3. asyncTest(async done => {
  4. let blob = structuredClone(new Blob(["Hello, Blob!"], {type: "text/plain"}));
  5. println(`instanceOf Blob: ${blob instanceof Blob}`);
  6. println(`Blob.type: ${blob.type}`);
  7. let text = await blob.text();
  8. println(`Blob.text(): ${text}`);
  9. done();
  10. });
  11. </script>