dispatch/client/js/utils/scrollPosition.js

13 lines
200 B
JavaScript
Raw Normal View History

const positions = {};
export function getScrollPos(key) {
if (key in positions) {
return positions[key];
}
return -1;
}
export function saveScrollPos(key, pos) {
positions[key] = pos;
}