Simple document.styleSheets[0].cssRules
from console works fine. But when trying to get this from function:
var asd = function(){ return document.styleSheets[0].cssRules }
console.log( asd() );
causes:
SecurityError: The operation is insecure.
There was no problems with Chrome browser.
As suggested here I tried to set crossorigin
attribute to "anonymous" and "use-credentials" with no success
<link rel="stylesheet" type="text/css" href="../styles/style.css" crossorigin="anonymous" />