mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 19:37:36 +00:00
LibJS: ArrayBuffer.prototype.slice
Implements the aforementioned native Javascript function, following the specification's [1] implementation. [1] https://tc39.es/ecma262/#sec-arraybuffer.prototype.slice
This commit is contained in:
parent
b50de19cd3
commit
01187e58f2
4 changed files with 82 additions and 1 deletions
|
@ -36,8 +36,10 @@ class ArrayBuffer : public Object {
|
|||
|
||||
public:
|
||||
static ArrayBuffer* create(GlobalObject&, size_t);
|
||||
static ArrayBuffer* create(GlobalObject&, ByteBuffer&);
|
||||
|
||||
ArrayBuffer(size_t, Object& prototype);
|
||||
ArrayBuffer(ByteBuffer& buffer, Object& prototype);
|
||||
virtual ~ArrayBuffer() override;
|
||||
|
||||
size_t byte_length() const { return m_buffer.size(); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue