]> git.scottworley.com Git - vopamoi/blame_incremental - vopamoi.ts
No MVMVC; DOM *is* the model.
[vopamoi] / vopamoi.ts
... / ...
CommitLineData
1function 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
8function addTask(description: string) {
9 document.body.appendChild(createTask(description));
10}
11
12function browserCreateTask(form: any) {
13 addTask(form.taskName.value);
14 form.taskName.value = "";
15 return false;
16}