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:
parent
037b395b5d
commit
efefd44a9f
Notes:
sideshowbarker
2024-07-17 01:23:08 +09:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/SerenityOS/serenity/commit/efefd44a9f Pull-request: https://github.com/SerenityOS/serenity/pull/23968
1 changed files with 1 additions and 1 deletions
|
@ -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())
|
||||
|
|
Loading…
Add table
Reference in a new issue