mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:07:35 +00:00
LibWeb: Add ReadableStreamDefaultReader
This commit is contained in:
parent
7ff657ef57
commit
222e3c32cd
11 changed files with 385 additions and 8 deletions
|
@ -17,6 +17,8 @@ namespace Web::Streams {
|
|||
// https://streams.spec.whatwg.org/#readablestreamgenericreader
|
||||
class ReadableStreamGenericReaderMixin {
|
||||
public:
|
||||
virtual ~ReadableStreamGenericReaderMixin() = default;
|
||||
|
||||
WebIDL::ExceptionOr<JS::GCPtr<JS::Promise>> closed();
|
||||
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<JS::Promise>> cancel(JS::Value reason);
|
||||
|
@ -27,6 +29,8 @@ public:
|
|||
JS::GCPtr<WebIDL::Promise> closed_promise_capability() { return m_closed_promise; }
|
||||
void set_closed_promise_capability(JS::GCPtr<WebIDL::Promise> promise) { m_closed_promise = promise; }
|
||||
|
||||
virtual bool is_default_reader() const { return false; }
|
||||
|
||||
protected:
|
||||
void visit_edges(JS::Cell::Visitor&);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue