From c7e5e785b25730a1eb184c026751009e224f73e2 Mon Sep 17 00:00:00 2001 From: Paul Rouget Date: Thu, 3 Sep 2015 08:47:38 +0200 Subject: [PATCH] implement window.location.reload() --- components/script/dom/location.rs | 5 +++++ components/script/dom/webidls/Location.webidl | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/components/script/dom/location.rs b/components/script/dom/location.rs index 488fbc973a3..c366139649b 100644 --- a/components/script/dom/location.rs +++ b/components/script/dom/location.rs @@ -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 fn Hash(&self) -> USVString { UrlHelper::Hash(&self.get_url()) diff --git a/components/script/dom/webidls/Location.webidl b/components/script/dom/webidls/Location.webidl index 97cdb87dda0..01e05bb7e29 100644 --- a/components/script/dom/webidls/Location.webidl +++ b/components/script/dom/webidls/Location.webidl @@ -7,6 +7,6 @@ /*[Unforgeable]*/ interface Location { void assign(DOMString url); //void replace(DOMString url); - //void reload(); + void reload(); }; Location implements URLUtils;