mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-02 04:27:12 +02: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
Notes:
github-actions[bot]
2024-12-05 11:39:56 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/3f461b96df8 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2778 Reviewed-by: https://github.com/gmta ✅
@@ -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