Wraps an array of DOM elements and provides chainable methods for CSS, attributes, classes, data, aria, events, and animation.
Each method delegates to the standalone functions from the dom package, so DomCollection is a thin orchestration layer rather than a reimplementation.
const btns = new DomCollection<HTMLButtonElement>(elements, { signal }); btns.css({ color: 'red' }).class.add('active').on('click', handler); Copy
const btns = new DomCollection<HTMLButtonElement>(elements, { signal }); btns.css({ color: 'red' }).class.add('active').on('click', handler);
Optional
Wraps an array of DOM elements and provides chainable methods for CSS, attributes, classes, data, aria, events, and animation.
Each method delegates to the standalone functions from the dom package, so DomCollection is a thin orchestration layer rather than a reimplementation.
Example