overleaf/services/web/frontend/js/infrastructure/without-propagation.js

7 lines
134 B
JavaScript
Raw Normal View History

export default function withoutPropagation(callback) {
return ev => {
ev.stopPropagation()
if (callback) callback(ev)
}
}