mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 07:07:23 +00:00
LibWeb: Stub out missing cross origin properties on the window object
Previously, trying to access the `close`, `closed` or `blur` properties on a cross origin window would cause a crash.
This commit is contained in:
committed by
Andreas Kling
parent
558fef237c
commit
3876875bd8
@@ -874,6 +874,21 @@ String Window::status() const
|
||||
return m_status;
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-window-close
|
||||
void Window::close()
|
||||
{
|
||||
// FIXME: Implement this properly
|
||||
dbgln("(STUBBED) Window::close()");
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-window-closed
|
||||
bool Window::closed() const
|
||||
{
|
||||
// FIXME: Implement this properly
|
||||
dbgln("(STUBBED) Window::closed");
|
||||
return false;
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-window-status
|
||||
void Window::set_status(String const& status)
|
||||
{
|
||||
@@ -918,6 +933,12 @@ void Window::focus()
|
||||
// indicate to the user that the page is attempting to gain focus.
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/interaction.html#dom-window-blur
|
||||
void Window::blur()
|
||||
{
|
||||
// The blur() method steps are to do nothing.
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/window-object.html#dom-frames
|
||||
JS::NonnullGCPtr<WindowProxy> Window::frames() const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user