/* * Copyright (c) 2022, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #include #include #include #include namespace Web::Bindings { PlatformObject::PlatformObject(JS::Realm& realm) : JS::Object(realm, nullptr) { } PlatformObject::PlatformObject(JS::Object& prototype) : JS::Object(ConstructWithPrototypeTag::Tag, prototype) { } PlatformObject::~PlatformObject() = default; JS::Realm& PlatformObject::realm() const { return shape().realm(); } HTML::Window& PlatformObject::global_object() const { return verify_cast(realm().global_object()); } }