mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 08:28:11 +00:00
LibWeb: Set up the Fetch response's body with the appropriate stream
This commit is contained in:
parent
2bb751eab9
commit
09124fc3a5
3 changed files with 23 additions and 5 deletions
14
Tests/LibWeb/Text/input/Streams/init-from-fetch.html
Normal file
14
Tests/LibWeb/Text/input/Streams/init-from-fetch.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
<script src="../include.js"></script>
|
||||
<script>
|
||||
asyncTest(async done => {
|
||||
fetch("./../basic.html", { mode: "no-cors" })
|
||||
.then(response => response.body)
|
||||
.then(body => {
|
||||
const reader = body.getReader();
|
||||
reader.read();
|
||||
|
||||
println("Was able to create a reader from a Fetch response!");
|
||||
done();
|
||||
});
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue