I have a HTML file, and linked in the head, an external stylesheet, and both of them are in the same folder. There are only one stylesheet. In the bottom of the body, i have a script:
document.styleSheets[0].insertRule(".example{position: relative}", 0);
But i get this error message (suprisingly only on Chrome 64, on FireFox, Safari mobile and Chrome mobile works well):
Uncaught DOMException: Failed to execute 'insertRule' on 'CSSStyleSheet': Cannot access StyleSheet to insertRule
Why?