X-Git-Url: http://git.scottworley.com/vopamoi/blobdiff_plain/974848d36d6c4f1b171bd990f3d5659cb0e8134d..9e79bdbb90ffcb5929f76a4fb6860ed6396ac9de:/vopamoi.ts?ds=sidebyside diff --git a/vopamoi.ts b/vopamoi.ts index cb2d50e..cfa1186 100644 --- a/vopamoi.ts +++ b/vopamoi.ts @@ -1,7 +1,12 @@ -var tasks = []; +function createTask(description: string) { + const task = document.createElement("div"); + task.appendChild(document.createTextNode(description)); + task.setAttribute("tabindex", "0"); + return task; +} -function addTask(task: string) { - tasks.push(task); +function addTask(description: string) { + document.body.appendChild(createTask(description)); } function browserCreateTask(form: any) {