diff options
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML')
3 files changed, 14 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/BrowsingContextContainer.cpp b/Userland/Libraries/LibWeb/HTML/BrowsingContextContainer.cpp index 0b40fc808a..7842d9ffcc 100644 --- a/Userland/Libraries/LibWeb/HTML/BrowsingContextContainer.cpp +++ b/Userland/Libraries/LibWeb/HTML/BrowsingContextContainer.cpp @@ -103,4 +103,13 @@ const DOM::Document* BrowsingContextContainer::get_svg_document() const return nullptr; } +HTML::Window* BrowsingContextContainer::content_window() const +{ + // FIXME: This should return the WindowProxy + auto* document = content_document(); + if (!document) + return nullptr; + return const_cast<HTML::Window*>(&document->window()); +} + } diff --git a/Userland/Libraries/LibWeb/HTML/BrowsingContextContainer.h b/Userland/Libraries/LibWeb/HTML/BrowsingContextContainer.h index 78b6071d9c..5cdc7ca497 100644 --- a/Userland/Libraries/LibWeb/HTML/BrowsingContextContainer.h +++ b/Userland/Libraries/LibWeb/HTML/BrowsingContextContainer.h @@ -21,6 +21,8 @@ public: const DOM::Document* content_document() const; DOM::Document const* content_document_without_origin_check() const; + HTML::Window* content_window() const; + DOM::Document const* get_svg_document() const; protected: diff --git a/Userland/Libraries/LibWeb/HTML/HTMLIFrameElement.idl b/Userland/Libraries/LibWeb/HTML/HTMLIFrameElement.idl index 3ff48d9b1b..8c25b63df6 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLIFrameElement.idl +++ b/Userland/Libraries/LibWeb/HTML/HTMLIFrameElement.idl @@ -13,6 +13,9 @@ interface HTMLIFrameElement : HTMLElement { readonly attribute Document? contentDocument; + // FIXME: Should return a WindowProxy? + readonly attribute Window? contentWindow; + [Reflect] attribute DOMString align; [Reflect] attribute DOMString scrolling; [Reflect=frameborder] attribute DOMString frameBorder; |