Replace current session entry for reloads

This commit is contained in:
Connor Brewster 2016-09-02 23:28:20 -05:00
parent 0b0495cff4
commit e9b2f1b916
10 changed files with 89 additions and 57 deletions

View file

@ -1410,11 +1410,12 @@ impl Window {
}
/// Commence a new URL load which will either replace this window or scroll to a fragment.
pub fn load_url(&self, url: Url) {
pub fn load_url(&self, url: Url, replace: bool) {
let doc = self.Document();
self.main_thread_script_chan().send(
MainThreadScriptMsg::Navigate(self.id,
LoadData::new(url, doc.get_referrer_policy(), Some(doc.url().clone())))).unwrap();
LoadData::new(url, doc.get_referrer_policy(), Some(doc.url().clone())),
replace)).unwrap();
}
pub fn handle_fire_timer(&self, timer_id: TimerEventId) {