Replace HistoryEntryReplacement with NavigationHistoryBehavior from the navigation API (#34681)

Signed-off-by: Shane Handley <shanehandley@fastmail.com>
This commit is contained in:
shanehandley 2024-12-18 23:47:20 +11:00 committed by GitHub
parent 3cbc8c2442
commit 3a4e5d4245
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 127 additions and 108 deletions

View file

@ -10,7 +10,7 @@ use dom_struct::dom_struct;
use html5ever::{LocalName, Prefix};
use js::rust::HandleObject;
use regex::bytes::Regex;
use script_traits::HistoryEntryReplacement;
use script_traits::NavigationHistoryBehavior;
use servo_url::ServoUrl;
use style::str::HTML_SPACE_CHARACTERS;
@ -49,7 +49,7 @@ impl RefreshRedirectDue {
pub fn invoke(self, can_gc: CanGc) {
self.window.Location().navigate(
self.url.clone(),
HistoryEntryReplacement::Enabled,
NavigationHistoryBehavior::Replace,
NavigationType::DeclarativeRefresh,
can_gc,
);