-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) {