mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 03:37:53 +00:00
18 lines
452 B
HTML
18 lines
452 B
HTML
<script src="../include.js"></script>
|
|
<script>
|
|
function testReadableStreamCancellation() {
|
|
const readableStream = new ReadableStream({
|
|
cancel(reason) {
|
|
println(`ReadableStream cancelled due to: ${reason}`);
|
|
return Promise.resolve();
|
|
}
|
|
});
|
|
|
|
readableStream.cancel('Test cancellation');
|
|
}
|
|
|
|
test(() => {
|
|
testReadableStreamCancellation();
|
|
});
|
|
</script>
|