MCPcopy Create free account
hub / github.com/bendc/animateplus / getElements

Function getElements

animateplus.js:20–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18// ===
19
20const getElements = elements => {
21 if (Array.isArray(elements))
22 return elements;
23 if (!elements || elements.nodeType)
24 return [elements];
25 return Array.from(typeof elements == "string" ? document.querySelectorAll(elements) : elements);
26};
27
28const accelerate = ({style}, keyframes) =>
29 style.willChange = keyframes

Callers 2

addAnimationsFunction · 0.85
stopFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected