Skip to content
This repository has been archived by the owner on Oct 11, 2019. It is now read-only.

Provide old url in page:loading #84

Open
felixbuenemann opened this issue Jul 31, 2014 · 1 comment
Open

Provide old url in page:loading #84

felixbuenemann opened this issue Jul 31, 2014 · 1 comment

Comments

@felixbuenemann
Copy link

It would be great if there was an event triggered before page:loading were document.location still points to the current url.

The problem is that when page:loading is triggered document.location already points to the new url, so it's hard to do cleanup like ubsubscribing from pubsub channels, calling deconstructors etc.

Turbolinks has a page:before-change event that can be used for that.

Another alternative would be to pass the old url to the page:loading event handler as an additional parameter.

@tezzataz
Copy link

+1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants