function updateKeyValueList(ul, list) {
  for (var i = 0; i < list.length; i++) {
    var item = list[i];
    var text = item.key;
    if (item.value != '')
      text += ': ' + item.value;

    var li = createElementFromText('li', text);
    if (item.class)
      li.classList.add(item.class);
    ul.appendChild(li);
  }
}
/**
 * Updates <ul> element with the given key-value list.
 * @param {HTMLElement} ul <ul> element to be modified.
 * @param {Array} list List of dictionaries containing 'key', 'value' (optional)
 * and 'class' (optional). For each element <li> element with specified class is
 * created.
 */
Updates  element with the given key-value list.
@param {HTMLElement} ul  element to be modified.
Updates element with the given key - value list . @param { HTMLElement } ul element to be modified .
function updateKeyValueList(ul, list) {
  for (var i = 0; i < list.length; i++) {
    var item = list[i];
    var text = item.key;
    if (item.value != '')
      text += ': ' + item.value;
    var li = createElementFromText('li', text);
    if (item.class)
      li.classList.add(item.class);
    ul.appendChild(li);
  }
}
function updateKeyValueList ( ul , list ) { for ( var i = 0 ; i < list . length ; i ++ ) { var item = list [ i ] ; var text = item . key ; if ( item . value != '' ) text += ': ' + item . value ; var li = createElementFromText ( 'li' , text ) ; if ( item . class ) li . classList . add ( item . class ) ; ul . appendChild ( li ) ; } }
Updates <ul> element with the given key-value list.
Updates <ul > element with the given key - value list .