kaguranana-birthday-project/node_modules/granim/lib/onScroll.js
2021-12-12 18:49:32 -08:00

12 lines
293 B
JavaScript

'use strict';
module.exports = function(type) {
if (type === 'removeListeners') {
window.removeEventListener('scroll', this.pauseWhenNotInViewNameSpace);
return;
}
window.addEventListener('scroll', this.pauseWhenNotInViewNameSpace);
this.pauseWhenNotInViewNameSpace();
};