Sha256: 31ec3bc894dbebe2eee64fab1b5920a15f8863c1cca15e7ee67ba3202eb42ea6
Contents?: true
Size: 682 Bytes
Versions: 271
Compression:
Stored size: 682 Bytes
Contents
/* global axe */ /** * Return the list of attributes of a node. * @method getNodeAttributes * @memberof axe.utils * @param {Element} node * @returns {NamedNodeMap} */ axe.utils.getNodeAttributes = function getNodeAttributes(node) { // eslint-disable-next-line no-restricted-syntax if (node.attributes instanceof window.NamedNodeMap) { // eslint-disable-next-line no-restricted-syntax return node.attributes; } // if the attributes property is not of type NamedNodeMap then the DOM // has been clobbered. E.g. <form><input name="attributes"></form>. // We can clone the node to isolate it and then return the attributes return node.cloneNode(false).attributes; };
Version data entries
271 entries across 271 versions & 1 rubygems