MCPcopy Create free account
hub / github.com/docker/getting-started / matches

Function matches

app/src/static/js/react-bootstrap.js:8406–8416  ·  view source on GitHub ↗
(node, selector)

Source from the content-addressed store, hash-verified

8404var matchesCache;
8405
8406function matches(node, selector) {
8407 if (!matchesCache && _inDOM.default) {
8408 var body = document.body;
8409 var nativeMatch = body.matches || body.matchesSelector || body.webkitMatchesSelector || body.mozMatchesSelector || body.msMatchesSelector;
8410 matchesCache = nativeMatch ? function (node, selector) {
8411 return nativeMatch.call(node, selector);
8412 } : ie8MatchesSelector;
8413 }
8414
8415 return matchesCache ? matchesCache(node, selector) : null;
8416}
8417
8418function ie8MatchesSelector(node, selector) {
8419 var matches = (0, _querySelectorAll.default)(node.document || node.ownerDocument, selector),

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…