2021-06-14 01:47:08 +03:00
|
|
|
/*
|
|
|
|
* 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:
|
2023-01-28 12:33:35 -05:00
|
|
|
virtual ThrowCompletionOr<void> initialize(Realm&) override;
|
2022-03-14 10:25:06 -06:00
|
|
|
virtual ~DataViewConstructor() override = default;
|
2021-06-14 01:47:08 +03:00
|
|
|
|
2021-10-20 21:16:30 +01:00
|
|
|
virtual ThrowCompletionOr<Value> call() override;
|
2022-12-14 19:18:10 +00:00
|
|
|
virtual ThrowCompletionOr<NonnullGCPtr<Object>> construct(FunctionObject&) override;
|
2021-06-14 01:47:08 +03:00
|
|
|
|
|
|
|
private:
|
2022-08-28 23:51:28 +02:00
|
|
|
explicit DataViewConstructor(Realm&);
|
|
|
|
|
2021-06-14 01:47:08 +03:00
|
|
|
virtual bool has_constructor() const override { return true; }
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|