implement window.location.reload()

This commit is contained in:
Paul Rouget 2015-09-03 08:47:38 +02:00
parent b737bd322e
commit c7e5e785b2
2 changed files with 6 additions and 1 deletions

View file

@ -59,6 +59,11 @@ impl LocationMethods for Location {
} }
} }
// https://html.spec.whatwg.org/multipage/#dom-location-reload
fn Reload(&self) {
self.window.root().load_url(self.get_url());
}
// https://url.spec.whatwg.org/#dom-urlutils-hash // https://url.spec.whatwg.org/#dom-urlutils-hash
fn Hash(&self) -> USVString { fn Hash(&self) -> USVString {
UrlHelper::Hash(&self.get_url()) UrlHelper::Hash(&self.get_url())

View file

@ -7,6 +7,6 @@
/*[Unforgeable]*/ interface Location { /*[Unforgeable]*/ interface Location {
void assign(DOMString url); void assign(DOMString url);
//void replace(DOMString url); //void replace(DOMString url);
//void reload(); void reload();
}; };
Location implements URLUtils; Location implements URLUtils;