/* * Copyright (c) 2022, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #include #include #include #include namespace Web::HTML { WebIDL::ExceptionOr> WorkerNavigator::create(WorkerGlobalScope& global_scope) { return MUST_OR_THROW_OOM(global_scope.heap().allocate(global_scope.realm(), global_scope)); } WorkerNavigator::WorkerNavigator(WorkerGlobalScope& global_scope) : PlatformObject(global_scope.realm()) { } WorkerNavigator::~WorkerNavigator() = default; JS::ThrowCompletionOr WorkerNavigator::initialize(JS::Realm& realm) { MUST_OR_THROW_OOM(Base::initialize(realm)); set_prototype(&Bindings::ensure_web_prototype(realm, "WorkerNavigator")); return {}; } }