This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccountGUI/node_modulesOLD/vuetify/lib/directives/scroll/index.js

32 lines
658 B
JavaScript
Raw Normal View History

2019-08-11 18:48:02 +00:00
function inserted(el, binding) {
const callback = binding.value;
const options = binding.options || {
passive: true
};
const target = binding.arg ? document.querySelector(binding.arg) : window;
if (!target) return;
target.addEventListener('scroll', callback, options);
el._onScroll = {
callback,
options,
target
};
}
function unbind(el) {
if (!el._onScroll) return;
const {
callback,
options,
target
} = el._onScroll;
target.removeEventListener('scroll', callback, options);
delete el._onScroll;
}
export const Scroll = {
inserted,
unbind
};
export default Scroll;
//# sourceMappingURL=index.js.map