[Proposal] Manual invocation of Pjax. #54

Closed
opened 2016-01-05 02:33:55 -05:00 by darylteo · 4 comments
darylteo commented 2016-01-05 02:33:55 -05:00 (Migrated from github.com)

A static method that allows invocation instead of relying on declarative options.

This would open the door to things like

  • dynamic links (instead of relying on href), could be based on runtime vars like time or attributes
  • non-a links
  • non-click (mobile taps, hovers, keypresses)
  • or any number of processing steps to yield a target url to load
  • different switch options

This method could also return a Promise, and puts us closer to $.pjax.

A static method that allows invocation instead of relying on declarative options. This would open the door to things like - dynamic links (instead of relying on href), could be based on runtime vars like time or attributes - non-a links - non-click (mobile taps, hovers, keypresses) - or any number of processing steps to yield a target url to load - different switch options This method could also return a Promise, and puts us closer to $.pjax.
MoOx commented 2016-01-05 02:45:29 -05:00 (Migrated from github.com)

👍

:+1:
darylteo commented 2016-01-06 00:53:59 -05:00 (Migrated from github.com)

Need a bit more thought on this... looking at the code it doesn't seem like pjax was designed to have multiple instances of pjax instantiated on the same page. I ... might be trying to use this library wrongly =) I'll leave it for 0.3.0 maybe, but due to time constraints I'll rethink the way I'm using it.

Need a bit more thought on this... looking at the code it doesn't seem like pjax was designed to have multiple instances of pjax instantiated on the same page. I ... might be trying to use this library wrongly =) I'll leave it for 0.3.0 maybe, but due to time constraints I'll rethink the way I'm using it.
BehindTheMath commented 2017-12-21 00:25:53 -05:00 (Migrated from github.com)

@darylteo Can't you accomplish this by calling pjax.loadUrl()?

@darylteo Can't you accomplish this by calling `pjax.loadUrl()`?
darylteo commented 2017-12-29 00:23:10 -05:00 (Migrated from github.com)

@BehindTheMath this was 2 years ago. Can't remember. Feel free to close =)

@BehindTheMath this was 2 years ago. Can't remember. Feel free to close =)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: iLoveElysia/pjax#54