function elementToInnerHtml(elem) {
  let innerHtml = elem.innerHTML;
  if (goog.userAgent.IE) {
    innerHtml = innerHtml.replace(/DIV/g, 'div').replace(/\s/g, '');
  }
  return innerHtml;
}
Retrieves the content of an element as HTML.
@param {Element} elem The element.
@return {string} Content of the element as HTML.