mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 17:28:30 +00:00
LibWeb: Implement window.stop()
Fixes a handful of timeouts on WPT.
This commit is contained in:
committed by
Andreas Kling
parent
fdee82d203
commit
3f461b96df
@@ -856,6 +856,18 @@ GC::Ref<History> Window::history() const
|
||||
return associated_document().history();
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-window-stop
|
||||
void Window::stop()
|
||||
{
|
||||
// 1. If this's navigable is null, then return.
|
||||
auto navigable = this->navigable();
|
||||
if (!navigable)
|
||||
return;
|
||||
|
||||
// 2. Stop loading this's navigable.
|
||||
navigable->stop_loading();
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/interaction.html#dom-window-focus
|
||||
void Window::focus()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user