1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 07:27:45 +00:00

LibJS: Add the WeakMap built-in object

This commit is contained in:
Idan Horowitz 2021-06-12 05:28:30 +03:00 committed by Linus Groh
parent 1a8ee5d8d7
commit 39554f3787
9 changed files with 243 additions and 0 deletions

View 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 WeakMapConstructor final : public NativeFunction {
JS_OBJECT(WeakMapConstructor, NativeFunction);
public:
explicit WeakMapConstructor(GlobalObject&);
virtual void initialize(GlobalObject&) override;
virtual ~WeakMapConstructor() override;
virtual Value call() override;
virtual Value construct(Function&) override;
private:
virtual bool has_constructor() const override { return true; }
};
}