Stylesheets Rules Return Null only on iphone?


I’m trying to read styleSheet rules through JavaScript but both document.styleSheets[0].rules and document.styleSheets[0].cssRules return Null.
This only happens on iOS. It works fine on Safari and also works fine on Android.
Thank you.