Closed justin808 closed 8 years ago
I think this is correct. page:before-unload
and page:change
fire on all page changes, including back/forward. Same in master, except that those events are now receiving the affected DOM elements (in event.data
).
The README.md for master clearly states how to handle the forward/back buttons with an inline script that needs to run when the page is loaded.
How should this be handled when using 2.5?
How about if the script is wrapped in a function used in a callback to the document like:
Is that a suitable alternative to not having the:
data-turbolinks-eval=always
feature in v3?We're looking for the best solution for https://github.com/shakacode/react_on_rails/issues/105 which enables React components to work with TurboLinks.