diff options
author | Connor Brewster <connor.brewster@eagles.oc.edu> | 2018-06-12 22:12:17 +0200 |
---|---|---|
committer | Connor Brewster <connor.brewster@eagles.oc.edu> | 2018-07-21 12:38:51 -0600 |
commit | 61442cce4b93ef6b88b4ce59bad2358e8ce8bf4e (patch) | |
tree | e5a99859dc9708a4299a3238091cd414838762d5 /components/script/dom/history.rs | |
parent | c1cc2aaf9cd82ec1be317dbdea057f617d0c4541 (diff) | |
download | servo-61442cce4b93ef6b88b4ce59bad2358e8ce8bf4e.tar.gz servo-61442cce4b93ef6b88b4ce59bad2358e8ce8bf4e.zip |
Track hash changes in session history
Notify history changed on pushState and scroll to frag
Diffstat (limited to 'components/script/dom/history.rs')
-rw-r--r-- | components/script/dom/history.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/components/script/dom/history.rs b/components/script/dom/history.rs index 369c59b524c..939cf9a8c20 100644 --- a/components/script/dom/history.rs +++ b/components/script/dom/history.rs @@ -85,7 +85,10 @@ impl History { // Step 6 let hash_changed = old_url.fragment() != url.fragment(); - // TODO: Step 8 - scroll restoration + // Step 8 + if let Some(fragment) = url.fragment() { + document.check_and_scroll_fragment(fragment); + } // Step 11 let state_changed = state_id != self.state_id.get(); |