mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-31 22:56:04 +00:00
LibWeb: Add a NavigationObserver to be notified of navigable updates
This contains a hook to be notified when a navigable navigation is complete, to be used by WebDriver.
This commit is contained in:
parent
247307a2a2
commit
74ef9dc393
Notes:
github-actions[bot]
2024-10-26 09:26:57 +00:00
Author: https://github.com/trflynn89
Commit: 74ef9dc393
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1967
6 changed files with 105 additions and 0 deletions
|
@ -59,6 +59,9 @@ public:
|
|||
|
||||
ErrorOr<void> initialize_navigable(JS::NonnullGCPtr<DocumentState> document_state, JS::GCPtr<Navigable> parent);
|
||||
|
||||
void register_navigation_observer(Badge<NavigationObserver>, NavigationObserver&);
|
||||
void unregister_navigation_observer(Badge<NavigationObserver>, NavigationObserver&);
|
||||
|
||||
Vector<JS::Handle<Navigable>> child_navigables() const;
|
||||
|
||||
bool is_traversable() const;
|
||||
|
@ -232,6 +235,8 @@ private:
|
|||
|
||||
JS::NonnullGCPtr<Page> m_page;
|
||||
|
||||
HashTable<JS::NonnullGCPtr<NavigationObserver>> m_navigation_observers;
|
||||
|
||||
bool m_has_been_destroyed { false };
|
||||
|
||||
CSSPixelSize m_size;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue