mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 14:28:49 +00:00
LibWeb: Implement window.stop()
Fixes a handful of timeouts on WPT.
This commit is contained in:
parent
fdee82d203
commit
3f461b96df
Notes:
github-actions[bot]
2024-12-05 11:39:56 +00:00
Author: https://github.com/awesomekling
Commit: 3f461b96df
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2778
Reviewed-by: https://github.com/gmta ✅
11 changed files with 94 additions and 0 deletions
|
@ -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()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue