addTask: function (timestamp: string, description: string): Element {
const task = document.createElement("div");
task.appendChild(document.createTextNode(description));
- task.setAttribute("class", "task");
+ task.classList.add("task");
task.setAttribute("tabindex", "0");
task.setAttribute("data-created", timestamp);
task.setAttribute("data-state", "todo");