1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:58:11 +00:00

LibWeb: Rename Document::complete_url() => parse_url()

This better matches the spec nomenclature.
This commit is contained in:
Andreas Kling 2021-09-09 18:08:56 +02:00
parent 0839442da5
commit e1fb8bef09
12 changed files with 18 additions and 16 deletions

View file

@ -119,7 +119,7 @@ DOM::ExceptionOr<void> XMLHttpRequest::open(const String& method, const String&
auto normalized_method = normalize_method(method);
auto parsed_url = m_window->associated_document().complete_url(url);
auto parsed_url = m_window->associated_document().parse_url(url);
if (!parsed_url.is_valid())
return DOM::SyntaxError::create("Invalid URL");
@ -166,7 +166,7 @@ DOM::ExceptionOr<void> XMLHttpRequest::send()
// FIXME: If body is not null, then:
URL request_url = m_window->associated_document().complete_url(m_url.to_string());
URL request_url = m_window->associated_document().parse_url(m_url.to_string());
dbgln("XHR send from {} to {}", m_window->associated_document().url(), request_url);
// TODO: Add support for preflight requests to support CORS requests