UNPKG

vanillajs-browser-helpers

Version:

Collection of convenience code snippets (helpers) that aims to make it a little easier to work with vanilla JS in the browser

9 lines (8 loc) 282 B
/** * Adds one or multiple class names to a DOM element * * @param elm - HTML ELement to add class names to * @param classNames - Class name(s) to add * @return The given `elm` */ export default function addClass(elm: Element, classNames: string | string[]): Element;