code: function(template, refNode) {
        if (template) {
          // TODO(sorvell): mark this element as an eventController so that
          // event listeners on bound nodes inside it will be called on it.
          // Note, the expectation here is that events on all descendants
          // should be handled by this element.
          this.eventController = this;
          // stamp template
          // which includes parsing and applying MDV bindings before being
          // inserted (to avoid {{}} in attribute values)
          // e.g. to prevent <img src="images/{{icon}}"> from generating a 404.
          var dom = this.instanceTemplate(template);
          // append to shadow dom
          if (refNode) {
            this.insertBefore(dom, refNode);
          } else {
            this.appendChild(dom);
          }
          // perform post-construction initialization tasks on ahem, light root
          this.shadowRootReady(this);
          // return the created shadow root
          return dom;
        }
      }
docs: utility function that stamps a <template> into light-dom