Javascript: selecting all elements that have a specific font-size or font-weight

Viewed 55

in JavaScript, is there a way to select all elements that have a specific style, like a font size or font weight or color without using class or ID?

1 Answers

You could select all elements (querySelector("*")) then loop over the results testing the computedStyle.

Far from efficient, but the only way I can think of.

Related