web/apps/hello-tracking/js/hello-tracking.js
function updateNode(node, content, append) {
  append = append || false;

  while(!append && node.firstChild) {
    node.removeChild(node.firstChild);
  }

  if(content instanceof Element) {
    node.appendChild(content);
  }
  else if(content instanceof Array) {
    content.forEach(function(element) {
      node.appendChild(element);
    });
  }
  else {
    node.textContent = content;
  }
}
function updateNode(node, content, append) {
  append = append || false;

  while(!append && node.firstChild) {
    node.removeChild(node.firstChild);
  }

  if(content instanceof Element) {
    node.appendChild(content);
  }
  else if(content instanceof Array) {
    content.forEach(function(element) {
      node.appendChild(element);
    });
  }
  else {
    node.textContent = content;
  }
}
function updateNode ( node , content , append ) { append = append || false ; while ( ! append && node . firstChild ) { node . removeChild ( node . firstChild ) ; } if ( content instanceof Element ) { node . appendChild ( content ) ; } else if ( content instanceof Array ) { content . forEach ( function ( element ) { node . appendChild ( element ) ; } ) ; } else { node . textContent = content ; } }
Update the given node with the given content
Update the given node with the given content