Merge the fragment handling into handle_navigate.

This is handled in the 'navigate' algorithm in the specification.
This commit is contained in:
Ms2ger 2015-08-12 20:03:18 +02:00
parent 0bfde427e6
commit f62e7be168
2 changed files with 14 additions and 27 deletions

View file

@ -887,14 +887,7 @@ impl<'a> WindowHelpers for &'a Window {
/// Commence a new URL load which will either replace this window or scroll to a fragment.
fn load_url(self, url: Url) {
match url.fragment {
Some(fragment) => {
self.script_chan.send(ScriptMsg::TriggerFragment(self.id, fragment)).unwrap();
},
None => {
self.script_chan.send(ScriptMsg::Navigate(self.id, LoadData::new(url))).unwrap();
}
}
self.script_chan.send(ScriptMsg::Navigate(self.id, LoadData::new(url))).unwrap();
}
fn handle_fire_timer(self, timer_id: TimerId) {