mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 07:07:23 +00:00
LibWeb: Navigate to changed url in Location::set_hash()
This step assumes copyURL is modified in place, while `URL::Parser::basic_parse()` returns it as a result. > 6. Basic URL parse input, with copyURL as url and fragment state as state override. So copyURL has to be reassigned to navigate to new url on step 8: > 8. Location-object navigate this to copyURL.
This commit is contained in:
committed by
Alexander Kalenik
parent
037b395b5d
commit
efefd44a9f
@@ -336,7 +336,7 @@ WebIDL::ExceptionOr<void> Location::set_hash(String const& value)
|
||||
copy_url.set_fragment(String {});
|
||||
|
||||
// 6. Basic URL parse input, with copyURL as url and fragment state as state override.
|
||||
auto result_url = URL::Parser::basic_parse(input, {}, copy_url, URL::Parser::State::Fragment);
|
||||
copy_url = URL::Parser::basic_parse(input, {}, copy_url, URL::Parser::State::Fragment);
|
||||
|
||||
// 7. If copyURL's fragment is this's url's fragment, then return.
|
||||
if (copy_url.fragment() == this->url().fragment())
|
||||
|
||||
Reference in New Issue
Block a user