mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 12:35:14 +00:00
LibURL/Pattern: Use ConstructorStringParser to construct URLPatternInit
This commit is contained in:
parent
e369756e9c
commit
a9e20cb6c3
Notes:
github-actions[bot]
2025-03-15 11:40:03 +00:00
Author: https://github.com/shannonbooth Commit: https://github.com/LadybirdBrowser/ladybird/commit/a9e20cb6c34 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3812 Reviewed-by: https://github.com/tcl3 Reviewed-by: https://github.com/trflynn89
1 changed files with 3 additions and 1 deletions
|
@ -4,6 +4,7 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibURL/Pattern/ConstructorStringParser.h>
|
||||
#include <LibURL/Pattern/Pattern.h>
|
||||
|
||||
namespace URL::Pattern {
|
||||
|
@ -16,7 +17,8 @@ PatternErrorOr<Pattern> Pattern::create(Input const& input, Optional<String> con
|
|||
|
||||
// 2. If input is a scalar value string then:
|
||||
if (input.has<String>()) {
|
||||
// FIXME: 1. Set init to the result of running parse a constructor string given input.
|
||||
// 1. Set init to the result of running parse a constructor string given input.
|
||||
init = TRY(ConstructorStringParser::parse(input.get<String>().code_points()));
|
||||
|
||||
// 2. If baseURL is null and init["protocol"] does not exist, then throw a TypeError.
|
||||
if (!base_url.has_value() && !init.protocol.has_value())
|
||||
|
|
Loading…
Add table
Reference in a new issue