/* * Copyright (c) 2024, Tim Flynn * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include namespace Web::HTML { class NavigationObserver final : public Bindings::PlatformObject { WEB_PLATFORM_OBJECT(NavigationObserver, Bindings::PlatformObject); GC_DECLARE_ALLOCATOR(NavigationObserver); public: [[nodiscard]] GC::Ptr> navigation_complete() const { return m_navigation_complete; } void set_navigation_complete(Function); private: NavigationObserver(JS::Realm&, Navigable&); virtual void visit_edges(Cell::Visitor&) override; virtual void finalize() override; GC::Ref m_navigable; GC::Ptr> m_navigation_complete; }; }