code: function hasAttribute (element, attrName) {
    if (typeof element.hasAttribute === 'function') {
      return element.hasAttribute(attrName)
    }
    return element.getAttribute(attrName) !== null
  }
docs: /* IE8 does NOT implement hasAttribute