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) 306 B
/** * Determines whether or not a DOM element matches a given CSS query selector * * @param elm - DOM element to test * @param selector - CSS selector {elm} should match * @return Whether or not {elm} matched the selector */ export default function matches(elm: Element, selector?: string): boolean;