Skip to content
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

TypeError: Property 'handleEvent' is not callable #220

Open
BrainFeeder opened this issue Feb 6, 2020 · 0 comments
Open

TypeError: Property 'handleEvent' is not callable #220

BrainFeeder opened this issue Feb 6, 2020 · 0 comments

Comments

@BrainFeeder
Copy link

BrainFeeder commented Feb 6, 2020

Hi!

I'm getting the error below when using this Pjax in simple html project.
The pages are created with BootstrapStudio (mockup). Pjax has been linked from CDN.

I added listeners on pjax:send and pjax:complete
document.addEventListener('pjax:send', $appContainer.startLoading()); document.addEventListener('pjax:complete', $appContainer.stopLoading());
Called functions will just add/remove class .loading to/from body.

Seems like the events do trigger on page load.

When I click a link, pjax:send triggers:

TypeError: Property 'handleEvent' is not callable.pjax.js:419:10
exports https://cdn.jsdelivr.net/npm/pjax/pjax.js:419
exports https://cdn.jsdelivr.net/npm/pjax/pjax.js:459
exports https://cdn.jsdelivr.net/npm/pjax/pjax.js:411
forEach self-hosted:235
exports https://cdn.jsdelivr.net/npm/pjax/pjax.js:400
loadUrl https://cdn.jsdelivr.net/npm/pjax/pjax.js:186
linkAction https://cdn.jsdelivr.net/npm/pjax/pjax.js:718
exports https://cdn.jsdelivr.net/npm/pjax/pjax.js:769

pjax:complete triggers:

TypeError: Property 'handleEvent' is not callable.pjax.js:419:10
exports https://cdn.jsdelivr.net/npm/pjax/pjax.js:419
exports https://cdn.jsdelivr.net/npm/pjax/pjax.js:459
exports https://cdn.jsdelivr.net/npm/pjax/pjax.js:411
forEach self-hosted:235
exports https://cdn.jsdelivr.net/npm/pjax/pjax.js:400
afterAllSwitches https://cdn.jsdelivr.net/npm/pjax/pjax.js:252
onSwitch https://cdn.jsdelivr.net/npm/pjax/pjax.js:116
outerHTML https://cdn.jsdelivr.net/npm/pjax/pjax.js:1048
bind_applyFunctionN self-hosted:1054
outerHTML self-hosted:1018
exports https://cdn.jsdelivr.net/npm/pjax/pjax.js:1038
forEach self-hosted:235
exports https://cdn.jsdelivr.net/npm/pjax/pjax.js:1037
self-hosted:886
switchSelectors https://cdn.jsdelivr.net/npm/pjax/pjax.js:95
loadContent https://cdn.jsdelivr.net/npm/pjax/pjax.js:166
exports https://cdn.jsdelivr.net/npm/pjax/pjax.js:841
self-hosted:882
onreadystatechange https://cdn.jsdelivr.net/npm/pjax/pjax.js:910

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

No branches or pull requests

1 participant