12 lines
293 B
JavaScript
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();
|
|
};
|