1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:07:46 +00:00

LibWeb: Add window.navigation property

This commit is contained in:
Andrew Kaster 2023-08-23 10:58:09 -06:00 committed by Andrew Kaster
parent 0c2f758067
commit 7f043e3083
3 changed files with 22 additions and 0 deletions

View file

@ -136,6 +136,7 @@ public:
void set_name(String const&);
[[nodiscard]] JS::NonnullGCPtr<Location> location();
JS::NonnullGCPtr<History> history() const;
JS::NonnullGCPtr<Navigation> navigation();
void focus();
JS::NonnullGCPtr<WindowProxy> frames() const;
@ -226,6 +227,9 @@ private:
JS::GCPtr<Navigator> m_navigator;
JS::GCPtr<Location> m_location;
// https://html.spec.whatwg.org/multipage/nav-history-apis.html#window-navigation-api
JS::GCPtr<Navigation> m_navigation;
// https://html.spec.whatwg.org/multipage/custom-elements.html#custom-elements-api
// Each Window object is associated with a unique instance of a CustomElementRegistry object, allocated when the Window object is created.
JS::GCPtr<CustomElementRegistry> m_custom_element_registry;