docs: function () {
  
              // Note: Controllers are responsible of setting needRedraw.
              if (this.needRedraw) {
  
                  // Create root element for the page
                  var page = document.createElement('div');
                  page.style.display = 'block';
                  page.setAttribute('data-role', 'page');
  
                  // Create, render and add the header
                  if (this.header) {
                      var header = document.createElement('div');
                      header.setAttribute('data-role', 'header');
                      this.header.setElement(header);
                      this.header.render();
                      page.appendChild(header);
                  }
  
                  // Create the content element
                  var content = document.createElement('div');
                  content.setAttribute('data-role', 'content');
                  content.className = 'content';
  
                  // Render the content
                  this.content.setElement(content);
                  this.content.render();
  
                  // Make sure content fills the screen to the top/bottom
                  // when no header/footer are provided.
                  if (!this.header) {
                      content.style.top = '0';
                  }
                  if (!this.footer) {
                      content.style.bottom = '0';
                  }
  
                  page.appendChild(content);
  
                  // Create, render and add the footer
                  if (this.footer) {
                      var footer = document.createElement('div');
                      footer.setAttribute('data-role', 'footer');
                      this.footer.setElement(footer);
                      this.footer.render();
                      page.appendChild(footer);
                  }
  
                  // Add the page into the DOM.
                  if (this.el.firstChild) {
                      this.el.replaceChild(page, this.el.firstChild);
                  }
                  else {
                      this.el.appendChild(page);
                  }
   
                  this.needRedraw = false;
              }
          }