rod
rod copied to clipboard
Is there a way to get css rules associated with an element ?
Rod Version: v0.114.7
I have one element which has a css rule as
I want to validate this, is there a way to get the styles rules from the element ?
Please fix the format of your markdown:
3:43 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1]
5:1 MD033/no-inline-html Inline HTML [Element: img]
generated by check-issue
Yes, you can. Check the api in this file: https://github.com/go-rod/rod/blob/0243a30b10871506324281942f9b16eeb45fdc12/lib/proto/css.go#L19
https://github.com/go-rod/rod/blob/c35d2abd99a193ef49e21e02591cb6572269291f/examples_test.go#L410-L432