function upgrade(template) {
  template = unique(template);
  const info =  templates.get(template) ||
                createTemplate.call(this, template);
  const fragment = importNode(this.ownerDocument, info.fragment);
  const updates = Updates.create(fragment, info.paths);
  bewitched.set(this, {template, updates});
  update.apply(updates, arguments);
  this.textContent = '';
  this.appendChild(fragment);
}
// to the current context, and render it after cleaning the context up
to the current context, and render it after cleaning the context up
to the current context and render it after cleaning the context up
function upgrade(template) {
  template = unique(template);
  const info =  templates.get(template) ||
                createTemplate.call(this, template);
  const fragment = importNode(this.ownerDocument, info.fragment);
  const updates = Updates.create(fragment, info.paths);
  bewitched.set(this, {template, updates});
  update.apply(updates, arguments);
  this.textContent = '';
  this.appendChild(fragment);
}
function upgrade ( template ) { template = unique ( template ) ; const info = templates . get ( template ) || createTemplate . call ( this , template ) ; const fragment = importNode ( this . ownerDocument , info . fragment ) ; const updates = Updates . create ( fragment , info . paths ) ; bewitched . set ( this , { template , updates } ) ; update . apply ( updates , arguments ) ; this . textContent = '' ; this . appendChild ( fragment ) ; }
to the current context, and render it after cleaning the context up
to the current context and render it after cleaning the context up