mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 06:34:57 +00:00
LibWeb: Add Window::navigable()
This commit is contained in:
parent
343c709566
commit
5f21285337
2 changed files with 10 additions and 0 deletions
|
@ -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()
|
||||
{
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include <LibWeb/HTML/CrossOrigin/CrossOriginPropertyDescriptorMap.h>
|
||||
#include <LibWeb/HTML/GlobalEventHandlers.h>
|
||||
#include <LibWeb/HTML/MimeType.h>
|
||||
#include <LibWeb/HTML/Navigable.h>
|
||||
#include <LibWeb/HTML/Plugin.h>
|
||||
#include <LibWeb/HTML/Scripting/ImportMap.h>
|
||||
#include <LibWeb/HTML/ScrollOptions.h>
|
||||
|
@ -82,6 +83,8 @@ public:
|
|||
BrowsingContext const* browsing_context() const;
|
||||
BrowsingContext* browsing_context();
|
||||
|
||||
JS::GCPtr<Navigable> navigable() const;
|
||||
|
||||
size_t document_tree_child_browsing_context_count() const;
|
||||
|
||||
ImportMap const& import_map() const { return m_import_map; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue