SerenityOS / serenity

The Serenity Operating System 🐞
https://serenityos.org
BSD 2-Clause "Simplified" License
30.46k stars 3.18k forks source link

LibWeb: Implement and wire up TransformStream's cancel callback #24558

Closed kennethmyhra closed 3 months ago

kennethmyhra commented 3 months ago

This implements the cancel callback for TransformStream. The cancel callback is raised when the readable side of the TransformStream is cancelled, or the writable side is aborted.

Also added a test to prove a ReadableStream can be cancelled, noticed this behavior lacked a test.

Commits are cherry-picked from: https://github.com/LadybirdBrowser/ladybird/pull/95