Skip to content

Commit

Permalink
Merge pull request #32 from rl-king/fixnotes
Browse files Browse the repository at this point in the history
Fix notes, popstate is dispatched by window not document
  • Loading branch information
evancz authored Sep 12, 2018
2 parents bea3682 + b9828c9 commit 1b2b84d
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 1b2b84d

Please sign in to comment.