-
-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inline scripts can trigger pjax:complete
event before loadUrl
does
#117
Comments
Is this related to #35? |
Any fix for #35 will almost certainly have to hook into the script onload events defined in |
I'm not so sure this is closed. I've manually invoked
Like I said, it seems that everything is still running with regards to the pjax functionality. Am I missing something? |
@Bran99 If you're using Pjax, you don't need click handlers; Pjax handles that for you. You also don't need to specify switch functions unless you want custom behavior. Try replacing the above code with just the Pjax constructor:
|
After an inline external script that has been processed by
lib/eval-script.js
loads, it triggers apjax:complete
event which can sometimes fire beforeloadUrl
triggers its ownpjax:complete
andpjax:success
events.The documentation doesn't suggest that we should be firing multiple
pjax:complete
events, so I think we should either change the event being fired by these injected scripts (to something likepjax:complete:external
) or remove them entirely -- is there a use case for them to fire events?The text was updated successfully, but these errors were encountered: