Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Paste this rule in your browser's JS console on a loaded web page to log all rules targeting <option> tags. Change the text 'option' in the regex on line 7 to something else to filter for a different tag
import ('https://unpkg.com/cssomtools') .then(
({stringify, filter, all}) =>
console.log(
stringify(
filter(
all(),
rule => rule.selectorText && /\boption\b/.test(rule.selectorText)
)
)
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.