Open ssorallen opened 9 years ago
having specific events before and after the DOM node removal/replacement would be a good thing™ too
Could you explain more what you're looking for? Turbolinks fires custom events during its lifecycle of replacing the page that might give you the hooks you'd like:
page:before-unload
the page has been parsed and is about to be changedpage:change
the page has been changed to the new version (and on DOMContentLoaded)
TurboReact monkeypatches
document.documentElement.replaceChild
because Turbolinks (at least prior to v3) provides no way to intervene in the replacement process.Monkeypatching the DOM is a Bad Thing:registered: and needs to be removed before this can graduate from an experiment. This might mean a new API in Turbolinks or using the v3 partial replacement API.