function createRow(rowInfo) {
  var template = $('datarow');
  var td = template.content.querySelectorAll('td');
  td[0].textContent = rowInfo.origin.url;
  td[1].textContent = rowInfo.visits;
  td[2].textContent = rowInfo.mediaPlaybacks;
  td[3].textContent = rowInfo.audiblePlaybacks;
  td[4].textContent = rowInfo.significantPlaybacks;
  td[5].textContent = rowInfo.lastMediaPlaybackTime ?
      new Date(rowInfo.lastMediaPlaybackTime).toISOString() :
      '';
  td[6].textContent = rowInfo.isHigh ? 'Yes' : 'No';
  td[7].textContent = rowInfo.highScoreChanges;
  td[8].textContent = rowInfo.totalScore ? rowInfo.totalScore.toFixed(2) : '0';
  td[9].getElementsByClassName('engagement-bar')[0].style.width =
      (rowInfo.totalScore * 50) + 'px';
  return document.importNode(template.content, true);
}
/**
 * Creates a single row in the engagement table.
 * @param {!MediaEngagementScoreDetails} rowInfo The info to create the row.
 * @return {!HTMLElement}
 */
Creates a single row in the engagement table.
@param {!MediaEngagementScoreDetails} rowInfo The info to create the row.
Creates a single row in the engagement table . @param { !MediaEngagementScoreDetails } rowInfo The info to create the row .
function createRow(rowInfo) {
  var template = $('datarow');
  var td = template.content.querySelectorAll('td');
  td[0].textContent = rowInfo.origin.url;
  td[1].textContent = rowInfo.visits;
  td[2].textContent = rowInfo.mediaPlaybacks;
  td[3].textContent = rowInfo.audiblePlaybacks;
  td[4].textContent = rowInfo.significantPlaybacks;
  td[5].textContent = rowInfo.lastMediaPlaybackTime ?
      new Date(rowInfo.lastMediaPlaybackTime).toISOString() :
      '';
  td[6].textContent = rowInfo.isHigh ? 'Yes' : 'No';
  td[7].textContent = rowInfo.highScoreChanges;
  td[8].textContent = rowInfo.totalScore ? rowInfo.totalScore.toFixed(2) : '0';
  td[9].getElementsByClassName('engagement-bar')[0].style.width =
      (rowInfo.totalScore * 50) + 'px';
  return document.importNode(template.content, true);
}
function createRow ( rowInfo ) { var template = $ ( 'datarow' ) ; var td = template . content . querySelectorAll ( 'td' ) ; td [ 0 ] . textContent = rowInfo . origin . url ; td [ 1 ] . textContent = rowInfo . visits ; td [ 2 ] . textContent = rowInfo . mediaPlaybacks ; td [ 3 ] . textContent = rowInfo . audiblePlaybacks ; td [ 4 ] . textContent = rowInfo . significantPlaybacks ; td [ 5 ] . textContent = rowInfo . lastMediaPlaybackTime ? new Date ( rowInfo . lastMediaPlaybackTime ) . toISOString ( ) : '' ; td [ 6 ] . textContent = rowInfo . isHigh ? 'Yes' : 'No' ; td [ 7 ] . textContent = rowInfo . highScoreChanges ; td [ 8 ] . textContent = rowInfo . totalScore ? rowInfo . totalScore . toFixed ( 2 ) : '0' ; td [ 9 ] . getElementsByClassName ( 'engagement-bar' ) [ 0 ] . style . width = ( rowInfo . totalScore * 50 ) + 'px' ; return document . importNode ( template . content , true ) ; }
Creates a single row in the engagement table.
Creates a single row in the engagement table .