Skip to content

Commit

Permalink
Replace document with window
Browse files Browse the repository at this point in the history
  • Loading branch information
rl-king committed Sep 11, 2018
1 parent 3b02034 commit b9828c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion notes/navigation-in-elements.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var app = Elm.Main.init({
});

// Inform app of browser navigation (the BACK and FORWARD buttons)
document.addEventListener('popstate', function () {
window.addEventListener('popstate', function () {
app.ports.onUrlChange.send(location.href);
});

Expand Down

0 comments on commit b9828c9

Please sign in to comment.