1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:48:12 +00:00

LibWeb: Add DOM::Window::page()

This helps us to get from a Window to the containing Page, without
clients having to go through Document.
This commit is contained in:
Andreas Kling 2021-09-09 13:45:03 +02:00
parent 84fcf879f9
commit d392349b6e
4 changed files with 18 additions and 5 deletions

View file

@ -182,7 +182,7 @@ DOM::ExceptionOr<void> XMLHttpRequest::send()
return {};
}
auto request = LoadRequest::create_for_url_on_page(request_url, m_window->document().page());
auto request = LoadRequest::create_for_url_on_page(request_url, m_window->page());
request.set_method(m_method);
for (auto& it : m_request_headers)
request.set_header(it.key, it.value);