kanblendar/example.js
Kumi 303258ce10
refactor: separate task creation logic from Kanblendar class
Moved event listener for task button from Kanblendar init method to DOMContentLoaded handler. This change simplifies the Kanblendar class and improves modularity by placing event listening logic closer to the button initialization. Helps maintain separation of concerns and makes the code easier to manage and test.
2024-07-30 13:48:35 +02:00

5 lines
No EOL
243 B
JavaScript

document.addEventListener('DOMContentLoaded', () => {
const kanblendar = new Kanblendar();
const createTaskBtn = document.getElementById('createTaskBtn');
createTaskBtn.addEventListener('click', () => kanblendar.openModal());
});