1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:28:12 +00:00

LibWeb: Add ReadableStreamBYOBRequest interface

This commit is contained in:
Matthew Olsson 2023-04-10 18:37:27 -07:00 committed by Linus Groh
parent dc5f213fa0
commit c7aa4fa166
6 changed files with 79 additions and 0 deletions

View file

@ -0,0 +1,30 @@
/*
* Copyright (c) 2023, Matthew Olsson <mattco@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibWeb/Streams/ReadableStreamBYOBRequest.h>
namespace Web::Streams {
// https://streams.spec.whatwg.org/#rs-byob-request-view
JS::GCPtr<JS::TypedArrayBase> ReadableStreamBYOBRequest::view()
{
// 1. Return this.[[view]].
return m_view;
}
ReadableStreamBYOBRequest::ReadableStreamBYOBRequest(JS::Realm& realm)
: Bindings::PlatformObject(realm)
{
}
void ReadableStreamBYOBRequest::visit_edges(Cell::Visitor& visitor)
{
Base::visit_edges(visitor);
visitor.visit(m_controller);
visitor.visit(m_view);
}
}