I\'m trying to find a good way to collect the names of classes defined in the stylesheets included with a given document. I know about document.StyleSheetList
b
What about
.something .other_something?
Do you want a pool of classNames that exist? Or a pool of selectors?
Anyway, have you tried iterating through document.styleSheets[i].cssRules? It gives you the selector text. Parsing that with some regexp kungfu should be easier...
Do you need it to be crossbrowser?