]> git.scottworley.com Git - vopamoi/blob - vopamoi.ts
cfa118695c4f82c00b113e605b522710eac07489
[vopamoi] / vopamoi.ts
1 function createTask(description: string) {
2 const task = document.createElement("div");
3 task.appendChild(document.createTextNode(description));
4 task.setAttribute("tabindex", "0");
5 return task;
6 }
7
8 function addTask(description: string) {
9 document.body.appendChild(createTask(description));
10 }
11
12 function browserCreateTask(form: any) {
13 addTask(form.taskName.value);
14 form.taskName.value = "";
15 return false;
16 }