MCPcopy Index your code
hub / github.com/SortableJS/Sortable / matches

Function matches

Sortable.js:143–160  ·  view source on GitHub ↗
( /**HTMLElement*/el, /**String*/selector)

Source from the content-addressed store, hash-verified

141 el.removeEventListener(event, fn, !IE11OrLess && captureMode);
142 }
143 function matches( /**HTMLElement*/el, /**String*/selector) {
144 if (!selector) return;
145 selector[0] === '>' && (selector = selector.substring(1));
146 if (el) {
147 try {
148 if (el.matches) {
149 return el.matches(selector);
150 } else if (el.msMatchesSelector) {
151 return el.msMatchesSelector(selector);
152 } else if (el.webkitMatchesSelector) {
153 return el.webkitMatchesSelector(selector);
154 }
155 } catch (_) {
156 return false;
157 }
158 }
159 return false;
160 }
161 function getParentOrHost(el) {
162 return el.host && el !== document && el.host.nodeType && el.host !== el ? el.host : el.parentNode;
163 }

Callers 3

closestFunction · 0.70
lastChildFunction · 0.70
indexFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…