From 7ccc80f6ed4900117a4a9e481c8e82670e006b86 Mon Sep 17 00:00:00 2001 From: Scott Worley Date: Thu, 27 Jan 2022 11:12:40 -0800 Subject: [PATCH] Use classList to set class --- vopamoi.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vopamoi.ts b/vopamoi.ts index a76db5b..c079bd4 100644 --- a/vopamoi.ts +++ b/vopamoi.ts @@ -33,7 +33,7 @@ const Model = { 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"); -- 2.44.1