mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 01:37:39 +03:00
LibWeb: Make HTMLIFrameElement.contentWindow return the WindowProxy
This fixes an issue where contentWindow was not accessible immediately after programmatically creating an iframe element.
This commit is contained in:
parent
4de3449ad6
commit
ac329d0a18
Notes:
sideshowbarker
2024-07-17 17:40:13 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/ac329d0a18
@ -109,13 +109,11 @@ const DOM::Document* BrowsingContextContainer::get_svg_document() const
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
HTML::Window* BrowsingContextContainer::content_window() const
|
||||
HTML::WindowProxy* BrowsingContextContainer::content_window()
|
||||
{
|
||||
// FIXME: This should return the WindowProxy
|
||||
auto* document = content_document();
|
||||
if (!document)
|
||||
if (!m_nested_browsing_context)
|
||||
return nullptr;
|
||||
return const_cast<HTML::Window*>(&document->window());
|
||||
return m_nested_browsing_context->window_proxy();
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/urls-and-fetching.html#matches-about:blank
|
||||
|
@ -24,7 +24,7 @@ public:
|
||||
const DOM::Document* content_document() const;
|
||||
DOM::Document const* content_document_without_origin_check() const;
|
||||
|
||||
HTML::Window* content_window() const;
|
||||
HTML::WindowProxy* content_window();
|
||||
|
||||
DOM::Document const* get_svg_document() const;
|
||||
|
||||
|
@ -15,8 +15,7 @@ interface HTMLIFrameElement : HTMLElement {
|
||||
|
||||
readonly attribute Document? contentDocument;
|
||||
|
||||
// FIXME: Should return a WindowProxy?
|
||||
readonly attribute Window? contentWindow;
|
||||
readonly attribute WindowProxy? contentWindow;
|
||||
|
||||
[Reflect] attribute DOMString align;
|
||||
[Reflect] attribute DOMString scrolling;
|
||||
|
Loading…
Reference in New Issue
Block a user