mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:57:43 +00:00
LibJS: Add the DataView built-in object
This commit is contained in:
parent
5b2255291e
commit
e4d267d4fb
15 changed files with 351 additions and 0 deletions
28
Userland/Libraries/LibJS/Runtime/DataViewConstructor.h
Normal file
28
Userland/Libraries/LibJS/Runtime/DataViewConstructor.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Idan Horowitz <idan.horowitz@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LibJS/Runtime/NativeFunction.h>
|
||||
|
||||
namespace JS {
|
||||
|
||||
class DataViewConstructor final : public NativeFunction {
|
||||
JS_OBJECT(DataViewConstructor, NativeFunction);
|
||||
|
||||
public:
|
||||
explicit DataViewConstructor(GlobalObject&);
|
||||
virtual void initialize(GlobalObject&) override;
|
||||
virtual ~DataViewConstructor() override;
|
||||
|
||||
virtual Value call() override;
|
||||
virtual Value construct(Function&) override;
|
||||
|
||||
private:
|
||||
virtual bool has_constructor() const override { return true; }
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue