LibWeb: Return OptionalNone from DOMURL::parse on failure

This ports one more function away from needing to use the awkward
valid state of the URL class.
This commit is contained in:
Shannon Booth 2025-01-22 17:35:52 +13:00 committed by Sam Atkins
commit fd27eef0d1
Notes: github-actions[bot] 2025-01-22 12:34:57 +00:00
18 changed files with 63 additions and 65 deletions

View file

@ -96,6 +96,6 @@ private:
void strip_trailing_spaces_from_an_opaque_path(DOMURL& url);
// https://url.spec.whatwg.org/#concept-url-parser
URL::URL parse(StringView input, Optional<URL::URL const&> base_url = {}, Optional<StringView> encoding = {});
Optional<URL::URL> parse(StringView input, Optional<URL::URL const&> base_url = {}, Optional<StringView> encoding = {});
}