1 var tasks: string[] = [];
3 function createViewTask(task: string) {
4 const viewTask = document.createElement("div");
5 viewTask.appendChild(document.createTextNode(task));
6 viewTask.setAttribute("tabindex", "0");
10 function updateView() {
11 tasks.forEach((t) => document.getElementById(t) || document.body.appendChild(createViewTask(t)));
14 function addTask(task: string) {
19 function browserCreateTask(form: any) {
20 addTask(form.taskName.value);
21 form.taskName.value = "";