miniflux/ui/static/js/mouse_handler.js
2018-07-05 22:18:51 -07:00

11 lines
No EOL
305 B
JavaScript

class MouseHandler {
onClick(selector, callback) {
let elements = document.querySelectorAll(selector);
elements.forEach((element) => {
element.onclick = (event) => {
event.preventDefault();
callback(event);
};
});
}
}