mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:18:11 +00:00
LibWeb: Add interface for 'concept-url-parser'
This does not implement extra functionality on top of the basic parser, but allows multiple places in LibWeb to call the 'correct' interface for when it is fully implemented.
This commit is contained in:
parent
7ef4689383
commit
6fecd8cc44
6 changed files with 37 additions and 11 deletions
|
@ -4,7 +4,6 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <AK/URLParser.h>
|
||||
#include <LibJS/Runtime/Completion.h>
|
||||
#include <LibWeb/Bindings/Intrinsics.h>
|
||||
#include <LibWeb/Bindings/MainThreadVM.h>
|
||||
|
@ -15,6 +14,7 @@
|
|||
#include <LibWeb/Fetch/Response.h>
|
||||
#include <LibWeb/HTML/Scripting/Environments.h>
|
||||
#include <LibWeb/Infra/JSON.h>
|
||||
#include <LibWeb/URL/URL.h>
|
||||
|
||||
namespace Web::Fetch {
|
||||
|
||||
|
@ -174,7 +174,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<Response>> Response::redirect(JS::VM& vm, S
|
|||
|
||||
// 1. Let parsedURL be the result of parsing url with current settings object’s API base URL.
|
||||
auto api_base_url = HTML::current_settings_object().api_base_url();
|
||||
auto parsed_url = URLParser::parse(url, api_base_url);
|
||||
auto parsed_url = URL::parse(url, api_base_url);
|
||||
|
||||
// 2. If parsedURL is failure, then throw a TypeError.
|
||||
if (!parsed_url.is_valid())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue