summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Bindings/LocationConstructor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibWeb/Bindings/LocationConstructor.cpp')
-rw-r--r--Userland/Libraries/LibWeb/Bindings/LocationConstructor.cpp39
1 files changed, 0 insertions, 39 deletions
diff --git a/Userland/Libraries/LibWeb/Bindings/LocationConstructor.cpp b/Userland/Libraries/LibWeb/Bindings/LocationConstructor.cpp
deleted file mode 100644
index 6a7d7a5dd8..0000000000
--- a/Userland/Libraries/LibWeb/Bindings/LocationConstructor.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2022, the SerenityOS developers.
- *
- * SPDX-License-Identifier: BSD-2-Clause
- */
-
-#include <LibWeb/Bindings/Intrinsics.h>
-#include <LibWeb/Bindings/LocationConstructor.h>
-#include <LibWeb/Bindings/LocationPrototype.h>
-
-namespace Web::Bindings {
-
-LocationConstructor::LocationConstructor(JS::Realm& realm)
- : NativeFunction(*realm.intrinsics().function_prototype())
-{
-}
-
-LocationConstructor::~LocationConstructor() = default;
-
-JS::ThrowCompletionOr<JS::Value> LocationConstructor::call()
-{
- return vm().throw_completion<JS::TypeError>(JS::ErrorType::ConstructorWithoutNew, "Location");
-}
-
-JS::ThrowCompletionOr<JS::NonnullGCPtr<JS::Object>> LocationConstructor::construct(FunctionObject&)
-{
- return vm().throw_completion<JS::TypeError>(JS::ErrorType::NotAConstructor, "Location");
-}
-
-void LocationConstructor::initialize(JS::Realm& realm)
-{
- auto& vm = this->vm();
-
- NativeFunction::initialize(realm);
- define_direct_property(vm.names.prototype, &ensure_web_prototype<Bindings::LocationPrototype>(realm, "Location"), 0);
- define_direct_property(vm.names.length, JS::Value(0), JS::Attribute::Configurable);
-}
-
-}