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

LibWeb: Add Window::navigable()

This commit is contained in:
Aliaksandr Kalenik 2023-08-22 15:50:49 +02:00 committed by Andreas Kling
parent 343c709566
commit 5f21285337
2 changed files with 10 additions and 0 deletions

View file

@ -703,6 +703,13 @@ BrowsingContext* Window::browsing_context()
return m_associated_document->browsing_context();
}
// https://html.spec.whatwg.org/multipage/nav-history-apis.html#window-navigable
JS::GCPtr<Navigable> Window::navigable() const
{
// A Window's navigable is the navigable whose active document is the Window's associated Document's, or null if there is no such navigable.
return Navigable::navigable_with_active_document(*m_associated_document);
}
// https://html.spec.whatwg.org/multipage/system-state.html#pdf-viewer-plugin-objects
Vector<JS::NonnullGCPtr<Plugin>> Window::pdf_viewer_plugin_objects()
{