BehindTheMath
BehindTheMath
@MoOx what do you think?
If it's triggered by every switch, that would mean doing it in `onSwitch()`, but there's no way at that point to tell which switch triggered it.
I think there are 3 options when to trigger `pjax:switch`: - In `onSwitch`, which will trigger on every switch, and let the user debounce the multiple events (as @darylteo [proposed...
Why do you need events? Why can't you do whatever you need right inside the custom switch?
Got it. >if doing it in onSwitch, we could pass the switch selector that was responsible for the switch as an event payload This would only work if the user...
>Good point -- we could do that, or we could pass a pre-bound callback to each switch function to call at the end of the switch process. >i.e in lib/switches-selectors.js,...
>I'll move the trigger back Done, see 6000ad5.
@MoOx Do you mind if we use milestones to keep track of what we want to implement when?
I think this will make testing easier and cleaner, as it will be easier to remove event listeners and avoid issues of event listeners on `document` carrying over between tests.
Why do you need multiple instances?