Closed
Description
I would like to suggest being able to cancel pjax on the beforeReplace event.
//Check if replace should be canceled
if(!fire('pjax:beforeReplace', [container.contents, options], {
state: pjax.state,
previousState: previousState
})){
return false;
}
Here is my use case: If a user is logged in and their session times out the next pjax call will load the result of the unauthenticated request (likely a login form). In this instance I would like to be able to cancel pjax gracefully so that I may present a login UI that I desire.
Metadata
Metadata
Assignees
Labels
No labels