code: function htmlElementAsString (elem) {
    var out = []
    var className
    var classes
    var key
    var attr
    var i
  
    if (!elem || !elem.tagName) {
      return ''
    }
  
    out.push(elem.tagName.toLowerCase())
    if (elem.id) {
      out.push('#' + elem.id)
    }
  
    className = elem.className
    if (className && isString(className)) {
      classes = className.split(' ')
      for (i = 0; i < classes.length; i++) {
        out.push('.' + classes[i])
      }
    }
    var attrWhitelist = ['type', 'name', 'title', 'alt']
    for (i = 0; i < attrWhitelist.length; i++) {
      key = attrWhitelist[i]
      attr = elem.getAttribute(key)
      if (attr) {
        out.push('[' + key + '="' + attr + '"]')
      }
    }
    return out.join('')
  }
docs: ORIGINAL SOURCE: https://github.com/getsentry/raven-js/
  Returns a simple, query-selector representation of a DOM element
  e.g. [HTMLElement] => input#foo.btn[name=baz]
  @param HTMLElement
  @returns {string}