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/resize/index.js

32 lines
611 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
};
window.addEventListener('resize', callback, options);
el._onResize = {
callback,
options
};
if (!binding.modifiers || !binding.modifiers.quiet) {
callback();
}
}
function unbind(el) {
if (!el._onResize) return;
const {
callback,
options
} = el._onResize;
window.removeEventListener('resize', callback, options);
delete el._onResize;
}
export const Resize = {
inserted,
unbind
};
export default Resize;
//# sourceMappingURL=index.js.map