Sha256: 796dd5de36707eb7c6244f0f567c5b8a82cdbea2ef2e28ee06303284182a6bbb
Contents?: true
Size: 761 Bytes
Versions: 104
Compression:
Stored size: 761 Bytes
Contents
/** * Polyfill for Element#matches * @param {HTMLElement} node The element to test * @param {String} selector The selector to test element against * @return {Boolean} */ axe.utils.matchesSelector = (function() { 'use strict'; var method; function getMethod(node) { var index, candidate, candidates = [ 'matches', 'matchesSelector', 'mozMatchesSelector', 'webkitMatchesSelector', 'msMatchesSelector' ], length = candidates.length; for (index = 0; index < length; index++) { candidate = candidates[index]; if (node[candidate]) { return candidate; } } } return function(node, selector) { if (!method || !node[method]) { method = getMethod(node); } return node[method](selector); }; })();
Version data entries
104 entries across 104 versions & 1 rubygems