Hi there,
A happy new year first of all!
While testing the script I wrote to insert new rules into the stylesheet with JavaScript, I noticed the cssRules return null with Firefox and Chrome when using an external link to the sheet. IE seems to be functioning normally.
I figured out this has to do with same-domain policy but can’t quite figure out (or find online exactly) how to proceed with this. I would actually like to test it further on Codepen.
Should I allow cross-domain file access for the folder where the CSS file is located? And might there be any caveats to this?
Since the pen/folder would be open to anyone, I feel that might not be such a wise thing to do. But I am not entirely aware of how this functions. So any tips or advice are much appreciated.
Thanks in advance.