mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Replace current session entry for reloads
This commit is contained in:
parent
0b0495cff4
commit
e9b2f1b916
10 changed files with 89 additions and 57 deletions
|
@ -40,7 +40,7 @@ impl Location {
|
|||
setter: fn(&mut Url, USVString)) {
|
||||
let mut url = self.window.get_url();
|
||||
setter(&mut url, value);
|
||||
self.window.load_url(url);
|
||||
self.window.load_url(url, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -51,13 +51,13 @@ impl LocationMethods for Location {
|
|||
// _entry settings object_.
|
||||
let base_url = self.window.get_url();
|
||||
if let Ok(url) = base_url.join(&url.0) {
|
||||
self.window.load_url(url);
|
||||
self.window.load_url(url, false);
|
||||
}
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-location-reload
|
||||
fn Reload(&self) {
|
||||
self.window.load_url(self.get_url());
|
||||
self.window.load_url(self.get_url(), true);
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/#dom-location-hash
|
||||
|
@ -106,7 +106,7 @@ impl LocationMethods for Location {
|
|||
// https://html.spec.whatwg.org/multipage/#dom-location-href
|
||||
fn SetHref(&self, value: USVString) {
|
||||
if let Ok(url) = self.window.get_url().join(&value.0) {
|
||||
self.window.load_url(url);
|
||||
self.window.load_url(url, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue