mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
LibWeb: Don't set hashChange for classic history navigate events
See: - https://github.com/whatwg/html/pull/10393
This commit is contained in:
parent
b216046234
commit
4c5fa102a3
Notes:
sideshowbarker
2024-07-17 06:51:10 +09:00
Author: https://github.com/jamierocks
Commit: 4c5fa102a3
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/246
Reviewed-by: https://github.com/kalenikaliaksandr ✅
1 changed files with 3 additions and 1 deletions
|
@ -1026,11 +1026,13 @@ bool Navigation::inner_navigate_event_firing_algorithm(
|
|||
auto current_url = document.url();
|
||||
|
||||
// 21. If all of the following are true:
|
||||
// - event's classic history API state is null;
|
||||
// - destination's is same document is true;
|
||||
// - destination's URL equals currentURL with exclude fragments set to true; and
|
||||
// - destination's URL's fragment is not identical to currentURL's fragment,
|
||||
// then initialize event's hashChange to true. Otherwise, initialize it to false.
|
||||
event_init.hash_change = (destination->same_document()
|
||||
event_init.hash_change = (!classic_history_api_state.has_value()
|
||||
&& destination->same_document()
|
||||
&& destination->raw_url().equals(current_url, URL::ExcludeFragment::Yes)
|
||||
&& destination->raw_url().fragment() != current_url.fragment());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue