function nameTest(attr) {
        return attr.local === localName;
    }
Determine if element has an attribute by local name
(any, or by name or by name + value).

@param {String} [localName] local attribute name
@param {Number|String|RegExp|Function} [val] attribute value (will be toString()'ed or executed, otherwise ignored)
@return {Boolean}