Skip to content

Instantly share code, notes, and snippets.

@n8
Created Mar 17, 2016
Embed
What would you like to do?
var snapbackCache = SnapbackCache({
bodySelector: "mandatory selector of your infinite feed",
finish: function () {
optional method of something that needs to finish on your page before caching the page
},
removeAutofocus: function () {
optional method to kill autofocusing which screws with scrolling the page
},
refreshItems: function (dirtyThings) {
optional method to fetch fresh bits from your server you want to replace in the cache
},
nextPageOffset: function () {
optional method to fetch the current page your scrolled to. this is so you can track what page you should scroll next. see the page-cache:loaded event.
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment