mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
LibWeb: Port Document encoding_parse_url and parse_url to Optional<URL>
This ports two more APIs away from URL::is_valid.
This commit is contained in:
committed by
Tim Ledbetter
parent
cfe9b7a82b
commit
22a7cd9700
@@ -202,7 +202,7 @@ WebIDL::ExceptionOr<Window::OpenedWindow> Window::window_open_steps_internal(Str
|
||||
url_record = source_document.encoding_parse_url(url);
|
||||
|
||||
// 2. If urlRecord is failure, then throw a "SyntaxError" DOMException.
|
||||
if (!url_record->is_valid())
|
||||
if (!url_record.has_value())
|
||||
return WebIDL::SyntaxError::create(realm(), MUST(String::formatted("Invalid URL '{}'", url)));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user