miniflux/ui/static/js/mouse_handler.js

11 lines
305 B
JavaScript
Raw Normal View History

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