mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 02:57:42 +00:00
LibWeb+Meta: Add wrapper for the BufferSource/ArrayBufferView IDL types
These wrappers will make it much easier to do various operations on the different ArrayBuffer-related classes in LibWeb compared to the current solution, which is to just accept a Handle<Object> everywhere (and use "any" in the *.idl files). Co-Authored-By: Matthew Olsson <mattco@serenityos.org>
This commit is contained in:
parent
54d0aafff0
commit
04c094343f
27 changed files with 286 additions and 71 deletions
|
@ -12,6 +12,7 @@
|
|||
#include <LibJS/Forward.h>
|
||||
#include <LibWeb/Bindings/PlatformObject.h>
|
||||
#include <LibWeb/Forward.h>
|
||||
#include <LibWeb/WebIDL/Buffers.h>
|
||||
|
||||
namespace Web::Encoding {
|
||||
|
||||
|
@ -32,7 +33,7 @@ public:
|
|||
virtual ~TextEncoder() override;
|
||||
|
||||
JS::NonnullGCPtr<JS::Uint8Array> encode(String const& input) const;
|
||||
TextEncoderEncodeIntoResult encode_into(String const& source, JS::Handle<JS::Object> const& destination) const;
|
||||
TextEncoderEncodeIntoResult encode_into(String const& source, JS::Handle<WebIDL::BufferSource> const& destination) const;
|
||||
|
||||
static FlyString const& encoding();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue