View - Atileon/OC-p8 Wiki

Overview

View that abstracts away the browser's DOM completely.

function View(template) {
      this.template = template;

      this.ENTER_KEY = 13;
      this.ESCAPE_KEY = 27;
      //Query Selectors on DOM
      this.$todoList = qs('.todo-list');
      this.$todoItemCounter = qs('.todo-count');
      this.$clearCompleted = qs('.clear-completed');
      this.$main = qs('.main');
      this.$footer = qs('.footer');
      this.$toggleAll = qs('.toggle-all');
      this.$newTodo = qs('.new-todo');
   }

It has two simple entry points:

View.bind

View.bind

View.render

View.render

Previous < Model -------/-------/------- Next > Controller