2022-04-05 17:54:04 -03:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2022, the SerenityOS developers.
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <LibJS/Runtime/NativeFunction.h>
|
|
|
|
|
|
|
|
namespace Web::Bindings {
|
|
|
|
|
|
|
|
class LocationConstructor : public JS::NativeFunction {
|
|
|
|
JS_OBJECT(LocationConstructor, JS::NativeFunction);
|
|
|
|
|
|
|
|
public:
|
2022-08-16 00:20:49 +01:00
|
|
|
explicit LocationConstructor(JS::Realm&);
|
2022-08-16 00:20:49 +01:00
|
|
|
virtual void initialize(JS::Realm&) override;
|
2022-04-05 17:54:04 -03:00
|
|
|
virtual ~LocationConstructor() override;
|
|
|
|
|
|
|
|
virtual JS::ThrowCompletionOr<JS::Value> call() override;
|
|
|
|
virtual JS::ThrowCompletionOr<JS::Object*> construct(JS::FunctionObject& new_target) override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
virtual bool has_constructor() const override { return true; }
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|