code: function () {
        this.removeChildInstances();
  
        if (this.template) {
          var args = this.getTemplateArguments();
  
          // temporarily assign a new node to get the content in a doc fragment
          var realNode = this.node;
          var df = doc.createDocumentFragment();
          this.node = df;
          this.template.call(this, args);
  
          realNode.insertBefore(df, this.node2);
          this.replaceNodeBy(df , realNode); // recursively remove doc fragment reference
          // now this.node=realNode
          this.isDOMempty = false;
        }
    }
docs: Create the child nodes for a dynamic template - this method assumes
  that node1 and node2 exist