function getImageUrl(element) {
  /** @suppress {checkTypes} suppression added to enable type checking */
  element = element.firstChild;  // get the wrapped element
  if (element.tagName == TagName.IMG) {
    return element.src;
  } else {
    /** @suppress {checkTypes} suppression added to enable type checking */
    let url = style.getStyle(element, 'background-image');
    url = url.replace(/url\(/, '');
    url = url.replace(/\)/, '');
    return url;
  }
}
Gets the emoji URL from a palette element. Palette elements are divs or
imgs wrapped in an outer div. The returns the background-image if it's a div,
or the src attribute if it's an image.
@param {Element} element Element to get the image url for
@return {string}
@suppress {strictMissingProperties} suppression added to enable type checking