You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be interesting to have an option to set the events to trigger a link preload when enablePrefetch is set to true.
I know that it is possible to set the enablePrefetch to false and then use the API preload() method, but it would be so much easier for simple cases, like adding a touchstart event for touch devices.
Something like:
consttaxi=newCore({// default// prefetchEvents: 'mouseenter focus'// on "tap" only// prefetchEvents: 'mousedown touchstart'// add "touchstart" for touch devicesprefetchEvents: 'mouseenter focus touchstart'});
Thank you.
The text was updated successfully, but these errors were encountered:
@andrepimpao I am happy to add, but copuld I ask what the usecase of touchstart would be?
I was going to add this originally, but then figured the touchstart event would be fired at effectively the same time as the click event, so by that point the transition is already starting.
@jakewhiteley oh, I was assuming that you would only request the new page between the onLeaveCompleted and onEnter events. So I was suggesting having a touchstart to prefetch the page upon touching the link (since there is no mouseenter on touch devices), but I see now that the request is made immediately after the onLeave event.
My usecase does not apply here then. I can't think of any other usecases, so I guess this option is not needed at all, since there is already an alternative with the preload method for edge cases.
It would be interesting to have an option to set the events to trigger a link preload when
enablePrefetch
is set totrue
.I know that it is possible to set the
enablePrefetch
tofalse
and then use the APIpreload()
method, but it would be so much easier for simple cases, like adding atouchstart
event for touch devices.Something like:
Thank you.
The text was updated successfully, but these errors were encountered: