I'm trying to read styleSheet rules through JavaScript but both document.styleSheets[0].rules and document.styleSheets[0].cssRules return Null.
To clarify:
if the loaded css looks like this:
.example{
position: relative;
height: 100%;
width: 100%;
overflow-x: hidden;
}
Using Javascript, if I call document.styleSheets[0].rules assuming the css is the first on in the html file, I should get the rule data. But that doesn't happen.
This issue only happens on iOS. It works fine on Safari and also works fine on Android.
Thank you.