LibWeb: Implement Blob::bytes()

Implements https://w3c.github.io/FileAPI/#dom-blob-bytes.
This commit is contained in:
Kemal Zebari 2024-07-23 23:48:01 -07:00 committed by Andreas Kling
commit c5f1e47883
Notes: github-actions[bot] 2024-07-26 08:22:29 +00:00
12 changed files with 52 additions and 10 deletions

View file

@ -50,8 +50,9 @@ public:
JS::NonnullGCPtr<Streams::ReadableStream> stream();
JS::NonnullGCPtr<JS::Promise> text();
JS::NonnullGCPtr<JS::Promise> array_buffer();
JS::NonnullGCPtr<JS::Promise> bytes();
ReadonlyBytes bytes() const { return m_byte_buffer.bytes(); }
ReadonlyBytes raw_bytes() const { return m_byte_buffer.bytes(); }
JS::NonnullGCPtr<Streams::ReadableStream> get_stream();