mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 21:29:06 +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:
parent
558fef237c
commit
3876875bd8
Notes:
sideshowbarker
2024-07-17 18:23:22 +09:00
Author: https://github.com/tcl3
Commit: 3876875bd8
Pull-request: https://github.com/SerenityOS/serenity/pull/23771
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/kalenikaliaksandr
Reviewed-by: https://github.com/shannonbooth
5 changed files with 63 additions and 0 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue