1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:17:34 +00:00

LibWeb: Add the ReadableStreamGenericReader mixin interface

This commit is contained in:
Matthew Olsson 2023-03-28 17:43:34 -07:00 committed by Linus Groh
parent f409f68a9a
commit fe69d66a4e
9 changed files with 189 additions and 3 deletions

View file

@ -1,15 +1,23 @@
/*
* Copyright (c) 2022, Linus Groh <linusg@serenityos.org>
* Copyright (c) 2023, Matthew Olsson <mattco@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibJS/Heap/GCPtr.h>
#include <LibWeb/Forward.h>
#include <LibWeb/WebIDL/Promise.h>
namespace Web::Streams {
bool is_readable_stream_locked(ReadableStream const&);
void readable_stream_close(ReadableStream&);
WebIDL::ExceptionOr<JS::NonnullGCPtr<WebIDL::Promise>> readable_stream_cancel(ReadableStream&, JS::Value reason);
JS::NonnullGCPtr<WebIDL::Promise> readable_stream_reader_generic_cancel(ReadableStreamGenericReaderMixin&, JS::Value reason);
}