Skip to content

Instantly share code, notes, and snippets.

function hasAttribute(e, a) {
if(e.hasAttribute) return e.hasAttribute(a);
var fixAttr = {
tabindex: 'tabIndex',
readonly: 'readOnly',
'for': 'htmlFor',
'class': 'className',
maxlength: 'maxLength',
cellspacing: 'cellSpacing',
cellpadding: 'cellPadding',