Ensure that a navigation to the same URL is aborted. Fixes #10952.

This commit is contained in:
Josh Matthews 2016-05-01 03:17:54 -04:00
parent 810735a846
commit 5cc8de8067
4 changed files with 45 additions and 2 deletions

View file

@ -66,7 +66,10 @@ impl LocationMethods for Location {
}
// https://html.spec.whatwg.org/multipage/#dom-location-hash
fn SetHash(&self, value: USVString) {
fn SetHash(&self, mut value: USVString) {
if value.0.is_empty() {
value = USVString("#".to_owned());
}
self.set_url_component(value, UrlHelper::SetHash);
}