1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-10 01:51:03 +09:00

LibWeb: Implement FileAPI::Blob::stream()

This commit is contained in:
Shannon Booth 2023-06-13 07:36:00 +12:00 committed by Andreas Kling
parent 9f39be6e23
commit bd26d022ac
Notes: sideshowbarker 2024-07-17 20:19:08 +09:00
3 changed files with 9 additions and 0 deletions

View file

@ -252,6 +252,13 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<Blob>> Blob::slice(Optional<i64> start, Opt
return MUST_OR_THROW_OOM(heap().allocate<Blob>(realm(), realm(), move(byte_buffer), move(relative_content_type)));
}
// https://w3c.github.io/FileAPI/#dom-blob-stream
WebIDL::ExceptionOr<JS::NonnullGCPtr<Streams::ReadableStream>> Blob::stream()
{
// The stream() method, when invoked, must return the result of calling get stream on this.
return this->get_stream();
}
// https://w3c.github.io/FileAPI/#blob-get-stream
WebIDL::ExceptionOr<JS::NonnullGCPtr<Streams::ReadableStream>> Blob::get_stream()
{