How can I get a list of all class names used inside an HTML Snippet?
For example, the HTML Snippet below,
-
2021-01-02 23:02
Get all the classes & the unique ones in one dimension.
const allClasses = Array.from(new Set(document.querySelectorAll("*").map(el => el.classNames)));
const flatClasses = Array.from(new Set(allClasses.flat(1)))