index.js
function fill(toElement, templateElement) {
    var templateContentClone = templateElement.content.cloneNode(true)
    var slot
    var i

    if (toElement.childNodes.length) {
      slot = templateContentClone.querySelector('slot')

      if (slot) {
        while (toElement.childNodes.length) {
          slot.appendChild(toElement.firstChild)
        }
      }
    }

    toElement.appendChild(templateContentClone)
  }
function fill(toElement, templateElement) {
    var templateContentClone = templateElement.content.cloneNode(true)
    var slot
    var i

    if (toElement.childNodes.length) {
      slot = templateContentClone.querySelector('slot')

      if (slot) {
        while (toElement.childNodes.length) {
          slot.appendChild(toElement.firstChild)
        }
      }
    }

    toElement.appendChild(templateContentClone)
  }
function fill ( toElement , templateElement ) { var templateContentClone = templateElement . content . cloneNode ( true ) var slot var i if ( toElement . childNodes . length ) { slot = templateContentClone . querySelector ( 'slot' ) if ( slot ) { while ( toElement . childNodes . length ) { slot . appendChild ( toElement . firstChild ) } } } toElement . appendChild ( templateContentClone ) }
Attach a template's content to an element.
@public
@memberof module:simpleComponent
@param {HTMLElement} toElement The element to attach the template content to
@param {HTMLElement} template A template element that has the markup guts for the custom element.
@return {void}
Attach a template s content to an element .