rails/turbolinks — pull request #371 by remiprev (2014-05-01 19:33:47+00:00)
Title: Add page:processed event

This pull request adds a new `page:processed` event that is triggered right after the received document is processed (to check for changed assets for example) and just before the content is changed.

The use case for this is that I often want to execute some code at the last moment before the HTML content is changed. Normally I would use the `page:receive` but sometimes `processResponse` will force a page reload (if an asset has changed) and there’s a small delay between the `page:received` event and the actual page reload.

So I added this event to make sure we can execute code *just before* the page is changed.

Let me know if this is not something you think is necessary or if I could something to improve the pull request.

Thanks!