code: function compile(fragments, template) {
    var walker = document.createTreeWalker(template, NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_TEXT);
    var bindings = [], currentNode, parentNode, previousNode;
  
    // Reset first node to ensure it isn't a fragment
    walker.nextNode();
    walker.previousNode();
  
    // find bindings for each node
    do {
      currentNode = walker.currentNode;
      parentNode = currentNode.parentNode;
      bindings.push.apply(bindings, getBindingsForNode(fragments, currentNode, template));
  
      if (currentNode.parentNode !== parentNode) {
        // currentNode was removed and made a template
        walker.currentNode = previousNode || walker.root;
      } else {
        previousNode = currentNode;
      }
    } while (walker.nextNode());
  
    return bindings;
  }
docs: Walks the template DOM replacing any bindings and caching bindings onto the template object.