Created
December 4, 2018 22:56
-
-
Save Danetag/9516d8cc71a51920ac74de1125d7333d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Turbolinks from "turbolinks"; | |
| Turbolinks.start(); | |
| // When you just clicked on a link | |
| document.addEventListener("turbolinks:before-visit", e => { | |
| ... | |
| }); | |
| // When the transition is happening | |
| document.addEventListener("turbolinks:visit", e => { | |
| ... | |
| }); | |
| // When the page is loaded AND injected into the DOM | |
| document.addEventListener("turbolinks:load", e => { | |
| ... | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment